-
Notifications
You must be signed in to change notification settings - Fork 566
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
[4.x][Doc] - Fix tracing documentation #7962
[4.x][Doc] - Fix tracing documentation #7962
Conversation
Signed-off-by: Dmitry Aleksandrov <[email protected]>
Signed-off-by: Dmitry Aleksandrov <[email protected]>
docs/se/guides/tracing.adoc
Outdated
This means a single trace can include spans from multiple services and hosts. OpenTracing uses a `SpanContext` to | ||
Helidon automatically traces across services if the services use the same tracer, for example, the same instance of Jaeger. | ||
This means a single trace can include spans from multiple services and hosts. Helidon uses a `Span.context()` to | ||
propagate tracing information across process boundaries. When you make client API calls, Helidon will | ||
internally call OpenTracing APIs to propagate the `SpanContext`. There is nothing you need to do in your application to make this work. | ||
internally call OpenTracing APIs to propagate the Span Context. There is nothing you need to do in your application to make this work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
V4 still has a SpanContext
interface io.helidon.tracing
. I think we can continue to refer to it as in the original document. If you want to avoid referring to that type for some reason, "Helidon uses a Span.context()
" is awkward wording; maybe just use "span context" here and a couple lines below (lower case with space between the words).
It does make good sense to change OpenTracing to Helidon as shown.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed :)
docs/se/guides/tracing.adoc
Outdated
<artifactId>helidon-tracing-providers-jaeger</artifactId> <3> | ||
</dependency> | ||
---- | ||
<1> Helidon Tracing dependencies. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All three are Helidon tracing dependencies so this description does not really distinguish this one from the others. Maybe change this first one to something like "Helidon tracing API" instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok :)
service: helidon-se-2 | ||
protocol: http | ||
port: 14250 | ||
path: /api/traces | ||
tags: | ||
env: development | ||
enabled: true | ||
sampler-type: "const" | ||
sampler-param: 1 | ||
log-spans: true | ||
propagation: b3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's very good to use config settings that will make tracing work easily as a user experiments with it. (The param = 1 for example, IIRC, makes sure traces are flushed right away so they appear in the back-end system with minimal buffering or delay.)
That said, maybe we add a brief sentence explaining that and advising users to use different settings for production servers for performance reasons.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed :)
docs/se/guides/tracing.adoc
Outdated
response.send(result); | ||
} finally { | ||
span.finish(); // <5> | ||
span.end(); // <5> | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code should probably conform to the earlier example which uses span.end()
in the try
block and span.end(t)
in a catch (Throwable t)
block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed :)
docs/se/tracing.adoc
Outdated
---- | ||
<dependency> | ||
<groupId>io.helidon.tracing.providers</groupId> | ||
<artifactId>helidon-tracing-providers-jaeger</artifactId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The OTel case should not refer to the Jaeger provider, should it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed :)
docs/se/tracing.adoc
Outdated
---- | ||
<dependency> | ||
<groupId>io.helidon.tracing.providers</groupId> | ||
<artifactId>helidon-tracing-providers-jaeger</artifactId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the OpenTracing case refer to the Jaeger provider?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed :)
Signed-off-by: Dmitry Aleksandrov <[email protected]>
Signed-off-by: Dmitry Aleksandrov <[email protected]>
Signed-off-by: Dmitry Aleksandrov <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor edits and one fix to an omission in an example.
docs/se/guides/tracing.adoc
Outdated
propagate tracing information across process boundaries. When you make client API calls, Helidon will | ||
internally call OpenTracing APIs to propagate the `SpanContext`. There is nothing you need to do in your application to make this work. | ||
internally call OpenTelemetry APIs or OpenTracing APIs to propagate the Span Context. There is nothing you need to do in your application to make this work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you are going to make any other changes, please change Span Context to either
span context
or
SpanContext
(with back ticks before and after)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
docs/se/guides/tracing.adoc
Outdated
<artifactId>helidon-tracing-providers-jaeger</artifactId> <3> | ||
</dependency> | ||
---- | ||
<1> Helidon Tracing API dependencies. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you are going to make any other changes, please remove the word "dependencies" because all the called-out elements are dependencies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
|
||
try { | ||
requestBuilder.property( | ||
ClientTracingFilter.CURRENT_SPAN_CONTEXT_PROPERTY_NAME, request.spanContext()); // <3> | ||
ClientTracingFilter.CURRENT_SPAN_CONTEXT_PROPERTY_NAME, span.context()); // <3> | ||
|
||
String result = requestBuilder // <4> | ||
.get(String.class); | ||
response.send(result); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After the response.send(result)
line add span.end()
so in the normal case the span is properly ended.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
docs/se/guides/tracing.adoc
Outdated
|
||
String result = requestBuilder // <4> | ||
.get(String.class); | ||
response.send(result); | ||
} finally { | ||
span.finish(); // <5> | ||
} catch (Throwandle t) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change Throwandle to Throwable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New typo: line 480 should be span.end();
(not spa
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like 481 still says Throwandle
; it needs to be Throwable
Signed-off-by: Dmitry Aleksandrov <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One new typo; one left over from earlier.
docs/se/guides/tracing.adoc
Outdated
|
||
String result = requestBuilder // <4> | ||
.get(String.class); | ||
response.send(result); | ||
} finally { | ||
span.finish(); // <5> | ||
} catch (Throwandle t) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New typo: line 480 should be span.end();
(not spa
)
docs/se/guides/tracing.adoc
Outdated
|
||
String result = requestBuilder // <4> | ||
.get(String.class); | ||
response.send(result); | ||
} finally { | ||
span.finish(); // <5> | ||
} catch (Throwandle t) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like 481 still says Throwandle
; it needs to be Throwable
Signed-off-by: Dmitry Aleksandrov <[email protected]>
Fix Traxing docs #7931