Hi,
from your description you only need to know the timing to the first low to high transition and the last low to high transition.
The transitions inbetween are not of interest.
I´d use a timer capture input.
it freezes the timer value at the desired transition.
to recognize the first transition you need some non retriggering (if possible) capture. So if the first transition is recognized the value is freezed and an interrupt is requested.
Within the ISR read the captured value and activate the capture function as soon as possible - now with retriggering (if possible).
Then wait (about 100ms) and read the last captured value.
If there is no possiblility for non retriggering capture, then read the captured value as soon as possible.
With a retriggering capture you don´t need to read all events, only the last one is valid.
I don´t know your relay, but i expect the first transition in about 10ms, and the last in maybe 13ms (for small signal relays. both timings referred on starting to activate relay)
From the first to the second transition i expect the longest gap in time. Maybe 1ms. Then i´d expext it to speed up from one transition to the next until bouncing stops.
This is just an expectation without having true experience.
Just of curiosity you could save ALL capture events in SRAM to get a clue about the timing and the number of bounces and the complete baviour.
Good luck
Klaus