MCPcopy Create free account
hub / github.com/zalando/skipper / TestEnabledLogStreamEvents

Function TestEnabledLogStreamEvents

proxy/tracing_test.go:704–721  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

702}
703
704func TestEnabledLogStreamEvents(t *testing.T) {
705 tracer := tracingtest.NewTracer()
706 tracing := newProxyTracing(&OpenTracingParams{
707 Tracer: tracer,
708 LogStreamEvents: true,
709 })
710 span := tracer.StartSpan("test")
711 defer span.Finish()
712
713 tracing.logStreamEvent(span, "test-filter", StartEvent)
714 tracing.logStreamEvent(span, "test-filter", EndEvent)
715
716 mockSpan := span.(*tracingtest.MockSpan)
717
718 if len(mockSpan.Logs()) != 2 {
719 t.Errorf("filter lifecycle events were not logged although it was enabled")
720 }
721}
722
723func TestDisabledLogStreamEvents(t *testing.T) {
724 tracer := tracingtest.NewTracer()

Callers

nothing calls this directly

Calls 6

StartSpanMethod · 0.95
NewTracerFunction · 0.92
newProxyTracingFunction · 0.85
FinishMethod · 0.80
logStreamEventMethod · 0.80
ErrorfMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…