Be able to set an agent log format with a configuration option
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 42/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- java
调研方向
从 agent/src/main/java/io/pyroscope/javaagent/PyroscopeAgent.java 和 agent/src/main/java/io/pyroscope/javaagent/api/Logger.java 开始,这些是 issue 中链接的入口点。跟踪 agent logger 的初始化方式,并检查现有的 PYROSCOPE_LOG_LEVEL 配置。完成标准是 agent 提供所请求的日志格式选项,并以所选格式生成输出,同时覆盖受支持的格式。
由索引模型根据 Issue 内容生成。
描述
Our scenario
Hello. We are using docker as the underlying technology to deploy apps and the observability stack. For all the logs we decide to use JSON format that is sent to our Loki backend.
We are trying to adopt the pyroscope Java Otel extension (that implicitly has the Java Agent) to send profiling data to our Pyroscope server.
The issue
During our testing, when we are sending the Pyroscope backend server down, all Java apps using the extension are producing lot of logs that don't align with the rest of echosystem. In our case is JSON.
This is the kind of output we are getting from the agent logger in the docker console:
2024-03-21 11:37:15.292 [ERROR] Error uploading snapshot: 502 <html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx</center>
</body>
</html>
Currently the agent only has this log parameter PYROSCOPE_LOG_LEVEL which is not enough for this case.
Possible solutions
- As discussed in this thread a custom logger interface implementation can be done:
https://github.com/grafana/pyroscope-java/blob/f73ebfaae1fcdfdf61d3418a78807c5b2b0[…]/agent/src/main/java/io/pyroscope/javaagent/PyroscopeAgent.java
https://github.com/grafana/pyroscope-java/blob/82b1daba0dc05b1851e6b96f2d760ab7901[…]0c49/agent/src/main/java/io/pyroscope/javaagent/api/Logger.java
However, that would require initializing the profiler outside the otel extension, and this is not available when it's running as a javagent.
- Add a flag
PYROSCOPE_LOG_FORMATto set the logger format. it could be JSON or LOGFTM to align with rest of Grafana stack.
- 主要语言
- Java
- 星标
- 125
- 派生
- 48
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
grafana/pyroscope-java 的其他 Issue
-
Clean up dead publishing repository config and credentials in subproject build files可能已有人在做 @arnabnandy7 于 24 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
grafana/pyroscope-java#294 ·
-
难度 4/5 3-5 天 新手友好度 54/100
grafana/pyroscope-java#371 · 2 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 45/100
grafana/pyroscope-java#368 · 1 条评论 ·
-
难度 5/5 一周以上 新手友好度 25/100
grafana/pyroscope-java#283 ·
-
libasyncProfiler-linux-x64.so dump in /tmp可能重新可做 @korniltsev-grafanista 于 262 天前认领,目前没有进行中的 PR。 未关闭
grafana/pyroscope-java#250 · 1 条评论 · 已指派 1 人 ·
查看 grafana/pyroscope-java 的全部 Issue
相似的 Issue
-
approved bug
难度 2/5 1-3 小时 新手友好度 70/100
checkstyle/checkstyle#21981 · 1 条评论 ·
维护者通常 1 天内回复
-
Build: the CUDA backend fails without cuDNN instead of skipping the cuDNN shim (as the cuDF shim does)可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 68/100
beehive-lab/TornadoVM#1248 ·
维护者通常 1 天内回复
-
good first issue help wanted ready-for-human
难度 2/5 半天 新手友好度 64/100
维护者通常 1 天内回复
-
bug jdbc-v2
难度 2/5 1-3 小时 新手友好度 70/100
ClickHouse/clickhouse-java#3214 ·
维护者通常 1 天内回复
-
area: detector eco: java help wanted lane: free-agent roadmap size: S type: parser
难度 2/5 1-3 小时 新手友好度 62/100
arminazimi/evergreen#355 ·
维护者通常 1 天内回复