You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
317 B
Go
20 lines
317 B
Go
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)
|
|
}
|