-
-
Notifications
You must be signed in to change notification settings - Fork 224
Document in SDK Expected Features
the HTTP integrations
#254
Comments
@maciejwalkowiak after finishing the PR and docs, let's tackle this. |
@kamilogorek how does this work for XHR and |
What are you asking about exactly? We do capture breadcrumbs for these, as well as spans when tracing is enabled. |
@kamilogorek I guess its a general question about what do you do when instrumenting HTTP requests? Start/Finish a span, also include sentry-trace header |
@kamilogorek any input here? thanks |
Uh, sorry, you could ping me way earlier 🥲 For both, XHR and Fetch we:
|
@kamilogorek forgot about it too ^^ do you captureException(x) if the request throws for some reason? or you let the user to handle that |
We let it bubble up to global error handlers and handle it there. |
@marandaneto One thing to pay attention here is what the user expectation is and what the product does. Right now we have a problem that Fetch errors end up linked to the transaction instead of the specific span. Ideally the specific span where an error happened should be the one providing the span context for the error event. |
yep, thats what I've thought as the span is already finished. @rhcarvalho what we do is to keep a WeakRef<Span, Exception> of the Exception, see the okhttp https://github.com/getsentry/sentry-java/blob/main/sentry-android-okhttp/src/main/java/io/sentry/android/okhttp/SentryOkHttpInterceptor.kt#L35 |
Jus throwing an asterisk in here that once the dynamic sampling stuff goes live, anything about |
is missing but as soon as we get some feedback from the Dart integration that also captures events from failed requests, @ueman will include that too. |
In SDK Expected Features we need some guideline of what we expect from integrating with HTTP clients in SDKs, when that's possible.
For example:
category
could be the name of the HTTP integration. Type ishttp
. DocsIf Performance Monitoring is supported by the SDK:
sentry-trace
id to propagate a transaction downstream. Link to specific docs.Link to some examples:
.NET
Java
Python
The text was updated successfully, but these errors were encountered: