Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracing: JAX-RS Client request span not visible if client times out #3691

Closed
Sobuno opened this issue Dec 2, 2021 · 1 comment
Closed

Tracing: JAX-RS Client request span not visible if client times out #3691

Sobuno opened this issue Dec 2, 2021 · 1 comment
Assignees
Labels
bug Something isn't working jax-rs JAX-RS and Jersey related issues P3

Comments

@Sobuno
Copy link
Contributor

Sobuno commented Dec 2, 2021

Environment Details

  • Helidon Version: 2.4.0
  • Helidon SE or Helidon MP: Helidon MP
  • JDK version: 11
  • OS: Windows
  • Docker version (if applicable): N/A

Problem Description

When firing a request using a Jersey Client, a span is generated and visible in e.g. Jaeger if the server manages to reply. However, if the server does not reply (e.g. in the case of a client timeout being reached), no span is visible.

The problem is easily reproducible using the attached example: I have created two endpoints that each call example.org One is located at /test/works and has a generous timeout value. The other is located at /test/broken and is set to timeout the connection after 1 millisecond.

By calling each of these endpoints, we will see the following for /test/works and /test/broken respectively:
image

image

Note the missing spans on the second picture (that are actually the reason for the entire trace being marked as having an error - yet the root cause of the error disappears).

Steps to reproduce

  1. Build and run the attached sample code while having an active Jaeger All-in-One instance running locally.
  2. Access http://localhost:8080/test/broken in a browser
  3. Observe that there is no span in Jaeger indicating that an outbound request was attempted
  4. Access http://localhost:8080/test/works in a browser
  5. Observe that there is a span in Jaeger indicating that an outbound request was attempted (and was successful)

timeout-no-span-sample.zip

@m0mus m0mus added jax-rs JAX-RS and Jersey related issues bug Something isn't working P3 labels Dec 6, 2021
@spericas spericas self-assigned this Dec 7, 2021
@spericas
Copy link
Member

Fix checked into master only PR #3725

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working jax-rs JAX-RS and Jersey related issues P3
Projects
Archived in project
Development

No branches or pull requests

3 participants