Skip to content

Commit

Permalink
add two labels about size
Browse files Browse the repository at this point in the history
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
  • Loading branch information
fatsheep9146 committed May 19, 2023
1 parent b8f2f82 commit b39ba10
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ func handleRPC(ctx context.Context, rs stats.RPCStats) {
trace.WithAttributes(
semconv.MessageTypeReceived,
semconv.MessageIDKey.Int64(messageId),
semconv.MessageCompressedSizeKey.Int(rs.CompressedLength),
semconv.MessageUncompressedSizeKey.Int(rs.Length),
),
)
case *stats.OutPayload:
Expand All @@ -167,6 +169,8 @@ func handleRPC(ctx context.Context, rs stats.RPCStats) {
trace.WithAttributes(
semconv.MessageTypeSent,
semconv.MessageIDKey.Int64(messageId),
semconv.MessageCompressedSizeKey.Int(rs.CompressedLength),
semconv.MessageUncompressedSizeKey.Int(rs.Length),
),
)
case *stats.End:
Expand Down

0 comments on commit b39ba10

Please sign in to comment.