utils

package
v0.0.0-...-69805f1 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: MIT Imports: 13 Imported by: 55

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 EmitUserAuditsLogs

func EmitUserAuditsLogs(ctx context.Context, format string, args ...interface{})

func EmitUserDiagnosticsLogs

func EmitUserDiagnosticsLogs(ctx context.Context, err *error)

func EmitUserDiagnosticsLogsWithPrompt

func EmitUserDiagnosticsLogsWithPrompt(ctx context.Context, err *error, prompt string)

func GetFunctionName

func GetFunctionName() string

GetFunctionName returns the name of the function that called it

func GetFunctionNameWithCallerSkip

func GetFunctionNameWithCallerSkip(skip int) string

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