(ctx context.Context, pk *packet.ICMP)
| 156 | } |
| 157 | |
| 158 | func (pr *packetResponder) RequestSpan(ctx context.Context, pk *packet.ICMP) (context.Context, trace.Span) { |
| 159 | if !pr.tracingEnabled() { |
| 160 | return ctx, tracing.NewNoopSpan() |
| 161 | } |
| 162 | return pr.tracedCtx.Tracer().Start(pr.tracedCtx, "icmp-echo-request", trace.WithAttributes( |
| 163 | attribute.String("src", pk.Src.String()), |
| 164 | attribute.String("dst", pk.Dst.String()), |
| 165 | )) |
| 166 | } |
| 167 | |
| 168 | func (pr *packetResponder) ReplySpan(ctx context.Context, logger *zerolog.Logger) (context.Context, trace.Span) { |
| 169 | if !pr.tracingEnabled() || pr.hadReply { |
nothing calls this directly
no test coverage detected