Skip to content

Reading traceparent from request headers #2317

Open
@matHope

Description

@matHope

In my API when testing passing traceparent via request headers, the traceparent header was not being picked up and subsequently a new one was being generated.

It appears to be that when __call__ is triggered (Due to a request) in the ASGITracingMiddleware the headers are read as bytes rather than a string and as a result when attempting to match the header name in the headers it will evaulate as false, resulting in None being returned. Here is the code i'm referring to - https://github.com/elastic/apm-agent-python/blob/main/elasticapm/utils/disttracing.py#L142

Not sure if this is intentional or not, and if so if there's any workarounds here, I've not found anything in your docs with regards to configuration at least 🤔

In my API I am using ASGITracingMiddleware for a quart application.

Please let me know if you need anymore information

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions