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 於 25 天前認領。 未關閉
難度 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 於 264 天前認領,目前沒有進行中的 PR。 未關閉
grafana/pyroscope-java#250 · 1 則留言 · 已指派 1 人 ·
查看 grafana/pyroscope-java 的全部 Issue
相似的 Issue
-
難度 1/5 1 小時以內 新手友好度 90/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
apache/rocketmq-dashboard#6896 ·
維護者通常 3 天內回覆
-
難度 2/5 1-3 小時 新手友好度 67/100
-
bug
難度 2/5 1-3 小時 新手友好度 72/100
OpenIntegrationEngine/engine#496 ·
維護者通常 1 天內回覆
-
enhancement good first issue
難度 2/5 1-3 小時 新手友好度 76/100
SasanLabs/VulnerableApp#836 ·
維護者通常 1 天內回覆