Labeled methods should always be recorded, even if they match trivial-method filters
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Summary
Methods annotated with @Labels(...) from appmap-annotation are not recorded when the agent considers them "trivial" (e.g. simple getter/setter patterns like getFirstName() that just return a field). The agent's trivial-method filter takes precedence over the explicit label annotation.
Expected behavior
If a developer explicitly labels a method with @Labels(...), that method should always be recorded in the AppMap trace, regardless of whether it would otherwise be filtered out as trivial. The label annotation is a deliberate opt-in signal that the method is meaningful for analysis.
Observed behavior
Given a class like:
@Labels("secret")
public String getFirstName() {
return this.firstName;
}
The method does not appear in the recorded AppMap events or classMap. In contrast, a method with identical logic but a non-getter name is recorded:
@Labels("secret")
public String firstName() {
return this.firstName;
}
This was confirmed by comparing the recorded events across multiple test runs. Methods like getPet (which has a loop and conditional logic) are recorded normally — the filter appears to target methods based on complexity/pattern, not just the get prefix.
Workaround
Wrap the getter in a non-getter-named method and label that instead:
@Labels("secret")
public String firstName() {
return this.firstName;
}
public String getFirstName() {
return firstName();
}
This works but is awkward — it forces users to create redundant wrapper methods just to satisfy the agent's filter.
Environment
appmap-agent1.30.0appmap-annotation1.28.0- Java 23 (OpenJDK)
- Spring Boot 2.4.5
- Ngôn ngữ chính
- Java
- Star
- 88
- Fork
- 17
- Merge trung bình
- 2 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của getappmap/appmap-java
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 28/100
getappmap/appmap-java#333 ·
-
appmap.yml packages path matching zero classes yields a healthy-looking recording with no warningĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
getappmap/appmap-java#332 · 1 bình luận ·
-
Git metadata dropped in a git worktree (.git file with gitdir: pointer not followed)Có thể đã có người làm @dividedmind đã nhận 2 ngày trước. Đang mở
getappmap/appmap-java#331 · 1 bình luận · 1 người được giao ·
-
Warning with Java 25Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
getappmap/appmap-java#322 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
getappmap/appmap-java#308 ·
Tất cả issue của getappmap/appmap-java
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
utopia-rise/godot-jvm#1004 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
spring-projects/spring-grpc#442 ·
-
Expose numberOfPermits in RateLimiterEvent.toString() and the ratelimiterevents actuator DTOĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
resilience4j/resilience4j#2547 ·
Maintainer thường phản hồi trong vòng 9 ngày
-
Clock.MakeDate continues execution and returns a rolled-over instant after dispatching error on invalid dateCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
mit-cml/appinventor-sources#4155 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Doc] - Creation du READMEĐang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 62/100
Hira-shi/PW1-DAI-Carrel-Egal-Eyer#28 ·
Maintainer thường phản hồi trong vòng 1 ngày