Expand description

OpenTelemetry Datadog Exporter for Cloudflare

An OpenTelemetry datadog exporter implementation for Cloudflare

Quirks

There are currently some incompatibilities between Datadog and OpenTelemetry, and this manifests as minor quirks to this exporter.

Firstly Datadog uses operation_name to describe what OpenTracing would call a component. Or to put it another way, in OpenTracing the operation / span name’s are relatively granular and might be used to identify a specific endpoint. In datadog, however, they are less granular - it is expected in Datadog that a service will have single primary span name that is the root of all traces within that service, with an additional piece of metadata called resource_name providing granularity. See here

The Datadog Golang API takes the approach of using a resource.name OpenTelemetry attribute to set the resource_name. See here

Unfortunately, this breaks compatibility with other OpenTelemetry exporters which expect a more granular operation name - as per the OpenTracing specification.

This exporter therefore takes a different approach of naming the span with the name of the tracing provider, and using the span name to set the resource_name. This should in most cases lead to the behaviour that users expect.

Datadog additionally has a span_type string that alters the rendering of the spans in the web UI. This can be set as the span.type OpenTelemetry span attribute.

For standard values see here

Bring your own http client

Users can choose appropriate http clients to align with their runtime.

Based on the feature enabled. The only client available is surf, feel free to implement other http clients.

Note that async http clients may need specific runtime otherwise it will panic. User should make sure the http client is running in appropriate runime.

Users can always use their own http clients by implementing HttpClient trait.

Structs

Datadog span exporter

Builder for ExporterConfig struct.

Extracts and injects SpanContexts into Extractors or Injectors using Datadog’s header format.

Enums

Wrap type for errors from opentelemetry datadog exporter

Functions

Create a new Datadog exporter pipeline builder.