Skip to content

Add OTEL APM to ES Cluster relationship (staging only)#3084

Open
vagrawal-newrelic wants to merge 1 commit into
newrelic:mainfrom
vagrawal-newrelic:feat/otel-apm-to-es-cluster-relationship-stg
Open

Add OTEL APM to ES Cluster relationship (staging only)#3084
vagrawal-newrelic wants to merge 1 commit into
newrelic:mainfrom
vagrawal-newrelic:feat/otel-apm-to-es-cluster-relationship-stg

Conversation

@vagrawal-newrelic

Copy link
Copy Markdown
Contributor

Summary

  • Adds relationship synthesis rule for OTEL-instrumented APM applications calling Elasticsearch clusters
  • Staging override only (.stg.yml) — not promoted to production
  • Matches on elasticsearch.cluster.name attribute in Span events to build target ELASTICSEARCHCLUSTER entity GUID

How it works

  1. OTEL Java Agent enriches ES spans with elasticsearch.cluster.name (read from ES GET / response)
  2. This rule matches those spans and creates a CALLS relationship to the ES Cluster entity
  3. Entity GUID is built using FARM_HASH on the cluster name (same as entity identifier)

Conditions matched

  • eventType: Span
  • instrumentation.provider: opentelemetry
  • entity.type: SERVICE or APPLICATION
  • db.system: elasticsearch
  • elasticsearch.cluster.name: present

Test plan

  • Validate in staging with test Java app + ES cluster
  • Verify relationship appears in Service Map
  • Verify relationship expires after 75 minutes of no data
  • Test with cluster name change — new relationship should form

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.

@entityBot entityBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't think these changes require an API Review Board (ARB) review, so it is not required to merge this PR. Note that all API changes do require one: if you believe this PR needs an ARB review, please create the ticket and add the ARB:pending label. Reach #api-review-board in case of doubts.

@entityBot
entityBot requested a review from a team July 22, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants