Labeled methods should always be recorded, even if they match trivial-method filters
Evaluación
Este issue todavía no se ha evaluado.
Descripción
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
- Lenguaje dominante
- Java
- Estrellas
- 88
- Forks
- 17
- Merge medio
- 2 d 2 h
- PR fusionados (30 d)
- 1
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de getappmap/appmap-java
-
Warning with Java 25 Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
getappmap/appmap-java#322 ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
getappmap/appmap-java#308 ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
getappmap/appmap-java#305 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
getappmap/appmap-java#304 ·
-
enhancement
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
getappmap/appmap-java#296 ·
Todos los issues de getappmap/appmap-java
Issues similares
-
Bug Java Platform: Java
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
getsentry/sentry-java#6138 · 1 comentario ·
-
bug needs triage p2
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
GoogleCloudPlatform/DataflowTemplates#4273 · 1 comentario ·
-
[LNG prod] Release 2.4.6 Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
[Studio][Bug] Bulk-deleting a full page of alert rules steps the page back while more rules remain Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
apache/rocketmq-dashboard#4654 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100