Giter VIP home page Giter VIP logo

Comments (10)

spawnia avatar spawnia commented on July 24, 2024 2

The operation name and type indicate this is definitely version 3. I will begin working on a PR to restore nice serialization of errors right now.

from apollo-link-sentry.

spawnia avatar spawnia commented on July 24, 2024 2

@alesso-x you have some valid points, but could you open discrete issues? I think that would be more productive than us discussing in this closed issue 😉

from apollo-link-sentry.

spawnia avatar spawnia commented on July 24, 2024 1

How about includeFetchResult: 'on-error' as a third option?

from apollo-link-sentry.

DiederikvandenB avatar DiederikvandenB commented on July 24, 2024

Hi, since we recently went through a breaking update, it would be helpful to know which version of the package you're using.

from apollo-link-sentry.

DiederikvandenB avatar DiederikvandenB commented on July 24, 2024

@spawnia it seems like you removed the following code in the rewrite:
https://github.com/DiederikvandenB/apollo-link-sentry/blob/v2.1.0/src/utils.ts#L13-L15

I think adding this back would resolve the issue. At the very least, it will format the error better.

from apollo-link-sentry.

spawnia avatar spawnia commented on July 24, 2024

Serialization of fetchResult seems to be broken in the same way:

image

from apollo-link-sentry.

alesso-x avatar alesso-x commented on July 24, 2024

Thank you @DiederikvandenB @spawnia, I can now see the errors formatted correctly!

Screen Shot 2021-02-18 at 2 05 50 PM

I have a follow up question and it might be a feature request. I can see the error nicely now but if I wanted to see the results I would have to enable includeFetchResult. That config changes all request to show the fetch result but I only want to see it for errors. Could we have a config var to only show fetch results for errors? Or is there another way I could do this on the client side with the transform function? I could also submit a PR if that makes easier. Thank you again!

Screen Shot 2021-02-18 at 2 09 32 PM

from apollo-link-sentry.

alesso-x avatar alesso-x commented on July 24, 2024

How about includeFetchResult: 'on-error' as a third option?

I like that idea

from apollo-link-sentry.

spawnia avatar spawnia commented on July 24, 2024

How does Apollo Client behave when it receives a 200 that also has errors, will it call .error() or .success() on the subscriber? And how should we handle that? I think there is no hard and fast rule to know if those errors are something actionable.

from apollo-link-sentry.

alesso-x avatar alesso-x commented on July 24, 2024

How does Apollo Client behave when it receives a 200 that also has errors, will it call .error() or .success() on the subscriber

I'm not sure, I would need to test it out. For now I'm able to see graphQL errors by adding a breadcrumb in a errorLink. If we could follow that, I think that would work for me.

Screen Shot 2021-02-22 at 11 10 46 AM

Also I had to disable transaction name in the plugin because it would override every error. For example I threw an error in a button and it would set the operation name to the query when the query was successful (the second issue is what it should look like). I think it makes sense to scope many of these options to errors. I have includeQuery enabled for every request.

Screen Shot 2021-02-18 at 9 11 30 PM

For completeness, here is my config for SentryLink. So far this setup is working for me but it would be nice to have all the config in SentryLink instead of a custom errorLink.

const sentryLink = new SentryLink({
  setFingerprint: false,
  setTransaction: false,
  attachBreadcrumbs: {
    includeQuery: true,
    includeError: true,
  },
})

from apollo-link-sentry.

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.