-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
replace_pattern() OTTL function should allow referencing capturing groups #18610
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This is an interesting use case and doesn't add too much complexity. Using |
Actually it looks like the env var interpolation already eats a single |
hmmmm. Thats pretty annoying and confusing. Did you test this out to confirm? |
Yes, it took me a while debugging it to realize that the single |
I guess we just have to document that behavior in the function's README entry. |
…ern (open-telemetry#18614) Use ReplaceAllString() instead of ReplaceAllLiteralString() to allow referencing matched capture groups in replacement Link to tracking Issue: open-telemetry#18610 Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com>
Component(s)
pkg/ottl
Is your feature request related to a problem? Please describe.
I'd like to rename metrics scraped from certain destinations to better align to naming conventions (for example, replacing dashes with dots, etc.)
My attempt was to use the
transform
processor with OTTL for this capabilityHowever, the
replace_pattern()
OTTL function does not support expanding references to capturing groups.Describe the solution you'd like
I would like
replace_pattern()
OTTL to not support expanding references to capturing groups (usingreplace_pattern()
OTTL function does not support expanding references to capturing groups.).Describe alternatives you've considered
No response
Additional context
Seems tangentially related to #18084
The text was updated successfully, but these errors were encountered: