-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[pkg/ottl] Validate that all path elements are used #30042
Merged
TylerHelmuth
merged 5 commits into
open-telemetry:main
from
TylerHelmuth:ottl-valid-path-used
Dec 18, 2023
Merged
[pkg/ottl] Validate that all path elements are used #30042
TylerHelmuth
merged 5 commits into
open-telemetry:main
from
TylerHelmuth:ottl-valid-path-used
Dec 18, 2023
Conversation
This file contains 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
TylerHelmuth
requested review from
bogdandrutu and
evan-bradley
as code owners
December 18, 2023 17:09
TylerHelmuth
changed the title
Validate that all path elements are used
[pkg/ottl] Validate that all path elements are used
Dec 18, 2023
TylerHelmuth
force-pushed
the
ottl-valid-path-used
branch
from
December 18, 2023 17:13
f4037b9
to
17a6ff1
Compare
evan-bradley
approved these changes
Dec 18, 2023
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 is great stuff, nice work.
Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com>
evan-bradley
approved these changes
Dec 18, 2023
cparkins
pushed a commit
to AmadeusITGroup/opentelemetry-collector-contrib
that referenced
this pull request
Jan 10, 2024
…0042) **Description:** Updates OTTL to be able to detect when a context has not used all parts of a path and its keys. It only validates that each path/key was grabbed - it cannot validate that the context used the value "correctly". An example error message, taken from the unit test, looks like: ``` error while parsing arguments for call to "testing_getsetter": invalid argument at position 0: the path section "not-used" was not used by the context - this likely means you are using extra path sections ``` **Link to tracking Issue:** Closes open-telemetry#22744 **Testing:** Added new unit tests --------- Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com>
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.
Description:
Updates OTTL to be able to detect when a context has not used all parts of a path and its keys. It only validates that each path/key was grabbed - it cannot validate that the context used the value "correctly".
An example error message, taken from the unit test, looks like:
Link to tracking Issue:
Closes #22744
Testing:
Added new unit tests