Skip to content

fix: Remove glob syntax from tracePropagationTargets example #8312

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

Merged
merged 2 commits into from
Oct 23, 2023

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Oct 23, 2023

As discovered by @lforst in #8267 (comment), we showed an incorrect example for tracePropagationTargets values in the "Usage->Distributed Tracing" page (example). TPT values can only be String.contains matches or regex matches but glob patterns in strings like "https://.*.otherservice.org/.*" are not supported.

This PR removes the glob pattern and adds a regex example to show both types of TPT values.
(Adjusted the one for Astro in #8267)

Note: The same value is used in Flutter and iOS docs but I'm not yet sure if these SDKs support globs or not. Asked in Slack for clarification.

@vercel
Copy link

vercel bot commented Oct 23, 2023

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

Name Status Preview Comments Updated (UTC)
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 23, 2023 10:24am

@Lms24 Lms24 requested a review from lforst October 23, 2023 09:50
Copy link
Contributor

@lforst lforst left a comment

Choose a reason for hiding this comment

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

oh didnt realize we had this more often

Copy link
Contributor

@krystofwoldrich krystofwoldrich left a comment

Choose a reason for hiding this comment

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

I think we can update Apple Regex in a follow-up PR.

@Lms24
Copy link
Member Author

Lms24 commented Oct 23, 2023

I think we can update Apple Regex in a follow-up PR.

Sounds good to me, thanks!

@Lms24 Lms24 merged commit 4a08c1a into master Oct 23, 2023
@Lms24 Lms24 deleted the lms/fix-glob-tpt branch October 23, 2023 10:55
@philipphofmann
Copy link
Member

The fix also makes sense for Apple. If you provide a string it's string.contains. For regexes you have to pass in instances of NSRegularExpression, see https://github.com/getsentry/sentry-cocoa/blob/6001822bc17ecb4afadddc7c29e6b960ab76e9a1/Sources/Sentry/Public/SentryOptions.h#L432-L441 and also https://docs.sentry.io/platforms/apple/configuration/options/#trace-propagation-targets. Thanks @Lms24.

@github-actions github-actions bot locked and limited conversation to collaborators Nov 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants