Pick one OTel-based agent instead of per-framework skip checks

Abierto
#1,469 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
10/100
Tipo de issue
Refactorización
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
java

Línea de trabajo

This is design work, so start by resolving the open decision on allowing more than one OTel agent before touching code. The payload names the skip checks in the OpenTelemetry framework (the Elastic service check) and the Splunk framework (the ELASTIC_OTEL_AGENT check), plus the registry that would hold the shared exclusive group. Done means the maintainers agree on the priority rules and the tie-warning behaviour, and the per-framework checks are replaced by them.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Problem

The OTel-based frameworks (OpenTelemetry, Splunk OTel, Elastic OTel) detect themselves independently, so several of them can be installed into the same JVM. This risks duplicate telemetry and conflicting instrumentation. Examples:

Setup Agents installed
OTEL_EXPORTER_OTLP_ENDPOINT set during staging + otel-collector binding Splunk + OpenTelemetry (already on main)
Elastic OTel binding + OTEL_EXPORTER_OTLP_ENDPOINT set during staging Splunk + Elastic OTel
Elastic OTel binding without credentials OpenTelemetry instead of Elastic OTel (name matches otel)
ELASTIC_OTEL_AGENT + otel-collector binding OpenTelemetry + Elastic OTel

Conflicts are currently prevented by skip checks spread across frameworks: OpenTelemetry checks for an Elastic service, and Splunk checks ELASTIC_OTEL_AGENT. Each new OTel distribution adds more of them (see #1360).

Proposal

The OTel-based frameworks share one exclusive group, and each reports how specific its detection was. The registry keeps one of them, in this priority order:

  1. Explicit env selection (ELASTIC_OTEL_AGENT, SPLUNK_OTEL_AGENT)
  2. Specific service binding (elastic-otel, splunk, ...)
  3. Generic signals (an otel name or tag, OTEL_EXPORTER_OTLP_* env vars)

On a tie, the registry logs a warning naming the skipped agents. The existing per-framework skip checks can then be removed.

Non-OTel agents (for example Datadog) are out of scope and keep detecting independently, since running them next to an OTel agent can be intentional.

Related: env vs binding precedence

Elastic OTel lets OTEL_EXPORTER_OTLP_ENDPOINT and OTEL_EXPORTER_OTLP_HEADERS set during staging override the binding values, while OTEL_SERVICE_NAME does not. The order should be the same for all keys and all OTel-based frameworks.

Decisions

  • Allow more than one OTel agent? Proposal: only when more than one is selected explicitly via env (for example both ELASTIC_OTEL_AGENT and SPLUNK_OTEL_AGENT): install all of them and log a warning. Detection by binding or generic signals never installs more than one. Rationale: OpenTelemetry supports a single Java agent per JVM (duplicate spans, competing global instance). The recommended way to send data to multiple backends is a single agent exporting to an OTel Collector that fans out.

Refs #1360

Lenguaje dominante
Go
Estrellas
455
Forks
2.5k
Merge medio
22 h 9 min
PR fusionados (30 d)
69

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de cloudfoundry/java-buildpack

Todos los issues de cloudfoundry/java-buildpack

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.