elastic / elastic-otel-java

Apache License 2.0
8 stars 7 forks source link

[Config] Add Global Labels #302

Closed jackshirazi closed 32 minutes ago

jackshirazi commented 4 days ago

Classic agent link

What it does

Labels added to all events, with the format key=value[,key=value[,...]]. Any labels set by application via the API will override global labels with the same keys. The server sees labels.key=value attributes

Implementation difficulty, location, and dynamism

felixbarny commented 4 days ago

Isn't OTEL_RESOURCE_ATTRIBUTES the equivalent for this in the OTel world?

jackshirazi commented 4 days ago

Yes, you're right. @akhileshpok please can you feedback on whether this needs to be a dynamically alterable capability, or if the static already existing otel implementation is sufficient

felixbarny commented 4 days ago

For reference, global_labels isn't a dynamic config option, either.

SylvainJuge commented 2 days ago

Another benefit of using otel resource attributes for implementation is that it would allow to provide a cross-platform compatibility, we just have to formally have a specification on the resource attribute key and properly map it into our data model on ingest.