-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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] Add a String method to the Path interface #29922
Comments
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
**Description:** Improve OTTL context error messages when an unknown path is used. The new error message will look like: ``` Error: invalid configuration: processors::transform: unable to parse OTTL statement "set(attributes[\"test\"], trace_id.hex)": error while parsing arguments for call to "set": invalid argument at position 1: trace_id.hex is not a valid path for the Span context - review https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/contexts/ottlspan to see all valid paths ``` **Link to tracking Issue:** <Issue number if applicable> Related to #29871 Closes #29922 **Testing:** <Describe what testing was performed and which tests were added.> Unit tests --------- Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com>
**Description:** Improve OTTL context error messages when an unknown path is used. The new error message will look like: ``` Error: invalid configuration: processors::transform: unable to parse OTTL statement "set(attributes[\"test\"], trace_id.hex)": error while parsing arguments for call to "set": invalid argument at position 1: trace_id.hex is not a valid path for the Span context - review https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/contexts/ottlspan to see all valid paths ``` **Link to tracking Issue:** <Issue number if applicable> Related to open-telemetry#29871 Closes open-telemetry#29922 **Testing:** <Describe what testing was performed and which tests were added.> Unit tests --------- Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com>
Make a
Path.String
method that converts the Path back into the string representation (e.g.context.specific.path
). This will make error messages clearer.Originally posted by @evan-bradley in #29897 (comment)
The text was updated successfully, but these errors were encountered: