ddfasthttp

package module
v0.0.0-...-bd5f221 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const DataDogTransaction = "__datadog_ctx_fasthttp__"

DataDogTransaction - key context transaction

Variables

This section is empty.

Functions

func BoolEnv

func BoolEnv(key string, def bool) bool

BoolEnv returns the parsed boolean value of an environment variable, or def otherwise.

func EndSpan

func EndSpan(span tracer.Span)

EndSpan finishes a datadog span.

func EndSpanError

func EndSpanError(span tracer.Span, e error)

EndSpanError finishes a datadog span.

func EndSpanTags

func EndSpanTags(span tracer.Span, tags SpanTags)

EndSpanTags finishes a datadog span.

func EndSpanTagsError

func EndSpanTagsError(span tracer.Span, tags SpanTags, e error)

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 IntEnv

func IntEnv(key string, def int) int

IntEnv returns the parsed int value of an environment variable, or def otherwise.

func Middleware

Middleware - middleware para fasthpp new relic

func StartChildSpan

func StartChildSpan(ctx *fasthttp.RequestCtx, operationName string, tags SpanTags) ddtrace.Span

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.

Types

type DDTraceResult

type DDTraceResult func() (SpanTags, error)

DDTraceResult provides result.

type SpanTags

type SpanTags map[string]interface{}

SpanTags is tags of span.

Jump to

Keyboard shortcuts

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