MCPcopy Create free account
hub / github.com/coder/coder / setupTracer

Function setupTracer

aibridge/internal/integrationtest/trace_internal_test.go:33–43  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

31}
32
33func setupTracer(t *testing.T) (*tracetest.SpanRecorder, oteltrace.Tracer) {
34 t.Helper()
35
36 sr := tracetest.NewSpanRecorder()
37 tp := sdktrace.NewTracerProvider(sdktrace.WithSpanProcessor(sr))
38 t.Cleanup(func() {
39 _ = tp.Shutdown(t.Context())
40 })
41
42 return sr, tp.Tracer(t.Name())
43}
44
45func TestTraceAnthropic(t *testing.T) {
46 t.Parallel()

Callers 7

TestTraceAnthropicFunction · 0.85
TestTraceAnthropicErrFunction · 0.85
TestInjectedToolsTraceFunction · 0.85
TestTraceOpenAIFunction · 0.85
TestTraceOpenAIErrFunction · 0.85
TestTracePassthroughFunction · 0.85

Calls 6

TracerMethod · 0.80
HelperMethod · 0.65
CleanupMethod · 0.65
ShutdownMethod · 0.65
ContextMethod · 0.65
NameMethod · 0.65

Tested by

no test coverage detected