Documentation ¶
Overview ¶
Package tracing enables [Datadog APM tracing](https://docs.datadoghq.com/tracing/) capabilities, focusing specifically on [Error Tracking](https://docs.datadoghq.com/tracing/error_tracking/)
Index ¶
- Variables
- func GoPanicWrap(ctx context.Context, wg *sync.WaitGroup, name string, ...)
- func Link(span tracer.Span, l *zap.Logger) *zap.Logger
- func PanicWrap(ctx context.Context, name string, body func(context.Context))
- func SpanResource(span Span, resource string)
- func SpanTag(span Span, key string, value interface{})
- func SpanType(span Span, typ string)
- func Start(version string, l *zap.Logger)
- func Stop()
- func Wrap(ctx context.Context, log *zap.Logger, operation string, ...) error
- type Span
Constants ¶
This section is empty.
Variables ¶
var ( StartSpanFromContext = tracer.StartSpanFromContext StartSpan = tracer.StartSpan ChildOf = tracer.ChildOf WithError = tracer.WithError ContextWithSpan = tracer.ContextWithSpan )
reimport relevant bits of the tracer API
Functions ¶
func GoPanicWrap ¶
GoPanicWrap extends PanicWrap by running the body in a goroutine and synchronizing the goroutine exit with the WaitGroup. The body must respect cancellation of the Context.
func Link ¶
Link connects a logger to a particular trace and span. DD APM should provide some additional functionality based on that.
func PanicWrap ¶
PanicWrap executes the body guarding for panics. If panic happens it emits a span with the error attached. This should trigger DD APM's Error Tracking to record the error.