[processor/transform] Add debug log that prints current TransformContext #31912
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
priority:p2
Medium
processor/transform
Transform processor
Component(s)
processor/transform
Is your feature request related to a problem? Please describe.
We see a lot of transformprocessor questions that boil down to the data being manipulated looking slightly different in the collector than it does in backends, leading to incorrect OTTL statements. What we do now is ask users to add debugexporters to their pipelines and view the output. This works, but is extra steps.
Describe the solution you'd like
It would be nice if, when the
service.telemetry.logs.level=debug
, the transformprocessor printed out a log that contained the details of the currentTransformContext
. This is essentially the some result as using the debugexporter, but doesn't require configuring any extra components and is much more targeted to just the transformprocessor's data.I experiment with this idea briefly and it isn't difficult to get a logger to the right place in the transformprocessor. The hard part is getting the underlying
pdata
structs to print nicely. I believe eachTransformContext
type will need aString() string{}
that returns the string representation of theTransformContext
.Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: