Connect multiple Node.js Integrations to a single transaction #9744
Unanswered
cabbageground
asked this question in
Q&A
Replies: 1 comment 1 reply
-
In Sentry's current performance model you'll always need a transaction to attach spans to. You shouldn't need to create child spans, just the transaction for the request, the integrations should take care of attaching child spans. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I'm using the self-hosted version in a Node.js environment, which uses various libraries.
ApolloGraphQL, Elastic client for Node.js and Prisma ORM.
I'd like, for each request to the Apollo server, to create a transaction which will include all the events occurred during that request.
This includes:
etc.
I've managed to integrate Sentry with the built-in integrations (GQL, Apollo, Prisma). But the problem is that every individual query through Prisma, or an Axios request, etc - is registered as a single defined Transaction, instead of merging all these events as spans connected to a single Transaction.
I've then removed the integrations, and implemented it myself by starting a Transaction on each Apollo request and creating a child span in each library's middlewares. This did solve the problem, but I wonder if there is something that I'm missing, or if there an automated way to do so, with less explicit span creation, etc.
I'm a fairly new user of Sentry, so any info will be appreciated :)
Beta Was this translation helpful? Give feedback.
All reactions