[release/1.6] Configure otel from env instead of config.toml#9993
[release/1.6] Configure otel from env instead of config.toml#9993estesp merged 4 commits intocontainerd:release/1.6from
Conversation
|
Hi @vvoland. Thanks for your PR. I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
b80258b to
cde2b1c
Compare
|
@vvoland would you please rebase it and repush ? thanks |
Refractor newExporter and newTracer, add unit tests to them This PR is part of issue 7493 Signed-off-by: Tony Fang <[email protected]> (cherry picked from commit 8472946) Signed-off-by: Paweł Gronowski <[email protected]>
Signed-off-by: Brian Goff <[email protected]> (cherry picked from commit 753a525) Signed-off-by: Paweł Gronowski <[email protected]>
These are standard environment variables described by the otel spec in https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/. The old config options are removed 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. Signed-off-by: Brian Goff <[email protected]> (cherry picked from commit 4fbc984) Signed-off-by: Paweł Gronowski <[email protected]>
Signed-off-by: Paweł Gronowski <[email protected]>
cde2b1c to
86a1a3a
Compare
|
Rebased (some workflows failed due to network flakiness though). |
|
/ok-to-test |
|
/retest |
1 similar comment
|
/retest |
| if plugin.IsSkipPlugin(err) { | ||
| log.G(ic.Context).WithError(err).Infof("skipping tracing processor initialization (no tracing plugin)") | ||
| } else { | ||
| log.G(ic.Context).WithError(err).Errorf("failed to initialize a tracing processor %q", id) |
There was a problem hiding this comment.
do we need to fastfail here since it's not skipable error?
fuweid
left a comment
There was a problem hiding this comment.
LGTM
It's just backport and no need to change logic.
Thanks
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.
(not a clean cherry-pick)