You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You are affected if you use the env 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: "env" has been deprecated and will be removed in v0.52.0. See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/9016
What should I do if I am affected?
Remove any references to env from your configuration and set the deployment.environment semantic convention on your SDK or using the resource processor instead.
Example using the Go SDK for traces (click to expand)
You can remove the service 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 environment name:
ctx:=context.Background()
res, err:=resource.New(ctx,
resource.WithAttributes(
// the service name used to display traces in backendssemconv.DeploymentEnvironmentKey.String("test-environment"),
),
)
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 language SDK repo or comment here
Example using the resource processor (click to expand)
What will change?
The
env
setting from the Datadog exporter will be removed in favor of using thedeployment.environment
semantic convention.Who is affected?
You are affected if you use the
env
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:
What should I do if I am affected?
Remove any references to
env
from your configuration and set thedeployment.environment
semantic convention on your SDK or using the resource processor instead.Example using the Go SDK for traces (click to expand)
If using:
You can remove the
service
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 environment name:
Then, pass it to your trace provider builder as an option:
All language SDKs support setting semantic conventions; if you need help please reach out on the language SDK repo or comment here
Example using the resource processor (click to expand)
If using:
You can replace it by using a
resource
processor, which will override any existingservice.name
attribute:Lastly, you need to add the resource processor to all your pipelines.
If you also want to keep
env
as a host tag, you will need to add it to thetags
list.When will it change?
To be filled when this happens
env
The text was updated successfully, but these errors were encountered: