Skip to content

Add support for tracing origins #1585

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

Closed
philipphofmann opened this issue Jul 5, 2021 · 2 comments · Fixed by #1698
Closed

Add support for tracing origins #1585

philipphofmann opened this issue Jul 5, 2021 · 2 comments · Fixed by #1698
Labels
performance Performance API issues

Comments

@philipphofmann
Copy link
Member

philipphofmann commented Jul 5, 2021

Currently the SentryOkHttpInterceptor adds the sentry-trace HTTP header to every HTTP request. Some HTTP requests are targeting backends that don't have support for the sentry-trace HTTP header. Therefore JavaScript has the concept of tracingOrigins, which is a list of URLs to which the integration should append the sentry-trace HTTP header.

@philipphofmann philipphofmann added the performance Performance API issues label Jul 5, 2021
@philipphofmann
Copy link
Member Author

Related to getsentry/sentry-cocoa#1199.

@bruno-garcia
Copy link
Member

It makes sense that the trace id doesn't need to go to all endpoints an App talks to. Currently it can be filtered with the callback the integration offers but we could look at adding the same options as the browser JS SDK.
Worth noting the browser adds that because of CORS:

You will need to configure your web server CORS to allow the sentry-trace header. The configuration might look like "Access-Control-Allow-Headers: sentry-trace", but the configuration depends on your set up. If you do not allow the sentry-trace header, the request might be blocked.

So we have less of a need here since CORS doesn't apply here.

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

Successfully merging a pull request may close this issue.

2 participants