Hello. This is my first post, so I hope I'm doing everything right

My daughter has inline skates with LEDs that flash when she moves. There is a circuit in each one of the skates. On one skate LEDs work as expected, on another one - no light. I've inspected the circuits and found that an "element" is connected to PCB using one leg and one very thin wire. On the non-working circuit this wire is broken. There are absolutely no marks on the element nor on the PCB. I'd like to replace this element, but I have no clue what that is. Hence the question, does anyone know what that element is? It is a black cylinder, which looks like capacitor. I've attached the pictures of the working PCB and market the broken wire (broken on another PCB) with the red circle.
That may be a vibration/orientation switch. I guess the thin wire is to make the sensor have only one rigid support.
This is an interesting idea. This element is fixed with the hot glue on the other side though. I thought that vibrations are detected using gyro on the other side of the PCB. Of course, I'm not sure that this is gyro, there are no marks on it.
Try to measure continuity of that element while rotating the board in space (on a working unit). Whatever it is, I assume it just has a dry contact.
a tilt switch?
That's what I was thinking. But why would it have one pin made of what seems to be an enameled wire? That just seems strange.
Although this one has asymmetric legs as well:
https://www.adafruit.com/product/173 This looks like a replacement part.
Prise-off the broken device and look for a part number. If you cannot find a part number try searching for SW 18010 on ebay - it should return something that looks very similar.
I cannot find the part number on the outside of that element, but indeed, when I search for SW 18010 - I get very similar parts. I'll order some of those and give them a try. Thanks!
And thanks everyone for help! As I mentioned, this was the first time I write on this forum, and I'm impressed on how fast I got help.
This is why there is one very thin wire: