Skip to content

[receiver/loki] Add support of structured metadata #40095

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

Closed
mar4uk opened this issue May 15, 2025 · 1 comment · Fixed by #40096
Closed

[receiver/loki] Add support of structured metadata #40095

mar4uk opened this issue May 15, 2025 · 1 comment · Fixed by #40096
Labels
enhancement New feature or request receiver/loki

Comments

@mar4uk
Copy link
Contributor

mar4uk commented May 15, 2025

Component(s)

receiver/loki

Is your feature request related to a problem? Please describe.

The loki receiver component ingests data in Loki format. If data contains structured metadata, it is currently not being translated to OTLP and is dropped

Describe the solution you'd like

Add support for structured metadata. It should be present in the OTLP representation as log record attributes

Describe alternatives you've considered

No response

Additional context

The initial feature request #29634. It was mostly about loki exporter.
We are not going to add structured metadata support to the loki exporter, but loki receiver shouldn't drop structured metadata

@mar4uk mar4uk added enhancement New feature or request needs triage New item requiring triage labels May 15, 2025
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@iblancasa iblancasa removed the needs triage New item requiring triage label May 16, 2025
songy23 pushed a commit that referenced this issue May 20, 2025
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Added support for [Structured
Metadata](https://grafana.com/docs/loki/latest/get-started/labels/structured-metadata/).
If Structured Metadata is present in the loki log entry it will be
converted to Log Record Attributes

<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes
#40095

<!--Describe what testing was performed and which tests were added.-->
#### Testing
Added a unit test to verify the translation of Structured metadata to
log record attributes

Co-authored-by: Antoine Toulme <[email protected]>
dragonlord93 pushed a commit to dragonlord93/opentelemetry-collector-contrib that referenced this issue May 23, 2025
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Added support for [Structured
Metadata](https://grafana.com/docs/loki/latest/get-started/labels/structured-metadata/).
If Structured Metadata is present in the loki log entry it will be
converted to Log Record Attributes

<!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes
open-telemetry#40095

<!--Describe what testing was performed and which tests were added.-->
#### Testing
Added a unit test to verify the translation of Structured metadata to
log record attributes

Co-authored-by: Antoine Toulme <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request receiver/loki
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants