Documentation ¶
Index ¶
- Constants
- func Meter() metric.Meter
- func SetMeter(m metric.Meter)
- func SetTracer(t trace.Tracer)
- func StartSpan(ctx context.Context, name string, o ...trace.SpanStartOption) (context.Context, trace.Span)
- func Tracer() trace.Tracer
- func WrapperKey() ctxKey
- type Context
- func (c *Context) BaseContext() context.Context
- func (c *Context) Error(args ...interface{})
- func (c *Context) ErrorLog(err, originErr error, funcName string) error
- func (c *Context) HandleError(err error)
- func (c *Context) RootSpan() trace.Span
- func (c *Context) SetBaseContext(ctx context.Context)
- func (c *Context) StartSpan(name string, o ...trace.SpanStartOption) trace.Span
- func (c *Context) StartSpanEnd(name string, o ...trace.SpanStartOption) func(options ...trace.SpanEndOption)
- func (c *Context) StartSpanX(name string, o ...trace.SpanStartOption) (*Context, trace.Span)
- func (c *Context) Wrapper() context.Context
- type ValueContext
Constants ¶
View Source
const (
KindKey = attribute.Key("context.key")
)
Variables ¶
This section is empty.
Functions ¶
func WrapperKey ¶
func WrapperKey() ctxKey
Types ¶
type Context ¶
type Context struct { TraceID string // contains filtered or unexported fields }
func FromContextValue ¶
func NewContext ¶
func (*Context) BaseContext ¶
func (*Context) HandleError ¶
func (*Context) SetBaseContext ¶
func (*Context) StartSpanEnd ¶
func (c *Context) StartSpanEnd(name string, o ...trace.SpanStartOption) func(options ...trace.SpanEndOption)
func (*Context) StartSpanX ¶
type ValueContext ¶
Click to show internal directories.
Click to hide internal directories.