use java library to grab hostname
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- java
调研方向
从 apm-agent-core/src/main/java/co/elastic/apm/agent/impl/metadata/SystemInfo.java 第 223 行附近开始,这里 agent 会运行 "hostname -f"。验证基于 Java 的主机名查找在 hostname 命令不可用时仍能正常工作,并保持元数据行为不变;完成的标准是无需再使用该命令,且相关检查通过。
由索引模型根据 Issue 内容生成。
描述
I ran into this issue due to lack of hostname command on the container.
2025-04-01 11:21:56,560 [elastic-apm-metadata-0] INFO co.elastic.apm.agent.impl.metadata.SystemInfo - Failed to execute command "hostname -f" with exit code -1
2025-04-01 11:21:56,560 [elastic-apm-metadata-0] DEBUG co.elastic.apm.agent.impl.metadata.SystemInfo - Command execution error
java.io.IOException: Cannot run program "hostname": error=2, No such file or directory
It would be beneficial to abandon calling this command and do so in java to avoid such error as well as a small performance improvement.
String hostname = InetAddress.getLocalHost().getHostName();
- 主要语言
- Java
- 星标
- 593
- 派生
- 338
- 平均合并
- 1 天 9 小时
- 30 天内合并 PR
- 13
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
elastic/apm-agent-java 的其他 Issue
-
Spring MVC View instrumentation incorrectly matches static render overloads (EasyPOI)可能已有人在做 @VelpulaGangavardhan 今天认领。 未关闭agent-java community triage
难度 2/5 1-3 小时 新手友好度 72/100
elastic/apm-agent-java#4594 · 1 条评论 ·
维护者通常 1 天内回复
-
agent-java
难度 2/5 1-2 天 新手友好度 62/100
elastic/apm-agent-java#2844 · 2 条评论 ·
维护者通常 1 天内回复
-
Improve docs and add error log related to illegal activation of transaction可能已有人在做 @AzazelSensei 于 38 天前认领。 未关闭docs good first issue
难度 2/5 1-3 小时 新手友好度 68/100
elastic/apm-agent-java#850 · 4 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
agent-java community triage
难度 3/5 1-2 天 新手友好度 55/100
elastic/apm-agent-java#4593 ·
维护者通常 1 天内回复
-
agent-java community triage
elastic/apm-agent-java#4573 · 4 条评论 ·
维护者通常 1 天内回复
查看 elastic/apm-agent-java 的全部 Issue
相似的 Issue
-
Triage
难度 2/5 1-3 小时 新手友好度 75/100
MinecraftForge/MinecraftForge#10902 · 1 条评论 ·
-
bug
难度 2/5 1-3 小时 新手友好度 74/100
refinedmods/refinedstorage2#1421 ·
-
StepExamBenchmarkTest runs a loop and prints a timing but asserts nothing可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭jules
难度 1/5 1 小时以内 新手友好度 82/100
open-learning-exchange/myplanet#18199 · 1 条评论 ·
维护者通常 4 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
Scheme-less stream URLs throw NullPointerException instead of URISyntaxException可能已有人在做 @blihio 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
pedroSG94/RootEncoder#2218 ·
维护者通常 3 天内回复