eclipse-tractusx / tractusx-edc

Apache License 2.0
35 stars 50 forks source link

Usage of proprietary Azure OpenTelemetry Distro #1370

Closed ank19 closed 2 days ago

ank19 commented 3 weeks ago

Some time ago @paullatzelsperger suggested a workaround in order to be able to use the proprietary Azure OpenTelemetry Distro instead of the provided one. The background is, that, to my knowledge, the usage of the proprietary distro is the recommended approach on Azure.

The suggested workaround, basically consisting of a Docker multistage build, simply overwriting the opentelemetry-javaagent.jar with the applicationsinsights-agent.jar to match "-javaagent:/app/opentelemetry-javaagent.jar" without the need to overwrite the Docker entrypoint, worked fine until Microsoft released 3.5.x-version of their OpenTelemetry Distro.

The problem now is that I get a java.lang.NoClassDefFoundError: io/prometheus/metrics/model/registry/MultiCollector. I can only guess that Microsoft doesn't provide the Prometheus dependencies anymore, as they're using their own exporter, or that they now started to heed the system property "-Dotel.metrics.exporter=prometheus" from now on, which is part of the Docker entrypoint command line, or whatever.

My question: Is there a reason that the Docker files specify these values as system properties, fixing OTEL to Prometheus?

"-Dotel.metrics.exporter=prometheus"
"-Dotel.exporter.prometheus.port=9090"

The problem with that is that the system properties take precedence, so I'm not able to change that part without overwriting the Dockerfile entrypoint, which I would like to avoid in order to avoid checking the official Dockerfiles for each release if something changed. If these are passed via environment variables, I would be able to overwrite these configuration values.

github-actions[bot] commented 1 week ago

This issue is stale because it has been open for 2 weeks with no activity.

github-actions[bot] commented 2 days ago

This issue was closed because it has been inactive for 7 days since being marked as stale.