-
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
Provide a "SED-like" mechanism to "find and replace" characters in a log record. #7396
Comments
@bogdandrutu, @anuraaga, is this something the transform processor should take care of? |
Bump. Any progress on transform processor? Would be really handy to have the |
Hi @jpkrohling sorry for not responding to the question - yes replacement, possibly with SED syntax or something equivalent, is a function we'd want in the transform processor. @matthewmodestino Sorry for the delay, just sent #8972 with a big step in being able to add logs support |
Sweet! In the logs signal, we would likely need to apply this conditionally,ie. based on resource or attribute values. Looking forward to seeing how this turns out! |
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 |
Bump. Still need this. |
@kovrus, @TylerHelmuth, is this doable today with OTTL? |
Pinging code owners: @TylerHelmuth @kentquirk @bogdandrutu @evan-bradley. See Adding Labels via Comments if you do not have permissions to add labels yourself. |
@matthewmodestino checkout the transform processor and the function replace_pattern. Does that fit your needs? |
👍 |
Will give it a shot! Thanks! |
@matthewmodestino I'm going to close this based on the transform processor's capabilities. Please ping me if you think it should stay open. |
Sounds good, been meaning to circle back and test. Will hit you up if need be. Thanks! |
…pace on device (open-telemetry#7396) * add full storage test for persistent storage * improve no disk space handling in persistent storage * review fixes * review fixes
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
As an OTel native logging user, I need a way to "find and replace" characters that may exist in the original log record that I don't want/need in the logging backend. This can be useful to anonymize info, but also to make log records more usable in logging backends.
My current example is removing ANSI colour codes from my log files...
Describe the solution you'd like
A clear and concise description of what you want to happen.
I want to define a SED command processor to find and replace the ANSI colour codes, or any other characters in the log record, as I see fit. Something like:
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
I looked through existing OTel processors but I only see REGEX based ones, and none that make it easy to achieve "find and replace" in existing log pipelines
Additional context
Add any other context or screenshots about the feature request here.
Sometimes kubernetes or application logs will use colour codes to make pretty printing when viewed in a terminal, or may include strings that need to be anonymized or replaced to make the log more usable by the user in the logging backend.
The text was updated successfully, but these errors were encountered: