Skip to content

Add Datadog Propagator automatically to propagators #775

@phillipuniverse

Description

@phillipuniverse

Is your feature request related to a problem?
Feature Request

Describe the solution you'd like
The DatadogFormat exporter includes the DatadogFormat propagator to read in Datadog-specific trace/span information. This is not added as an opentelemetry_propagator entrypoint and is thus not hooked up by default into the CompositePropagator:

https://github.com/open-telemetry/opentelemetry-python/blob/a002f7aedcf48c5329645182bbcf82efc037a3fa/opentelemetry-api/src/opentelemetry/propagate/__init__.py#L134-L139

The easiest solution would be to add the opentelemetry_propagator entrypoint to the Datadog exporter setup.cfg:

This would be the same as how the xray one is instrumented:

[options.entry_points]
opentelemetry_propagator =
xray = opentelemetry.propagators.aws:AwsXRayPropagator

But probably the right solution is the take the DatadogFormat propagator and move it into the propagator package as a a sibling of xray and otrace.

Describe alternatives you've considered

Workaround is to manually set the propagator:

from opentelemetry.propagate import set_global_textmap

set_global_textmap(DatadogFormat())

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions