From 20432bb83938894ff9a9647461c497048454ae3d Mon Sep 17 00:00:00 2001 From: vagrawal-newrelic Date: Wed, 22 Jul 2026 19:41:08 +0530 Subject: [PATCH] Add OTEL APM to Elasticsearch cluster relationship (staging) Add relationship synthesis rule for OTEL-instrumented APM applications calling Elasticsearch clusters. Matches on elasticsearch.cluster.name attribute in spans to build target entity GUID. This is a staging-only override (.stg.yml) for validation before promoting to production. --- ...VICE-to-INFRA-ELASTICSEARCHCLUSTER.stg.yml | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 relationships/synthesis/OTEL-SERVICE-to-INFRA-ELASTICSEARCHCLUSTER.stg.yml diff --git a/relationships/synthesis/OTEL-SERVICE-to-INFRA-ELASTICSEARCHCLUSTER.stg.yml b/relationships/synthesis/OTEL-SERVICE-to-INFRA-ELASTICSEARCHCLUSTER.stg.yml new file mode 100644 index 000000000..76f4bcb06 --- /dev/null +++ b/relationships/synthesis/OTEL-SERVICE-to-INFRA-ELASTICSEARCHCLUSTER.stg.yml @@ -0,0 +1,37 @@ +relationships: + # OTEL APM Application calls Elasticsearch Cluster + # Matches on elasticsearch.cluster.name attribute in spans + # Agent reads cluster name from ES GET / response and enriches spans + - name: otelApmCallsElasticsearchClusterByName + version: "1" + origins: + - OpenTelemetry + conditions: + - attribute: eventType + anyOf: ["Span"] + - attribute: instrumentation.provider + anyOf: ["opentelemetry"] + - attribute: entity.type + anyOf: ["SERVICE", "APPLICATION"] + - attribute: db.system + anyOf: ["elasticsearch"] + - attribute: elasticsearch.cluster.name + present: true + relationship: + expires: PT75M + relationshipType: CALLS + source: + extractGuid: + attribute: entity.guid + target: + buildGuid: + account: + attribute: accountId + domain: + value: INFRA + type: + value: ELASTICSEARCHCLUSTER + identifier: + fragments: + - attribute: elasticsearch.cluster.name + hashAlgorithm: FARM_HASH