HandleRPC handles per RPC tracing implementation.
(ctx context.Context, rs stats.RPCStats)
| 136 | |
| 137 | // HandleRPC handles per RPC tracing implementation. |
| 138 | func (h *clientTracingHandler) HandleRPC(ctx context.Context, rs stats.RPCStats) { |
| 139 | ri := clientRPCInfo(ctx) |
| 140 | if ri == nil { |
| 141 | logger.Error("ctx passed into client side tracing handler trace event handling has no client attempt data present") |
| 142 | return |
| 143 | } |
| 144 | |
| 145 | // Client-specific Begin attributes. |
| 146 | if begin, ok := rs.(*stats.Begin); ok { |
| 147 | ci := getCallInfo(ctx) |
| 148 | previousRPCAttempts := ci.previousRPCAttempts.Add(1) - 1 |
| 149 | ri.ai.traceSpan.SetAttributes( |
| 150 | attribute.Int64("previous-rpc-attempts", int64(previousRPCAttempts)), |
| 151 | attribute.Bool("transparent-retry", begin.IsTransparentRetryAttempt), |
| 152 | ) |
| 153 | } |
| 154 | populateSpan(rs, ri.ai) |
| 155 | } |
nothing calls this directly
no test coverage detected