Documentation
¶
Index ¶
- Constants
- type CurrentContextSpan
- type TracerSpan
- func (c *TracerSpan) CreateChildInCurrentContext(ctx context.Context, spanName string) (context.Context, *CurrentContextSpan)
- func (c *TracerSpan) LoadFromContext(ctx context.Context) (*CurrentContextSpan, bool)
- func (c *TracerSpan) SetAttribute(cspan *CurrentContextSpan, key string, value interface{}) *CurrentContextSpan
Constants ¶
View Source
const ( // TracerKey is a key for current tracer TracerKey = "otel-go-contrib-tracer-labstack-echo" // TracerName is name of the tracer TracerName = "go.opentelemetry.io/contrib/instrumentation/github.com/labstack/echo/otelecho" // TraceHdr is header name for ngc trace id TraceHdr = "X-Ngc-Trace-Id" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CurrentContextSpan ¶
CurrentContextSpan is a thin wrapper around current context otel span
type TracerSpan ¶
type TracerSpan struct {
}
TracerSpan holds span information
func NewTracerSpan ¶
func NewTracerSpan() *TracerSpan
func (*TracerSpan) CreateChildInCurrentContext ¶
func (c *TracerSpan) CreateChildInCurrentContext(ctx context.Context, spanName string) (context.Context, *CurrentContextSpan)
CreateChildInCurrentContext create a child span from specified span name and context
func (*TracerSpan) LoadFromContext ¶
func (c *TracerSpan) LoadFromContext(ctx context.Context) (*CurrentContextSpan, bool)
LoadFromContext validate and get the spanner from current context
func (*TracerSpan) SetAttribute ¶
func (c *TracerSpan) SetAttribute(cspan *CurrentContextSpan, key string, value interface{}) *CurrentContextSpan
SetAttribute set key value attribute to current span
Click to show internal directories.
Click to hide internal directories.