Skip to content

otel configuration from env vars #8801

@cpuguy83

Description

@cpuguy83

What is the problem you're trying to solve

In #8645 we added support for configuring otel from env var, mainly by getting out of the way and letting otel configure itself.
In the PR I hinted that maybe the default behavior of connecting to localhost (default in otel) may not be desirable... I kind of expected some discussion around this but that didn't happen.

While adding tracing support in docker we did end up having this discussion and basically came to the conclusion that this is indeed not desirable given that we are (typically) a system service and connecting to an unprivileged port without configuration and sending potentially sensitive information to it (although the default is to use HTTPS, so probably not awful assuming the client checks certs).

Describe the solution you'd like

We're still having that discussion downstream in docker, but this is the current solution:

https://github.com/cpuguy83/docker/blob/4196286d6a3750f7c01a6c23db5984683bbbbaff/cmd/dockerd/tracing.go#L19-L128

Note that is not currently merged, its from my fork for moby/moby#45652

Basically otel defines a bunch of vars and the referenced change looks to see if those env vars are explicitly set instead of letting otel do whatever with them.

Additional context

Basically just opening this to have that discussion in containerd, and to block 2.0 until that discussion happens.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions