fix: set OTEL traces to disabled by default#4671
Merged
milosgajdos merged 1 commit intodistribution:mainfrom Jul 10, 2025
jcpunk:no-trace-in-container-by-default
Merged
fix: set OTEL traces to disabled by default#4671milosgajdos merged 1 commit intodistribution:mainfrom jcpunk:no-trace-in-container-by-default
milosgajdos merged 1 commit intodistribution:mainfrom
jcpunk:no-trace-in-container-by-default
Conversation
If you want to enable traces, you can still set the env to your collector. Signed-off-by: Pat Riehecky <riehecky@fnal.gov>
Member
|
We might wanna do the for the official image, too https://github.com/distribution/distribution-library-image |
milosgajdos
approved these changes
Jul 9, 2025
Contributor
Author
thaJeztah
approved these changes
Jul 10, 2025
| COPY cmd/registry/config-dev.yml /etc/distribution/config.yml | ||
| COPY --from=binary /registry /bin/registry | ||
| VOLUME ["/var/lib/registry"] | ||
| ENV OTEL_TRACES_EXPORTER=none |
Member
There was a problem hiding this comment.
I don't think anyone else would use this Dockerfile to build with a different default (other than our own use).
If that would be the case, we could add some build-arg in future, e.g. something like;
# DEFAULT_OTEL_TRACES_EXPORTER sets the default OTEL_TRACES_EXPORTER to use
ARG DEFAULT_OTEL_TRACES_EXPORTER=none
ENV OTEL_TRACES_EXPORTER=${DEFAULT_OTEL_TRACES_EXPORTER}Which would allow the default to be set when building the image;
docker build -t foo --build-arg DEFAULT_OTEL_TRACES_EXPORTER=<whatever> .
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This updates the default container invocation to avoid spamming the system logs with failure to send trace data.
I think this resolves #4270 while leaving it easy for folks using this to setup their collectors.