Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Traces should be made current while communication runs against JGroups methods #15287

@ahus1

Description

@ahus1

Description

When trying to trace JGroups communications, I found that the spans created are never made "current", and due to that all nested communications in JGroups isn't shown as nested, but on the same level.

Implementation ideas

Make the span current while calling the JGroups stack below, and then closing it before returning the async call.

With this setup the called methods will make their new spans nested to the current span created by ISPN.

I found this when working on keycloak/keycloak#39659. The workaround applied there to make the spans current in OpenTelemetrySpan.java on creation of the span is a workaround if only synchronous calls are make, but will fail with asynchronous calls.

I will create a PR with a suggestion.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions