printing context key friendly

This commit is contained in:
kevin
2020-09-20 12:08:30 +08:00
parent 1606a92c6e
commit dc17855367

View File

@@ -1,7 +1,12 @@
package tracespec package tracespec
// TracingKey is tracing key for context
var TracingKey = contextKey("X-Trace")
// contextKey a type for context key // contextKey a type for context key
type contextKey string type contextKey string
// TracingKey is tracing key for context // Printing a context will reveal a fair amount of information about it.
var TracingKey = contextKey("X-Trace") func (c contextKey) String() string {
return "trace/tracespec context key " + string(c)
}