Comments (2)
We're running into some issues with apollo-link-error
that might fit under this issue, although please let me know if you think it might be better as a standalone.
We have the following structure for our links:
ApolloLink.from([
errorLink,
retryLink,
new SentryLink({...}),
httpLink,
]),
The SentryLink is immediately preceding the terminating httpLink, and between it and the errorLink. This is intentional - we were hoping that the sentry link would report to sentry before the error link executes.
In our error link, we want to automatically capture network and graphql errors and report them to sentry.
We do not report to Sentry in our product code as part of a catch
block after executing a mutation - it is automatically handled by the error link
The error link looks something like this:
if (errorResponse.networkError) {
Sentry.Native.captureException(errorResponse.networkError);
} else if (errorResponse.graphQLErrors?.length) {
for (const err of errorResponse.graphQLErrors) {
Sentry.Native.captureMessage(
err.message,
Sentry.Native.Severity.Error
);
}
}
When an error occurs, the ErrorLink successfully reports to Sentry. And in the Sentry alert, we see all the breadcrumbs from apollo-link-sentry
of previous graphql requests.
However, we do not actually see a breadcrumb of the request that has the error. This is super unfortunate because that's breadcrumb we want to see the most!
It seems like SentryLink will only call attachBreadcrumbToSentry
after the ErrorLink has completed. Meaning that we won't see this information in the history because captureMessage
is called before attachBreadcrumbToSentry
For our use case, we were hoping that attachBreadcrumbToSentry
would be called in the next
block and not wait until complete
. However, I'm not sure if this interferes with other use cases of the library.
Let me know if this is something you think apollo-link-sentry could support!
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
- 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.