MCPcopy
hub / github.com/cloudflare/cloudflared / RequestSpan

Method RequestSpan

ingress/packet_router.go:158–166  ·  view source on GitHub ↗
(ctx context.Context, pk *packet.ICMP)

Source from the content-addressed store, hash-verified

156}
157
158func (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
168func (pr *packetResponder) ReplySpan(ctx context.Context, logger *zerolog.Logger) (context.Context, trace.Span) {
169 if !pr.tracingEnabled() || pr.hadReply {

Callers

nothing calls this directly

Calls 5

tracingEnabledMethod · 0.95
NewNoopSpanFunction · 0.92
TracerMethod · 0.80
StartMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected