Comments (10)
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.
@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.
How about includeFetchResult: 'on-error'
as a third option?
from apollo-link-sentry.
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.
@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.
Serialization of fetchResult
seems to be broken in the same way:
from apollo-link-sentry.
Thank you @DiederikvandenB @spawnia, I can now see the errors formatted correctly!
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!
from apollo-link-sentry.
How about includeFetchResult: 'on-error' as a third option?
I like that idea
from apollo-link-sentry.
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.
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.
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.
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)
- Question: Possible to only attach breadcrumbs when an error occurs? HOT 1
- Question: recommended way to limit size of breadcrumbs? HOT 1
- excludeGraphQLFetch should remove unsupported fragment definitions HOT 2
- Maintainership of this package HOT 8
- Test usage with subscriptions HOT 3
- Test usage with `apollo-link-error` HOT 2
- Missing dependencies on NextJS build
- Add sentry-trace header HOT 4
- Newest version breaks with react-native HOT 2
- Severity is undefined HOT 4
- Create-React-App warns about missing SourceMap HOT 1
- Remove peer dependencies HOT 1
- Importing apollo-link-sentry package gives 350kb of unwanted and unused code. HOT 5
- Transform function can change response for downstream links HOT 2
- Missing Typescript types for zen-observable in non-dev installation HOT 2
- Remove specific param from gql mutations HOT 1
- Enable `apollo-link-sentry` tree-shaking via ESM HOT 1
- Add the "@sentry/browser" package to the dependencies section in your package.json file, not in devDependencies HOT 3
- Can't use package without supporting esnext
- Sentry v8 compatibility HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apollo-link-sentry.