elastic / elastic/apm-agent-java

Consistent annotation behavior without application_packages

Offen
#1,502 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
agent-java bug
Vorherrschende Sprache
Java
Sterne
594
Forks
338
Ø Merge
1 T. 13 Std.
Gemergte PRs (30 T.)
25

Beschreibung

## Describe the bug

When using the [public API](https://www.elastic.co/guide/en/apm/agent/java/current/public-api.html) annotations, the `application_packages` configuration is required to make them work.

This behavior is not consistent with other similar instrumentation and does not provide a good onboarding experience, as when configuration is missing nothing is instrumented.

For example, Web-services annotated with `@javax.jws.WebService` work out of the box without configuration, the effect of `application_packages` in this case is only to provide better performance as it allows to reduce the search scope for classes that might have the annotation (this search is by definition quite time and resources intensive).

Here, a better behavior would be:
- instrument classes by default, wether `application_packages` is set or not
- make sure that we issue a proper warning when `application_packages` is not set as it implies sub-optimal performance.
- make this behavior consistent on all plugins that relies on annotations.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit der Dokumentation der öffentlichen API und der Konfiguration von application_packages und vergleiche anschließend die annotationsbasierte Instrumentierung der öffentlichen API mit dem Verhalten von @javax.jws.WebService in den betroffenen Plugins. Als abgeschlossen gilt die Arbeit, wenn annotierte Klassen ohne application_packages instrumentiert werden und eine Warnung den daraus resultierenden Performance-Kompromiss erklärt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
java
Bereich
observability-sre
Issue-Typ
Bug
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.