Add b3 trace header as tag

I currently have setup zipkin tracing so all my requests in Django will have the headers:


Is there any way to have these alongside my django trace tags?
My setup is currently just:

sentry_sdk.init(
    dsn=os.environ.get("SENTRY_DSN"),
    integrations=[DjangoIntegration()],
    # If you wish to associate users to errors (assuming you are using
    # django.contrib.auth) you may enable sending PII data.
    send_default_pii=True,
)

Thank you

You can add custom tags using the example provided here: https://docs.sentry.io/enriching-error-data/additional-data/#custom-data

So you could write a Django middleware that takes the header and copies it into a tag.

1 Like