Skip to content

[Bug]: duplicate header values through psr/http-message & psr/http-client with curl #3132

Open
@mrtus

Description

@mrtus

Bug report

When a request is comes in from RUM, the headers x-datadog-<x> are added already on the request.
When such a request is reused & forwarded to a next service, those headers will still be there.

However, when the request is used and converted to a curl call to the next service, the datadog context values are added again, creating a comma separated header value with duplicate values.

Example:
Image

The next service then tries to parse these headers but fails and creates a new trace root.

Given that the tracing should mostly require no code changes to codebases, I would assume we shouldn't have to strip these headers ourselves to ensure a smooth tracing.

Would it be a fix to replace these header values instead of appending them?

Thanks!

PHP version

8.3

Tracer or profiler version

1.5.1

Installed extensions

No response

Output of phpinfo()

No response

Upgrading from

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions