-
Notifications
You must be signed in to change notification settings - Fork 151
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
Capture some pod labels by default #189
Comments
Hi @mtwo By default, at least for metrics, we do capture labels as signalfx properties that are synced onto resource UID dimensions. For example, for pod labels we sync this onto the The way this works in the code (since this is undocumented sort of I'll write some of this out) is that a receiver may implement a metadata exporter. The Signalfx exporter implements a consume metadata function which ends up exporting this metadata to our backend. This is enabled by default in our chart already. Specifically for pod labels, you can see this is added here along with some other properties, such as the owners reference of the pod (e.g. Daemonset, StatefulSet ...) We do not capture annotations at this time, that would be an enhancement to the k8sclusterreceiver in contrib. |
This change is the first step towards moving away from fluentd logs collection. Fluentd "kubernetes_metadata_filter" plugin is known as a performance bottleneck in k8s logs collection with fluentd. So moving away from it already gives performance benefits. Also it mitigates issues when fluentd ends up hammering k8s API. This change is compatible with otel gateway, if `otelCollector.enabled=true` all logs are forwarded through the gateway and logs enrichment is happening there reducing load on k8s API. Drawbacks: - `container.image.name` logs attribute cannot be provided at the moment until this issue is resolved: open-telemetry/opentelemetry-collector-contrib#5235 Additional changes: - Extra attribute added by default `k8s.pod.labels.app`. Value for this attribute is taken from pod's "app" label if it's set. The change is needed to support istio use case. We also want to enable more of these attributes going forward #189.
* Move k8s metadata enrichment from fluentd to otel-collector This change is the first step towards moving away from fluentd logs collection. Fluentd "kubernetes_metadata_filter" plugin is known as a performance bottleneck in k8s logs collection with fluentd. So moving away from it already gives performance benefits. Also it mitigates issues when fluentd ends up hammering k8s API. This change is compatible with otel gateway, if `otelCollector.enabled=true` all logs are forwarded through the gateway and logs enrichment is happening there reducing load on k8s API. Drawbacks: - `container.image.name` logs attribute cannot be provided at the moment until this issue is resolved: open-telemetry/opentelemetry-collector-contrib#5235 Additional changes: - Extra attribute added by default `k8s.pod.labels.app`. Value for this attribute is taken from pod's "app" label if it's set. The change is needed to support istio use case. We also want to enable more of these attributes going forward #189.
Closing this issue as inactive. Please reopen if this is still being worked on. |
A common use case that I've heard at customer meetings is applying a common set of pod labels as dimensions / annotations on metrics, traces, and logs. Users can custom-define these labels, and there are often too many to efficiently apply all of them, but it would be nice if the Collector captured some common / built-in ones. For example, Datadog's agent does a nice job of this: https://docs.datadoghq.com/agent/kubernetes/tag/?tab=containerizedagent
The text was updated successfully, but these errors were encountered: