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
running ddtrace hypercorn ... instead of import ddtrace.auto, but the outcome is the same.
running with just import ddtrace.auto and no TraceMiddleware, but this resulted in context errors.
Problem:
In the generated flamegraphs, the top-level asgi.request span does not register as an error, even when exceptions are raised.
For errors to appear in error tracking, I need the root (top-level) span to reflect the error status.
Ideally, I’d like to have flask.request spans as the root spans for error tracking alongside asgi spans, if possible.
Here’s an example of the current flamegraph output (error span is missing at the top level):
Attempted Solution:
I tried creating a custom exception handler to mark the root span as an error. However, it didn’t work as expected, and the logging statement in my handler wasn’t triggered (suggesting the handler was never called):
Am I missing something in my setup, or is this a known limitation of the ASGI middleware? My end goal is to enable “Error Tracking” for this Flask app. Any guidance would be appreciated.
The text was updated successfully, but these errors were encountered:
I am encountering an issue with error tracking in a Connexion + Flask application using Hypercorn for ASGI, and I haven’t been able to resolve it.
Setup:
I initialize my app with ddtrace.auto and apply the ASGI middleware as shown below:
I also tried:
ddtrace hypercorn ...
instead ofimport ddtrace.auto
, but the outcome is the same.import ddtrace.auto
and noTraceMiddleware
, but this resulted in context errors.Problem:
asgi.request
span does not register as an error, even when exceptions are raised.flask.request
spans as the root spans for error tracking alongside asgi spans, if possible.Here’s an example of the current flamegraph output (error span is missing at the top level):
Attempted Solution:
I tried creating a custom exception handler to mark the root span as an error. However, it didn’t work as expected, and the logging statement in my handler wasn’t triggered (suggesting the handler was never called):
Question:
Am I missing something in my setup, or is this a known limitation of the ASGI middleware? My end goal is to enable “Error Tracking” for this Flask app. Any guidance would be appreciated.
The text was updated successfully, but these errors were encountered: