Skip to content

Commit

Permalink
Patch distributed tracing for new instrumentation point
Browse files Browse the repository at this point in the history
  • Loading branch information
TimPansino committed Apr 18, 2024
1 parent 2827f7b commit 6a56363
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion newrelic/hooks/application_celery.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ def _application():
# Headers on earlier versions of Celery may end up as attributes
# on the request context instead of as custom headers. Handler this
# by defaulting to using vars() if headers is not available
headers = getattr(wrapped.request, "headers", None) or vars(wrapped.request)
request = instance.request
headers = getattr(request, "headers", None) or vars(request)

settings = transaction.settings
if headers is not None and settings is not None:
Expand Down

0 comments on commit 6a56363

Please sign in to comment.