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

Manual Instrumentation: Tracing flow breaks with Promise interface in Ratpack 1.x async operations #12990

Open
NaveenRamu opened this issue Jan 2, 2025 · 0 comments
Labels
bug Something isn't working needs triage New issue that requires triage

Comments

@NaveenRamu
Copy link

Describe the bug

When using manual instrumentation for tracing with the OpenTelemetry API in a Ratpack 1.x application, the trace context does not propagate correctly through asynchronous operations using the Promise interface. As a result, each handler in the flow creates a new traceId, breaking the trace continuity.

This issue is observed when multiple handlers in the Ratpack pipeline use Promise for asynchronous actions. The expected behavior is that all handlers should propagate the same trace context unless explicitly set otherwise.

Steps to reproduce

Run the following project
https://github.com/NaveenRamu/ratpack1x-manualinstrumentation.git
Observe the generated traces in logs

Expected behavior

The tracing context (e.g., traceId) should propagate across asynchronous boundaries, ensuring that all operations within a single request share the same trace.

Actual behavior

Each handler creates a new traceId, resulting in disjointed traces for a single request. This disrupts the ability to trace the complete flow of the request

Javaagent or library instrumentation version

1.42.1

Environment

JDK:
OS:

Additional context

No response

@NaveenRamu NaveenRamu added bug Something isn't working needs triage New issue that requires triage labels Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage New issue that requires triage
Projects
None yet
Development

No branches or pull requests

1 participant