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

Respect nested/structured log format instead of flattening attributes #405

Open
jackgopack4 opened this issue Oct 15, 2024 · 0 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@jackgopack4
Copy link

jackgopack4 commented Oct 15, 2024

Currently, OTLP logs are transformed via pkg/otlp/logs.Translator.MapLogs(...)

This maps any key/value pairs in the log to AdditionalProperties in the datadog V2 API which, as of v2.31 requires map[string][string].

Currently, arrays in nested logs are "flattened" via a flattenAttributes function introduced by the fix for open-telemetry/opentelemetry-collector-contrib#26382. This maps Attributes from OTLP logs to map<string, string>. However, this does not align with the OpenTelemetry Logs Data Model which specifies attributes should be type map<string,any>. Nested maps are currently handled appropriately; this change is only necessary to properly support arrays in nested logs

Relates to DataDog/datadog-agent#28598

@jackgopack4 jackgopack4 added the bug Something isn't working label Oct 15, 2024
@jackgopack4 jackgopack4 changed the title Add ability to respect format of structured logs Respect nested/structured log format instead of flattening attributes Oct 15, 2024
@jackgopack4 jackgopack4 self-assigned this Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant