Skip to content
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

[processor/transform] Add debug log that prints current TransformContext #31912

Closed
TylerHelmuth opened this issue Mar 22, 2024 · 3 comments
Closed
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

Comments

@TylerHelmuth
Copy link
Member

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 current TransformContext. 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 each TransformContext type will need a String() string{} that returns the string representation of the TransformContext.

Describe alternatives you've considered

No response

Additional context

No response

@TylerHelmuth TylerHelmuth added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers priority:p2 Medium processor/transform Transform processor labels Mar 22, 2024
Copy link
Contributor

Pinging code owners for processor/transform: @TylerHelmuth @kentquirk @bogdandrutu @evan-bradley. See Adding Labels via Comments if you do not have permissions to add labels yourself.

@TylerHelmuth
Copy link
Member Author

@dmitryax are there any existing patterns for converting a ptrace.span to a string? I see https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/internal/otlptext but it appears to work only on the top-level data slices for all 3 signals.

@TylerHelmuth
Copy link
Member Author

Duplicate of #30932

@TylerHelmuth TylerHelmuth marked this as a duplicate of #30932 Apr 2, 2024
@TylerHelmuth TylerHelmuth closed this as not planned Won't fix, can't repro, duplicate, stale Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

1 participant