elastic / elastic/apm-agent-java

Paraya 6 JAX-RS invalid transaction name + no span captured with @Trace

Aperta
#3,943 8 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

This was initially reported in our forum:

https://discuss.elastic.co/t/problem-with-distributing-tracing-for-jakarta-10-and-payara-6/372920/6

With the provided test application in https://github.com/ciment7/jakarta-test we can reproduce the following symptoms:

- the first execution of the jax-rs resource is properly named (1)
- the second and following executions of jax-rs are named from the servlet transaction (2)
- no extra span is being captured for the method annotated with `@Traced` (3)

For 1) and 2), the issue seems to happen because in the first case the servlet transaction wraps the jax-rs resource execution, and in the second case the jax-rs invocation is made without parent servlet transaction, which is something that we don't support as described in https://github.com/elastic/apm-agent-java/issues/1752 issue.

For 3) this is probably a related issue but I have not found any hint of what could be wrong here.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia con l’applicazione di test fornita all’indirizzo github.com/ciment7/jakarta-test e riproduci la prima e le successive esecuzioni JAX-RS su Payara 6. Confronta i nomi delle transazioni e verifica, usando issue #1752 come contesto, se il metodo annotato con @Traced produce uno span. Il lavoro è completato quando i nomi delle transazioni JAX-RS sono coerenti e viene catturato uno span per il metodo tracciato.

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

Valutazione

Stack tecnologico
java
Ambito
api, observability
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
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.