generated from TrueCloudLab/basic
[#15] tracing: Add events for grpc stream calls #18
No reviewers
Labels
No labels
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
5 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-observability#18
Loading…
Reference in a new issue
No description provided.
Delete branch "r.loginov/frostfs-observability:feature/15-add_track_low_level_grpc_stream_calls"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
At the moment, I have added one event per specific action. It looks like this in jaeger:
For the client:
For the server:
There are a number of points that I would like to highlight/discuss.
event.name
an attribute indicating the unique name of the event. It must be present according to the recommendations from the opentelemetry specification.message.type
is an attribute indicating the type of message. I'm not sure if it's really useful, if you think you don't need it, let me know.If you have any ideas what other attributes can be added that will be useful for tracking call tracing, suggestions are welcome.
close #15
@ -39,6 +44,9 @@ func (cs *clientStream) Trailer() metadata.MD {
}
func (cs *clientStream) CloseSend() error {
cs.span.AddEvent("closing the send direction of the stream", trace.WithAttributes(
Please, take a look at https://opentelemetry.io/docs/specs/semconv/general/events/ and https://opentelemetry.io/docs/specs/semconv/general/attribute-naming/
I believe what you use as a value for a
event.name
attribute, should be the first argument toAddEvent
.Event names in this PR don't follow semantic conventions.
Sorry, it seems you are right, opentelemetry itself uses human readable names in the first argument.
First of all, thanks for the PR.
Аttachments are not opening. Can you attach images of what the events look like in jaeger?
There is also an implementation proposal: add an event not only at the beginning of receiving or sending, but also at the end.
Screenshots from jaeger have been updated, they should be displayed now.
f1ed8fd502
to07faf91c46
Events have been added to the end of calls. In jaeger it looks like this:
Client:
Server:
There is some inconsistency between wording: in
start ..ing
,start
is a verb, and inend of ...
,end
is a noun.I suggest using
message receive start/end
orstart/finish receiving a message
.07faf91c46
toc8283d96a3
@ -40,2 +45,4 @@
func (cs *clientStream) CloseSend() error {
cs.span.AddEvent("start closing the send direction of the stream", trace.WithAttributes(
attribute.String("event.name", "client.stream.close.send.start")),
Is there any difference between this code and
I mean, event name and description are basically self explanatory. Maybe we can save couple of bytes during tracing transmission to collector?
What you think @fyrchik, @dstepanov-yadro ?
I have looked into opentelemetry code and they use names which do NOT conform to the semantic convention described in docs
b99d2b8178/bridge/opencensus/internal/span.go (L84)
So I am not sure how to write
AddEvent
right.But I like your suggestion a lot more, it is smaller and seems to achieve exactly what we need.
I agree with @fyrchik
c8283d96a3
to37bd758211
At the moment, jaeger looks like this:
Client:
Server: