Why can't I get the method‘s real parameter name when i use apm-agent?
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- java
调研方向
从提供的 HelloController.test01 反射示例开始,在 JDK 8 上使用 apm-agent-attach 1.39.0 运行它。比较 agent 切换到 RUNNING 之前和之后的参数元数据,然后追踪 agent 的哪项 instrumentation 影响了 HelloController.test;完成标准是记录原因以及经过验证的修复或限制。
由索引模型根据 Issue 内容生成。
描述
Why can't I get the method‘s real parameter name by reflect?
i can get the method‘s real parameter name When the program first started,but i can‘t get the method's real parameter name after printing this log.
2023-07-14 13:58:27,588 [http-nio-8081-exec-4] INFO co.elastic.apm.agent.servlet.ServletVersionInstrumentation - Servlet container info = Apache Tomcat/9.0.60
2023-07-14 13:58:27,710 [Attach Listener] INFO co.elastic.apm.agent.impl.ElasticApmTracer - Tracer switched to RUNNING state
my code like this
@GetMapping("/test01")
public String test01() throws NoSuchMethodException {
Method testMethod = HelloController.class.getDeclaredMethod("test", int.class);
for (Parameter parameter : testMethod.getParameters()) {
System.out.println("param name is" + parameter.getName());
}
return "ok";
}
private static void test(int num) {
}
and log info like this
param name isnum
2023-07-14 13:58:27,588 [http-nio-8081-exec-4] INFO co.elastic.apm.agent.servlet.ServletVersionInstrumentation - Servlet container info = Apache Tomcat/9.0.60
2023-07-14 13:58:27,710 [Attach Listener] INFO co.elastic.apm.agent.impl.ElasticApmTracer - Tracer switched to RUNNING state
param name isarg0
first result is “param name isnum” but the second result is “param name isarg0”,the expected result is “param name isnum”,how can i fix it?
my runtime environment is jdk8 and apm-agent-attach 1.39.0
- 主要语言
- 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
-
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 天内回复
-
enhancement frontend
难度 2/5 1-3 小时 新手友好度 83/100
Albertinesilva/backend-engineering-journey-java-springboot#46 ·
-
Snyk: vulnerabilities in jackson-databind 2.21.5可能已有人在做 @harrywu23 今天认领。 未关闭bug
难度 1/5 1-3 小时 新手友好度 80/100
SOFTENG-310-Group-4/Project-A1-310-Group-4#115 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
carlos-emr/carlos#4833 · 1 条评论 ·
维护者通常 1 天内回复