Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Error initializing the profiler

未关闭
#153 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
docker, java
领域
observability

调研方向

从 Dockerfile 和 JVM 启动命令开始,然后使用列出的 Java、Pyroscope 和 OpenTelemetry agent 版本重现 profiler 初始化错误。比较会产生“Could not set dlopen hook”的 JVM 和 agent 组合,并验证启动成功后 Pyroscope 中是否可以使用 CPU profiling。

由索引模型根据 Issue 内容生成。

描述

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?

主要语言
Java
星标
125
派生
48
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

grafana/pyroscope-java 的其他 Issue

查看 grafana/pyroscope-java 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。