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

Update log transformer to set logger.name #411

Open
IGx89 opened this issue Dec 5, 2024 · 0 comments
Open

Update log transformer to set logger.name #411

IGx89 opened this issue Dec 5, 2024 · 0 comments

Comments

@IGx89
Copy link

IGx89 commented Dec 5, 2024

Hello! I've been doing A/B comparisons between sending logs from my .NET app to Datadog using the Datadog SDK and the OpenTelemetry SDK. Once difference is that logs from the Datadog SDK (technically console out JSON parsing by the Datadog agent) have a "Logger Name" box under Event Attributes indicating the name of the logger (full class name with namespace) while that is missing when using the OpenTelemetry SDK.

After reading through docs and source code, I believe that data is missing due to the log transformer here ignoring that data. In https://github.com/DataDog/opentelemetry-mapping-go/blob/pkg/otlp/logs/v0.21.0/pkg/otlp/logs/translator.go#L73 it gets ScopeLogs which contains the logger name (ScopeLogs.Scope().Name()) but the code never calls that method. It should ideally call that method and then store it in AdditionalProperties["logger.name"] on the HTTPLogItem object (best I can tell).

Could that data be passed through so we're able to query our logs by logger name when using the OpenTelemetry SDK?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant