Documentation ¶
Index ¶
- Constants
- func BoolEnv(key string, def bool) bool
- func EndSpan(span tracer.Span)
- func EndSpanError(span tracer.Span, e error)
- func EndSpanTags(span tracer.Span, tags SpanTags)
- func EndSpanTagsError(span tracer.Span, tags SpanTags, e error)
- func FinishRequestSpan(s tracer.Span, status int, opts ...tracer.FinishOption)
- func FromContext(ctx *fasthttp.RequestCtx) ddtrace.Span
- func IntEnv(key string, def int) int
- func Middleware(f fasthttp.RequestHandler) fasthttp.RequestHandler
- func StartChildSpan(ctx *fasthttp.RequestCtx, operationName string, tags SpanTags) ddtrace.Span
- func StartDDSpan(operationName string, parentSpan tracer.Span, spanType string, tags SpanTags) tracer.Span
- func StartRequestSpan(r *http.Request, opts ...ddtrace.StartSpanOption) (tracer.Span, context.Context)
- type DDTraceResult
- type SpanTags
Constants ¶
const DataDogTransaction = "__datadog_ctx_fasthttp__"
DataDogTransaction - key context transaction
Variables ¶
This section is empty.
Functions ¶
func BoolEnv ¶
BoolEnv returns the parsed boolean value of an environment variable, or def otherwise.
func EndSpanError ¶
EndSpanError finishes a datadog span.
func EndSpanTags ¶
EndSpanTags finishes a datadog span.
func EndSpanTagsError ¶
EndSpanTagsError finishes a datadog span.
func FinishRequestSpan ¶
func FinishRequestSpan(s tracer.Span, status int, opts ...tracer.FinishOption)
FinishRequestSpan finishes the given HTTP request span and sets the expected response-related tags such as the status code. Any further span finish option can be added with opts.
func FromContext ¶
func FromContext(ctx *fasthttp.RequestCtx) ddtrace.Span
FromContext - datadog from context
func Middleware ¶
func Middleware(f fasthttp.RequestHandler) fasthttp.RequestHandler
Middleware - middleware para fasthpp new relic
func StartChildSpan ¶
StartChildSpan child span
func StartDDSpan ¶
func StartDDSpan(operationName string, parentSpan tracer.Span, spanType string, tags SpanTags) tracer.Span
StartDDSpan starts a datadog span.
func StartRequestSpan ¶
func StartRequestSpan(r *http.Request, opts ...ddtrace.StartSpanOption) (tracer.Span, context.Context)
StartRequestSpan starts an HTTP request span with the standard list of HTTP request span tags (http.method, http.url, http.useragent). Any further span start option can be added with opts.