tracing

package
v2.4.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package tracing contains opentracing support.

Index

Constants

This section is empty.

Variables

View Source
var (
	// TracingMDKey is the meta data key to carry tracing data.
	TracingMDKey = "nptracing"
)

Functions

func ExtractSpanCtx

func ExtractSpanCtx(tracer ot.Tracer, md npmd.MD) (ot.SpanContext, error)

ExtractSpanCtx extracts span context from `md` or nil if not found.

func InjectSpanCtx

func InjectSpanCtx(tracer ot.Tracer, spanCtx ot.SpanContext, md npmd.MD) (npmd.MD, error)

InjectSpanCtx adds span context to `md` (a new one is created). `md` can be nil.

func SetSpanError

func SetSpanError(span ot.Span, err error)

SetSpanError set error on the span. If `err` is nil, then nop.

func SpanCtxFromCtx

func SpanCtxFromCtx(ctx context.Context) ot.SpanContext

SpanCtxFromCtx gets span context from context. Returns nil if there is no span set.

Types

This section is empty.

Directories

Path Synopsis
Package msgtracing contains msg middlewares to add opentracing support.
Package msgtracing contains msg middlewares to add opentracing support.
Package rpctracing contains rpc middlewares to add opentracing support.
Package rpctracing contains rpc middlewares to add opentracing support.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL