internal/otel/shim.go
raw| 1 | //go:build no_otel |
| 2 | |
| 3 | package otel |
| 4 | |
| 5 | import ( |
| 6 | "context" |
| 7 | ) |
| 8 | |
| 9 | type FakeTracer struct{} |
| 10 | type FakeSpan struct{} |
| 11 | |
| 12 | func Tracer(name string) FakeTracer { |
| 13 | return FakeTracer{} |
| 14 | } |
| 15 | |
| 16 | func (t FakeTracer) Start(ctx context.Context, _ string) (context.Context, FakeSpan) { |
| 17 | return ctx, FakeSpan{} |
| 18 | } |
| 19 | |
| 20 | func (s FakeSpan) End() { |
| 21 | |
| 22 | } |