-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError in elasticapm.context.contextvars #2056
Comments
Thanks for reporting, could you provide the stacktrace please? Feel free to remove any eventual information you don't want to share from the file paths. |
Thanks for getting back so quickly, see a recent stack trace attatched:
|
Is this log coming from celery workers right? What kind of workers are you using? |
It is celery yeah, we are using prefork workers |
@jahendry what version of python are you using? |
Hey, We're using 3.11, specifically this image here |
Thanks, which tag? It's interesting to check the micro version too. |
Ah sorry, it's 3.11.9 |
…xtVars to avoid accidentally trying to merge a None with a tuple of Spans Related to elastic#2056
We also face a similar issue, it seems to happen when exceptions are raised and aren't properly caught - not sure if that's the exact reason, this is what I gather from our sentry events.
I've created a pull request that'd handle the case where |
I'm getting an unhandled TypeError from the set span method of the
elasticapm.context.contextvars.ContextVar
hereThe
spans
variable is of typeNone
and is throwing an unhandled exception.I have been unable to find the root causes on this as it is happening in production sporadically without a clear way to reproduce it.
We are running this within a django/celery app with the following version numbers
django: 3.2.24
celery: 5.3.6
apm-agent-python: 6.20.0
Could we possibly add some type guards within this method or exception handling for this case?
Thanks,
Jamie
The text was updated successfully, but these errors were encountered: