elastic / elastic/apm-agent-java

Consistent annotation behavior without application_packages

Aperta
#1,502 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
agent-java bug
Lingua principale
Java
Stelle
594
Fork
338
Merge medio
1g 13h
PR unite (30g)
25

Descrizione

## 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.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia dalla documentazione dell'API pubblica e dalla configurazione di application_packages, quindi confronta la strumentazione dell'API pubblica basata sulle annotazioni con il comportamento di @javax.jws.WebService nei plugin interessati. Il lavoro è completato quando le classi annotate vengono strumentate senza application_packages e un avviso spiega il compromesso in termini di prestazioni che ne deriva.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
observability-sre
Tipo di issue
Bug
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.