Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a breadcrumb when system timezone changes #1763

Closed
bruno-garcia opened this issue Apr 20, 2022 · 8 comments · Fixed by #1930
Closed

Create a breadcrumb when system timezone changes #1763

bruno-garcia opened this issue Apr 20, 2022 · 8 comments · Fixed by #1930

Comments

@bruno-garcia
Copy link
Member

Problem Statement

The OS fired a notification: https://developer.apple.com/documentation/foundation/nsnotification/name/1387256-nssystemtimezonedidchange

Solution Brainstorm

Log a breadcrumb, that can help users diagnose. Ideally we persist previous runs breadcrumbs so steps from a previous run can help diagnose issues related to time changing.

Additionally from the notification that can track changes at runtime, we could store the current TZ and compare when initializing the SDK

@github-actions
Copy link

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@philipphofmann
Copy link
Member

For the first iteration, I think we don't have to persist timezone changes across previous runs. I think it's not worth the effort.

@brustolin
Copy link
Contributor

brustolin commented Jul 4, 2022

For the first iteration, I think we don't have to persist timezone changes across previous runs. I think it's not worth the effort.

It's unlikely for an app to receive the change timezone notification because the app must be open for that.
IMO we should stick to persisting timezones to report the change. Otherwise, even for a first iteration, this does not aggregate much value.

@kevinrenskers
Copy link
Contributor

I'm curious what kind of problems developers could run into, if the timezone changes while the app isn't open anyway.

And how would the breadcrumbs help in that case? A breadcrumb is only logged to Sentry as part of a message or a crash, right? (Please do correct me if I'm wrong, I am a bit of a Sentry noob and never used breadcrumbs before.) So if nothing gets logged after the timezone got changed, that breadcrumb will also never make into Sentry?

@brustolin
Copy link
Contributor

Think about time and date wrong calculation because of timezone changes. Its an edge case, but an easy one to cover ;)

You're kind right about your breadcrumb assumption, if nothing happens the breadcrumb gets lost. But with automatic transactions is almost impossible to have a session that does not send anything to Sentry.

@kevinrenskers
Copy link
Contributor

But would an automatic transaction include such a breadcrumb? And as a developer running into a user with date and time problems, how would I even find that particular transaction or session with that breadcrumb?

@kevinrenskers
Copy link
Contributor

Also I would assume that wrong calculations would only happen if that happens while the app is alive. In 12 years I've never run into such problems if the change happened while the app wasn't alive anyway 🤔

But ok, let's discuss your method by storing things - can we brainstorm on Discuss how to go about doing this? Where to store it, when to check the value, when/how to send it, etc.

@brustolin
Copy link
Contributor

But ok, let's discuss your method by storing things - can we brainstorm on Discuss how to go about doing this? Where to store it, when to check the value, when/how to send it, etc.

Sure, you can call me any time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants