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

feat(apple): Add enableTracingWhenCrashing #11732

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

philipphofmann
Copy link
Member

DESCRIBE YOUR PR

Add docs for the new option enableTracingWhenCrashing.

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.

  • Urgent deadline (GA date, etc.):
  • Other deadline:
  • None: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it.
    Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

Add docs for the new option enableTracingWhenCrashing.
@philipphofmann philipphofmann requested a review from a team November 5, 2024 09:46
Copy link

vercel bot commented Nov 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
changelog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 5, 2024 2:15pm
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 5, 2024 2:15pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
develop-docs ⬜️ Ignored (Inspect) Nov 5, 2024 2:15pm

Copy link

codecov bot commented Nov 5, 2024

Bundle Report

Changes will decrease total bundle size by 15 bytes (-0.0%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sentry-docs-server-cjs 8.58MB 9 bytes (-0.0%) ⬇️
sentry-docs-client-array-push 8.94MB 6 bytes (-0.0%) ⬇️

@@ -271,3 +271,15 @@ String entries do not have to be full matches, meaning the URL of a request is m
If <PlatformIdentifier name="trace-propagation-targets" /> is not provided, trace data is attached to every outgoing request from the instrumented client.

</ConfigKey>

<ConfigKey name="enable-tracing-when-crashes">
Copy link
Member

@cleptric cleptric Nov 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a very odd name in light of us removing enableTracing from the SDKs.
I'm also curious how this is implemented.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing that out. Naming is hard 😅. It's basically finishing transactions bounded to the scope when an app crashes. The code is here getsentry/sentry-cocoa#4504.

I also considered enableCrashTracing and enableTracingCrashes but that's closer to tracing actual crashes, which the SDK already does. And I have a typo there. It should be enableTracingWhenCrashing. Is it still odd?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@philipphofmann do we need a flag for this actually? That's the default behavior on android. Does it introduce any unwanted side-effects?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, so this will only work if tracing is actually enabled, and will then persist the transaction to disc?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it introduce any unwanted side-effects?

Maybe yes. Other signal handlers might be effected, and the app can get stuck after writing the crash report to disk. So my plan is to make this the default behaviour, but for now it should be an experimental feature.

Ok, so this will only work if tracing is actually enabled, and will then persist the transaction to disc?

Yes, indeed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, but then it does not enable tracing. So I would suggest we call it something less confusing, like persistTracesOnDiscIfCrashed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We prefix everything with enable in the Cocoa SDK, so I would like to keep that pattern. What about enablePersistingTracesWhenCrashing, @cleptric?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also ok

Copy link
Collaborator

@coolguyzone coolguyzone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for the addition!

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

Successfully merging this pull request may close these issues.

5 participants