Repository navigation
RHIDP-0000: fix anonymize_value to not throw when OTEL_SDK_DISABLED is unset #3296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Jdubrick
wants to merge
1
commit into
lightspeed-core:main
Choose a base branch
from
Jdubrick:otel-unset-means-disabled
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+11
−7
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script executed:
Repository: lightspeed-core/lightspeed-stack
Length of output: 31861
Unset
OTEL_SDK_DISABLEDcan leave tracing active without a correlation secret.anonymize_value()returns the length-only placeholder whenever the secret is missing andOTEL_SDK_DISABLEDis not exactly"false". The documented directopentelemetry-instrumentlaunch (README.mdENTRYPOINT, and the design document at lines 300-304) keeps the SDK enabled when the variable is unset. With an exporter configured, equal-length values such asaliceandcarolthen produce the same attribute value, so trace correlation fails silently. The docstring requires an error when the SDK is enabled and the secret is missing.The contracts must agree. Either the no-secret fallback applies only when the SDK is disabled under the same rule the launcher uses, or the docstring and launch documentation must state that active tracing without a secret emits length-only placeholders. The fallback for consumers that do not enable tracing must remain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can only happen when you launch locally without the container image because the entrypoint.sh script in the container image (the official release) handles unset as disabled, whereas opentelemetry-instrument handles it as enabled. It's not a new issue introduced by this change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Analysis chain
Script executed:
Length of output: 36306
@JdubrickYou're right that the official image usesentrypoint.sh, which skips instrumentation whenOTEL_SDK_DISABLEDis unset.The SDK default is not new. The missing-secret behavior is: a direct
opentelemetry-instrumentlaunch previously raisedValueErrorand now returns a length-only placeholder. That also affects the custom container example inREADME.md, which bypassesentrypoint.sh.I won't mark the finding as addressed.
Learnings added
You are interacting with an AI system.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe a case could be made that the
README.mdsection you're referencing is stale since theentrypoint.shchange landed later.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Analysis chain
Script executed:
Length of output: 28236
@JdubrickThat’s possible. I should not have treated the README example as proof that direct instrumentation is still a supported launch path.As the earlier review guidance notes, the official image uses
entrypoint.sh, which skips instrumentation whenOTEL_SDK_DISABLEDis unset. If direct instrumentation is still supported, the missing-secret behavior changes for that path. I can’t establish from the documentation alone whether that path is still supported.Is the direct launch still supported? I’m not marking the finding as addressed while that remains uncertain.
Learnings used
You are interacting with an AI system.