Giter VIP home page Giter VIP logo

Comments (12)

marandaneto avatar marandaneto commented on August 18, 2024 1

@maciejwalkowiak after finishing the PR and docs, let's tackle this.

from develop.

kamilogorek avatar kamilogorek commented on August 18, 2024 1

We let it bubble up to global error handlers and handle it there.

from develop.

marandaneto avatar marandaneto commented on August 18, 2024 1

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
so if the event gets captured by the user or handlers, the event will contain the correct span info.

from develop.

lobsterkatie avatar lobsterkatie commented on August 18, 2024 1

Jus throwing an asterisk in here that once the dynamic sampling stuff goes live, anything about sentry-trace will also be about tracestate, and will therefore involve different methods (getTraceHeaders rather than toSentryTrace, for example). Nothing to do right now, just something to keep in the back of our collective minds.

from develop.

marandaneto avatar marandaneto commented on August 18, 2024 1

Should the SDK raise an event if a 5xx comes? If so what contexts.. If not, how does it propagate context upstream?

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.

from develop.

bruno-garcia avatar bruno-garcia commented on August 18, 2024

@kamilogorek how does this work for XHR and fetch?

from develop.

kamilogorek avatar kamilogorek commented on August 18, 2024

What are you asking about exactly? We do capture breadcrumbs for these, as well as spans when tracing is enabled.

from develop.

marandaneto avatar marandaneto commented on August 18, 2024

@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
Add a breadcrumb
Capture an error if any, do we collect metrics, etc

from develop.

marandaneto avatar marandaneto commented on August 18, 2024

@kamilogorek any input here? thanks

from develop.

kamilogorek avatar kamilogorek commented on August 18, 2024

Uh, sorry, you could ping me way earlier 🥲

For both, XHR and Fetch we:

  • capture span (if tracing enabled - requires @sentry/tracing package)
  • include sentry-trace (if tracing enabled - requires @sentry/tracing package)
  • capture breadcrumbs (success status, response code, url, method - through integration, turned on by default)
  • no additional metrics captured (eg. timings)

from develop.

marandaneto avatar marandaneto commented on August 18, 2024

@kamilogorek forgot about it too ^^

do you captureException(x) if the request throws for some reason? or you let the user to handle that

from develop.

rhcarvalho avatar rhcarvalho commented on August 18, 2024

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.

from develop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.