123456789101112131415161718192021222324252627282930313233 |
- package trace
- import (
- "context"
- "git.i2edu.net/i2/go-zero/core/trace/tracespec"
- )
- var emptyNoopSpan = noopSpan{}
- type noopSpan struct{}
- func (s noopSpan) Finish() {
- }
- func (s noopSpan) Follow(ctx context.Context, serviceName, operationName string) (context.Context, tracespec.Trace) {
- return ctx, emptyNoopSpan
- }
- func (s noopSpan) Fork(ctx context.Context, serviceName, operationName string) (context.Context, tracespec.Trace) {
- return ctx, emptyNoopSpan
- }
- func (s noopSpan) SpanId() string {
- return ""
- }
- func (s noopSpan) TraceId() string {
- return ""
- }
- func (s noopSpan) Visit(fn func(key, val string) bool) {
- }
|