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

[feature request] [otlp-logs] Drop Exception StackTrace #6068

Open
CodeBlanch opened this issue Jan 16, 2025 · 0 comments
Open

[feature request] [otlp-logs] Drop Exception StackTrace #6068

CodeBlanch opened this issue Jan 16, 2025 · 0 comments
Labels
enhancement New feature or request logs Logging signal related pkg:OpenTelemetry.Exporter.OpenTelemetryProtocol Issues related to OpenTelemetry.Exporter.OpenTelemetryProtocol NuGet package
Milestone

Comments

@CodeBlanch
Copy link
Member

Package

OpenTelemetry.Exporter.OpenTelemetryProtocol

Is your feature request related to a problem?

If an exception is provided on a log it gets written as three attributes in OTLP exporter:

  • logRecord.Exception.GetType().Name -> exception.type
  • logRecord.Exception.Message -> exception.message
  • logRecord.Exception.ToInvariantString() -> exception.stacktrace

exception.stacktrace is particularly expensive in the regard it causes a string allocation and is something largeish which needs to be stored in backends.

It came up in discussion users may not want to pay for this.

We have some settings in GenevaExporter to change the behavior.

Should we have a similar feature in OTLP exporter?

This issue is for tracking demand for such a feature. If you are an interested user, please reply or 👍 this issue.

What is the expected behavior?

Expose an option to opt-out of capturing exception stack trace.

Which alternative solutions or features have you considered?

Users may manually capture exception details today:

logger.LogError("Could not say hello from {food} {price} {exception.type} {exception.message}.", food, price, ex.GetType().Name, ex.Message);

But this isn't a perfect solution because it must be done for every log message with an exception and in the case of library dependencies, it may not be possible to modify them.

Additional context

No response

@CodeBlanch CodeBlanch added enhancement New feature or request needs-triage New issues which have not been classified or triaged by a community member labels Jan 16, 2025
@github-actions github-actions bot added the pkg:OpenTelemetry.Exporter.OpenTelemetryProtocol Issues related to OpenTelemetry.Exporter.OpenTelemetryProtocol NuGet package label Jan 16, 2025
@CodeBlanch CodeBlanch added logs Logging signal related and removed needs-triage New issues which have not been classified or triaged by a community member labels Jan 16, 2025
@CodeBlanch CodeBlanch added this to the Future milestone Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request logs Logging signal related pkg:OpenTelemetry.Exporter.OpenTelemetryProtocol Issues related to OpenTelemetry.Exporter.OpenTelemetryProtocol NuGet package
Projects
None yet
Development

No branches or pull requests

1 participant