You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given a configuration similar to the following, would it possible to flow enriched properties to OTEL Resource attributes. For instances, I'd want to be able to set the host.name attribute with the value from WithMachineName.
I think this is ultimately where we're heading, but I'm not sure what the mechanics should be.
Since resource attributes are expected to be static for the life of the application it's a bit of a waste to use an enricher in this case, but on the other hand, it leaves nice friendly-named properties for other sinks to consume 🤔
Resource attributes are also shared across the entire batched OTLP payload, so we'd need to think about what happens when multiple values show up for a RA.
@cecilphillip you can configure the processor at the otel-collector to regroup by whichever labels you wish (groupbyatttrs), which sets the resource labels.
Alternatively, the environment name and machine name are statically read once at startup and cached in those enrichers anyway, so you can just skip the enrichers on the otlp sink and just add them as resource attributes from startup.
I'm not sure it really makes sense for resource attributes to be dynamically read, as OTLP expects those as static for a source's lifetime. The workaround at the otel-collector is easy enough to implement though with a couple of processors to regroup with host name and convert the attribute name to host.name. Or, you can create your own lightweight enricher at the end of the enricher pipeline that converts the property name to dot notation, or converting all non-message properties to dot notation for otlp consistency (I do this with snake case for Loki).
Given a configuration similar to the following, would it possible to flow enriched properties to OTEL Resource attributes. For instances, I'd want to be able to set the
host.name
attribute with the value fromWithMachineName
.The text was updated successfully, but these errors were encountered: