You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running a Mastra agent in an environment with Sentry for error monitoring the interop crashes on tracing interactions. It is not possible to disable tracing in Mastra and overriding it with a dummy handler results in not getting any responses and no api calls being made.
This is the dummy config we built:
I've been looking into this and have 1 very bad workaround:
Initializing sentry with skipOpenTelemetrySetup: true, will skip the invalid spans from being picked up. Obviously this will also drop all other spans so tracing will no longer work correctly in sentry.
I think there are 2 major issues here:
Disabling tracing does not actually disable any collection of spans. This is due to the decorator setup and the global telemetry configuration
Invalid spans are being registered. I think this is due to BaggageTracer but I don't really see why the opentelemetry data is structured differently from what sentry expects.
Describe the Bug
When running a Mastra agent in an environment with Sentry for error monitoring the interop crashes on tracing interactions. It is not possible to disable tracing in Mastra and overriding it with a dummy handler results in not getting any responses and no api calls being made.
This is the dummy config we built:
The error we get is:
The sentry source where this fails can be found in: https://github.com/getsentry/sentry-javascript/blob/5c4cab7b34c736ecd5c029048ba14181dabaaa9f/packages/opentelemetry/src/propagator.ts
Full thread can be found in discord: https://discord.com/channels/1309558646228779139/1350044378357563415
Steps To Reproduce
We added an example gist here: https://gist.github.com/ljobse/ca4fe4cc404c881782e51922d64cd428
Expected Behavior
Environment Information
@mastra/core@0.4.4
Node@20.12.0
Component
Integrations
Code Snippet
Error Logs
Additional Context
No response
Verification
The text was updated successfully, but these errors were encountered: