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) Base() context.Context
- func (c *Context) ErrorLog(err error, fields ...zap.Field)
- func (c *Context) Log(lvl zapcore.Level, msg string, fields ...zap.Field)
- func (c *Context) RespErrorLog(respErr, originErr error, funcName string, fields ...zap.Field) error
- func (c *Context) RootSpan() trace.Span
- func (c *Context) SetBase(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) TraceID() string
- func (c *Context) WithCancel() context.CancelFunc
- func (c *Context) WithCancelCause() context.CancelCauseFunc
- func (c *Context) WithDeadline(d time.Time) context.CancelFunc
- func (c *Context) WithDeadlineCause(d time.Time, cause error) context.CancelFunc
- func (c *Context) WithTimeout(timeout time.Duration) context.CancelFunc
- func (c *Context) WithTimeoutCause(timeout time.Duration, cause error) context.CancelFunc
- func (c *Context) WithValue(key, val any)
- func (c *Context) WithoutCancel()
- 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 {
// contains filtered or unexported fields
}
func FromContextValue ¶
func (*Context) RespErrorLog ¶ added in v0.0.26
func (*Context) StartSpanEnd ¶
func (c *Context) StartSpanEnd(name string, o ...trace.SpanStartOption) func(options ...trace.SpanEndOption)
func (*Context) StartSpanX ¶
func (*Context) WithCancel ¶ added in v0.0.26
func (c *Context) WithCancel() context.CancelFunc
func (*Context) WithCancelCause ¶ added in v0.0.26
func (c *Context) WithCancelCause() context.CancelCauseFunc
func (*Context) WithDeadline ¶ added in v0.0.26
func (c *Context) WithDeadline(d time.Time) context.CancelFunc
func (*Context) WithDeadlineCause ¶ added in v0.0.26
func (*Context) WithTimeout ¶ added in v0.0.26
func (c *Context) WithTimeout(timeout time.Duration) context.CancelFunc
func (*Context) WithTimeoutCause ¶ added in v0.0.26
func (*Context) WithoutCancel ¶ added in v0.0.26
func (c *Context) WithoutCancel()
type ValueContext ¶
Click to show internal directories.
Click to hide internal directories.