From abe412751f7d6bbae27a593277639e316a8c3572 Mon Sep 17 00:00:00 2001 From: brettj-newrelic <142850040+brettj-newrelic@users.noreply.github.com> Date: Wed, 14 Feb 2024 07:39:36 -0800 Subject: [PATCH] feat: K8s container synthesis from ksm->otel (#1431) Co-authored-by: rodolfocal --- entity-types/infra-container/definition.yml | 32 +++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/entity-types/infra-container/definition.yml b/entity-types/infra-container/definition.yml index ee98d34e3..e9e1ea751 100644 --- a/entity-types/infra-container/definition.yml +++ b/entity-types/infra-container/definition.yml @@ -35,6 +35,38 @@ synthesis: # and select the dashboard. otel.library.name: entityTagName: instrumentation.name + # kube-state-metrics data via opentelemetry prometheusReceiver + - compositeIdentifier: + separator: ":" + attributes: + - k8s.cluster.name + - namespace + - pod + - container + encodeIdentifierInGUID: true + name: container + conditions: + # kube-state-metrics container prefix + - attribute: metricName + prefix: kube_pod_container_ + # identifier attributes + - attribute: container + present: true + - attribute: pod + present: true + - attribute: namespace + present: true + - attribute: k8s.cluster.name + present: true + # open telemetry + - attribute: newrelic.source + value: 'api.metrics.otlp' + # if service.name is present, handle as one + - attribute: service.name + present: false + # value added for test entities only + - attribute: newrelicOnly + value: "true" tags: newrelic.integrationName: newrelic.integrationVersion: