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

[otel-integration] add k8s metadata to opentelemetry collector metrics #414

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

povilasv
Copy link
Contributor

@povilasv povilasv commented Jun 3, 2024

Description

Fixes ES-221

Currently otel collector metrics are missing metadata because they are statically scraped by ip address, which makes it hard to identify / build dashboard for them.

This makes adjustment to resource attributes before k8sattributes is run, making k8s attributes appear.


otelcol_exporter_queue_size{
cx_application_name="default",
cx_otel_integration_name="coralogix-integration-helm",
cx_subsystem_name="coralogix-opentelemetry-agent",
exporter="coralogix",
host_id="e1429cc2d6d74c80b61d6663fd614ab4",
host_name="172.19.0.2",
http_scheme="http",
job="opentelemetry-collector",
k8s_cluster_name="kind",
k8s_daemonset_name="coralogix-opentelemetry-agent",
k8s_namespace_name="default",
k8s_node_name="kind-control-plane",
k8s_pod_name="coralogix-opentelemetry-agent-5khbh",
net_host_name="172.19.0.2",
net_host_port="8888",
os_type="linux",
service_instance_id="172.19.0.2:8888",
service_name="opentelemetry-collector",
service_version="0.101.0"
}

vs

otelcol_exporter_queue_size{
cx_application_name="otel",
cx_otel_integration_name="coralogix-integration-helm",
cx_subsystem_name="opentelemetry-collector",
exporter="coralogix",
host_id="e1429cc2d6d74c80b61d6663fd614ab4",
host_name="172.19.0.2",
http_scheme="http",
job="opentelemetry-collector",
k8s_cluster_name="kind",
k8s_node_name="kind-control-plane",
net_host_name="172.19.0.2",
net_host_port="8888",
os_type="linux",
service_instance_id="172.19.0.2:8888",
service_name="opentelemetry-collector",
service_version="0.101.0"
}

How Has This Been Tested?

kind cluster

Checklist:

  • I have updated the relevant Helm chart(s) version(s)
  • I have updated the relevant component changelog(s)
  • This change does not affect any particular component (e.g. it's CI or docs change)

@povilasv povilasv force-pushed the add-k8s-metadata branch 6 times, most recently from 1a2e3a1 to 61f0cbf Compare June 4, 2024 09:18
@povilasv povilasv merged commit 83743c4 into master Jun 4, 2024
6 checks passed
@povilasv povilasv deleted the add-k8s-metadata branch June 4, 2024 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants