containerd icon indicating copy to clipboard operation
containerd copied to clipboard

Configure otel from env instead of config.toml

Open cpuguy83 opened this issue 2 years ago • 4 comments

These are standard environment variables described by the otel spec in https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/.

Config options are converted to OTEL envs, but setting from environment overrides the config.

Also since otel will by default try to connect to https://localhost:4318 if no endpoint is set, this will also just disable the otlp plugin when there is no endpoint so we don't have otel continuously trying to connect to the default endpoint, littering the logs with connection failure messages and collecting traces that won't go anywhere.

Closes #8801

cpuguy83 avatar Aug 15 '23 19:08 cpuguy83

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Dec 07 '23 07:12 k8s-ci-robot

I think this makes sense for 2.0. How would we want to backport support for this to 1.6/1.7? We would want to utilize the deprecation warnings there now too.

dmcgowan avatar Dec 07 '23 20:12 dmcgowan

I added a commit which adds those deprecation warnings.

cpuguy83 avatar Jan 26 '24 00:01 cpuguy83

For the failure, update the 1.6 and 1.7 config to match the new default at https://github.com/containerd/containerd/tree/main/integration/client/testdata . I have been adding a comment and keeping the original value so we have documentation of changes to the default configurations from 1.6 and 1.7.

dmcgowan avatar Jan 26 '24 01:01 dmcgowan

ping @AkihiroSuda

fuweid avatar Feb 22 '24 03:02 fuweid