Problem:
When users put the app in background, if a span is started, then when the user opens the app again the span will end successfully and will have a duration way longer than it should, making our metrics wrong.
Solution:
Cancel all running spans when the app is put in background.