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/k8sattributes] Operator resource attributes #37114

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

zeitlinger
Copy link
Member

@zeitlinger zeitlinger commented Jan 9, 2025

Description

The OTel operator has a set of rules to create resource attributes - which is described here.

This PR allows the collector to create resource attributes with the same logic.

Why

If the operator supplies resource attributes (that are sent with OTLP), it seems redundant that the collector should be able to do the same - it will just overwrite the resource attribute with identical values.

This feature gets interesting if you are not only getting all data from OTLP - but some data elsewhere, e.g. from the file log receiver.

It's crucial to use the same values for resource attributes across signals - this makes correlation possible.
For example, it allows you to find file based the log entries on the same service instance as a trace you're viewing (around the same time).

Alternatives

The same result can be achieved using the transforprocessor - but it's a very long and hard-to-understand configuration.
It that way, it's similar to the container parser.

Testing

Unit tests were added - e2e tests later

Documentation

Added here
This also has a complete config.

Copy link
Contributor

@fatsheep9146 fatsheep9146 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add a changelog and also updating the document to describe how to use this feature?

@zeitlinger zeitlinger changed the title Operator resource attributes [processor/k8sattributes] Operator resource attributes Jan 10, 2025
@zeitlinger
Copy link
Member Author

@fatsheep9146 added changelog and docs

I also tried adding e2e tests - but didn't get it to work. Please advise if/how to do this.

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

Successfully merging this pull request may close these issues.

2 participants