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

Documentation Helidon SE: Can not resolve method asChildOf(Optional<SpanContext>) #2612

Closed
tvallin opened this issue Dec 15, 2020 · 0 comments · Fixed by #2615
Closed

Documentation Helidon SE: Can not resolve method asChildOf(Optional<SpanContext>) #2612

tvallin opened this issue Dec 15, 2020 · 0 comments · Fixed by #2615

Comments

@tvallin
Copy link
Member

tvallin commented Dec 15, 2020

The Helidon SE Tracing Guide asks to update GreetResource with this code:

import io.opentracing.Span; // (1)
...
    private void getDefaultMessageHandler(ServerRequest request,
                                   ServerResponse response) {

        Span span = request.tracer()  // (2)
            .buildSpan("getDefaultMessageHandler")  // (3)
            .asChildOf(request.spanContext())  // (4)
            .start(); // (5)

        try {
            sendResponse(response, "World");
        } finally {
            span.finish();  // (6)
        }
    }

The .asChildOf(request.spanContext()) throw an Exception that the method can not be resolved.
Helidon version 2.1.0/2.1.1-SNAPSHOT. I faced the issue with both.

Note:
To fix this I modified it like this .asChildOf(request.spanContext().get()), then continue the guide and it worked perfectly for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant