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

Allow setting user_agent

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
45/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
java
领域
api, observability

调研方向

Issue 提到了 ElasticApm.currentTransaction() 和 transaction 字段 user_agent。首先定位公开的 Transaction API 以及导出 transaction 字段的路径;当 Java 调用方可以设置 user_agent,且导出的 transaction 包含它时,即可完成。

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

描述

agent-java community

Is your feature request related to a problem?

user_agent is a standard transaction field, but I can't set it via the public API: https://www.elastic.co/guide/en/apm/server/current/exported-fields-apm-transaction.html#_user_agent_4

Describe the solution you'd like

Transaction transaction = ElasticApm.currentTransaction();
transaction.setUserAgent(...);

Describe alternatives you've considered

I'm not aware of any alternatives right now, except for #433, but that's still open, too.

主要语言
Java
星标
593
派生
337
平均合并
15 小时 24 分钟
30 天内合并 PR
15

环境准备

从这里开始

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

elastic/apm-agent-java 的其他 Issue

查看 elastic/apm-agent-java 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

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