grafana / grafana/pyroscope-java

Error initializing the profiler

Offen
#153 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Java
Sterne
126
Forks
48
Ø Merge
4 T. 14 Std.
Gemergte PRs (30 T.)
5

Beschreibung

I am trying to integrate opentelemetry and pyroscope in my application. Here is my Dockerfile:

```
FROM openjdk:17-slim-bullseye

ENV OTEL_SERVICE_NAME=cart-api
ENV OTEL_TRACES_EXPORTER=zipkin,otlp
ENV OTEL_METRICS_EXPORTER=prometheus
ENV OTEL_LOGS_EXPORTER=otlp
ENV OTEL_EXPORTER_ZIPKIN_ENDPOINT=http://zipkin:9411/api/v2/spans
ENV OTEL_SERVICE_NAME=cartorio-api
ENV OTEL_EXPORTER_PROMETHEUS_PORT=9464
ENV OTEL_EXPORTER_PROMETHEUS_HOST=0.0.0.0
ENV OTEL_EXPORTER_OTLP_LOGS_ENDPOINT=http://otel-collector:4317
ENV OTEL_EXPORTER_OTLP_LOGS_PROTOCOL=grpc
ENV OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://tempo:4317
ENV OTEL_EXPORTER_PROMETHEUS_PORT=9464
ENV OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=grpc

ENV PYROSCOPE_APPLICATION_NAME=cartorio-api
ENV PYROSCOPE_FORMAT=jfr
ENV PYROSCOPE_PROFILING_INTERVAL=10ms
ENV PYROSCOPE_PROFILER_EVENT=itimer
ENV PYROSCOPE_PROFILER_LOCK=10ms
ENV PYROSCOPE_PROFILER_ALLOC=512k
ENV PYROSCOPE_UPLOAD_INTERVAL=15s
ENV PYROSCOPE_LOG_LEVEL=debug
ENV PYROSCOPE_SERVER_ADDRESS=http://pyroscope:4040

ENV OTEL_PYROSCOPE_ADD_PROFILE_URL=false
ENV OTEL_PYROSCOPE_ADD_PROFILE_BASELINE_URL=false
ENV OTEL_PYROSCOPE_START_PROFILING=true
ENV OTEL_JAVAAGENT_EXTENSIONS=/pyroscope-otel.jar

ADD https://repo1.maven.org/maven2/io/pyroscope/otel/0.10.1.11/otel-0.10.1.11.jar /pyroscope-otel.jar
ADD https://github.com/grafana/pyroscope-java/releases/download/v0.12.2/pyroscope.jar /pyroscope.jar
ADD https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v1.17.0/opentelemetry-javaagent.jar /opentelemetry-javaagent.jar

ADD cart-api-0.0.1-SNAPSHOT.jar /app.jar

EXPOSE 8080
EXPOSE 8282

CMD ["java","-javaagent:opentelemetry-javaagent.jar", "-javaagent:pyroscope.jar","-Dspring.profiles.active=hml","-jar" ,"/app.jar"]
```

When the application starts I get this error in the logs:

[ERROR] Error starting profiler java.lang.IllegalStateException: java.lang.IllegalStateException: Could not set dlopen hook. Unsupported JVM?

I can't see any CPU information related to my application on pyroscope. I also tried different versions on the jvm and of pyroscope and open telemetry agent.

Can anyone help?

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Start with the Dockerfile and the JVM startup command, then reproduce the profiler initialization error using the listed Java, Pyroscope, and OpenTelemetry agent versions. Compare the JVM and agent combinations that produce “Could not set dlopen hook” and verify whether CPU profiling becomes available in Pyroscope after startup succeeds.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
docker, java
Bereich
observability
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.