Skip to content

[exporter/datadog] Remove version setting #8783

Closed
@mx-psi

Description

What will change?

The version setting from the Datadog exporter will be removed in favor of using the service.version semantic convention.

Who is affected?

You are affected if you use the version setting from the exporter. If you are affected, a warning will be logged stating that you are using it, together with a link to this issue.

Example warning:

Deprecated: "version" has been deprecated and will be removed in v0.52.0. See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/8783

What should I do if I am affected?

Remove any references to version from your configuration and set the service.version semantic convention on your SDK or using the resource processor instead.

Example using the Go SDK for traces (click to expand)

If using:

# ...
exporters:
  datadog:
    api:
      key: ${DD_API_KEY}
    version: test-version
# ...

You can remove the version setting and set this as a resource on the Go SDK. This is similar to the way one sets service.name, shown on the official example:

First, create a new resource with the service name:

ctx := context.Background()
res, err := resource.New(ctx,
		resource.WithAttributes(
			semconv.ServiceVersionKey.String("test-version"),
		),
	)

Then, pass it to your trace provider builder as an option:

tracerProvider := sdktrace.NewTracerProvider(
                // other options may go here ...
		sdktrace.WithResource(res),	
     )

All language SDKs support setting semantic conventions; if you need help please reach out on the appropriate language SDK repo!

Example using the resource processor (click to expand)

If using:

# ...
exporters:
  datadog:
    api:
      key: ${DD_API_KEY}
    version:  test-version
# ...

You can replace it by using a resource processor, which will override any existing service.name attribute:

processors:
  resource:
     - key: service.version
        value: "test-version"
        action: upsert

# ...
exporters:
  datadog:
    api:
      key: ${DD_API_KEY}
# ...

Lastly, you need to add the resource processor to all your pipelines.

When will it change?

To be filled when this happens

Change description Version of deprecation Version of removal
Removal of version v0.49.0 v0.56.0

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions