grafana / grafana/pyroscope-java

Error initializing the profiler

Aperta
#153 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Java
Stelle
126
Fork
48
Merge medio
4g 14h
PR unite (30g)
5

Descrizione

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?

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
docker, java
Ambito
observability
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.