RATIS-2393 Add Span Context to RaftRpcRequestProto#1341
RATIS-2393 Add Span Context to RaftRpcRequestProto#1341taklwu wants to merge 5 commits intoapache:masterfrom
Conversation
|
@szetszwo Hi Nicholas, should I directly open PRs to master branch ? in addition , the test failure doesn't seem to be related to my changes |
szetszwo
left a comment
There was a problem hiding this comment.
@taklwu , thanks for working on this! Please see the comment inlined.
BTW, this change is very small. Let's combine the usage of the new SpanContextProto such as RATIS-2395 or some part of it. Otherwise, it is hard to determine whether this change is good or not.
| uint64 timeoutMs = 13; | ||
| RoutingTableProto routingTable = 14; | ||
| SlidingWindowEntry slidingWindowEntry = 15; | ||
| SpanContextProto spanContext = 16; |
There was a problem hiding this comment.
We should not use 16; see https://protobuf.dev/programming-guides/proto3/#assigning :
You should use the field numbers 1 through 15 for the most-frequently-set fields. Lower field number values take less space in the wire format. ...
Let's use 11?
There was a problem hiding this comment.
ack , originally I thought the number was skip from 5 to 12 for some reason, then I was wondered we should save the gap between 5 and 12 for other important fields (or for backward compatibility)
and let me add more lines into this commit today
There was a problem hiding this comment.
Sorry for the confusion. We use the lower numbers for the core fields (such as the fields required by Raft). The higher numbers are for miscellaneous things.
- First commit of using OpenTelemetry - use junit5 and default opentelemetry extension in test case. - Add test to mock client level span and inject when request is being sent - only include the server extract
What changes were proposed in this pull request?
We're adding a new map to RaftRpcRequestProto that will be used for upcoming Opentelemetry integration.
see the usage of PoC https://github.com/taklwu/ratis/blob/opentelemetry0129/ratis-common/src/main/java/org/apache/ratis/trace/TraceUtils.java#L235-L251
Another official reference for how this map is going to be inject and extract from the http / rpc header
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/RATIS-2393
How was this patch tested?
running mvn clean package -DskipTests