utils

package
v0.0.0-...-5785f03 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: MIT Imports: 11 Imported by: 48

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAttributesToSpan

func AddAttributesToSpan(span trace.Span, attributes map[string]string)

func CloseSpanWithCOAResponse

func CloseSpanWithCOAResponse(span trace.Span, resp v1alpha2.COAResponse) v1alpha2.COAResponse

func CloseSpanWithError

func CloseSpanWithError(span trace.Span, err *error)

func GetFunctionName

func GetFunctionName() string

GetFunctionName returns the name of the function that called it

func GetTraceSamplingRate

func GetTraceSamplingRate(rate string) float64

func GetVendor

func GetVendor(apiPath string) (string, string)

func IsTracingEnabled

func IsTracingEnabled(rate string) bool

func PropagateSpanContextToHttpRequestHeader

func PropagateSpanContextToHttpRequestHeader(req *http.Request)

func SpanFromContext

func SpanFromContext(ctx context.Context) *trace.Span

func SpanToFastHTTPContext

func SpanToFastHTTPContext(ctx *fasthttp.RequestCtx, span *trace.Span)

func UpdateSpanStatusFromCOAResponse

func UpdateSpanStatusFromCOAResponse(span trace.Span, resp v1alpha2.COAResponse)

Types

This section is empty.

Jump to

Keyboard shortcuts

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