elastic / elastic/apm-agent-java

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

Open
#3,943 8 comments 0 reactions 0 assignees View on GitHub
agent-java bug
Dominant language
Java
Stars
594
Forks
338
Avg merge
1d 13h
Merged PRs (30d)
25

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.