initial import
This commit is contained in:
19
core/trace/spancontext.go
Normal file
19
core/trace/spancontext.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package trace
|
||||
|
||||
type spanContext struct {
|
||||
traceId string
|
||||
spanId string
|
||||
}
|
||||
|
||||
func (sc spanContext) TraceId() string {
|
||||
return sc.traceId
|
||||
}
|
||||
|
||||
func (sc spanContext) SpanId() string {
|
||||
return sc.spanId
|
||||
}
|
||||
|
||||
func (sc spanContext) Visit(fn func(key, val string) bool) {
|
||||
fn(traceIdKey, sc.traceId)
|
||||
fn(spanIdKey, sc.spanId)
|
||||
}
|
||||
Reference in New Issue
Block a user