initial import
This commit is contained in:
7
core/trace/tracespec/spancontext.go
Normal file
7
core/trace/tracespec/spancontext.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package tracespec
|
||||
|
||||
type SpanContext interface {
|
||||
TraceId() string
|
||||
SpanId() string
|
||||
Visit(fn func(key, val string) bool)
|
||||
}
|
||||
10
core/trace/tracespec/trace.go
Normal file
10
core/trace/tracespec/trace.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package tracespec
|
||||
|
||||
import "context"
|
||||
|
||||
type Trace interface {
|
||||
SpanContext
|
||||
Finish()
|
||||
Fork(ctx context.Context, serviceName, operationName string) (context.Context, Trace)
|
||||
Follow(ctx context.Context, serviceName, operationName string) (context.Context, Trace)
|
||||
}
|
||||
3
core/trace/tracespec/vars.go
Normal file
3
core/trace/tracespec/vars.go
Normal file
@@ -0,0 +1,3 @@
|
||||
package tracespec
|
||||
|
||||
const TracingKey = "X-Trace"
|
||||
Reference in New Issue
Block a user