tracing

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: May 5, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendUserToTrace

func AppendUserToTrace(sourceCtx context.Context, user string) error

AppendUserToTrace includes identifier of user that would be attached to span in datadog

func CreateNestedTrace

func CreateNestedTrace(operation, resource string, sourceCtx context.Context) (ddtrace.Span, error)

CreateNestedTrace will fork parent tracer to attach to parent one with new operation and resource from sourceCtx

func LogFieldsWithTrace

func LogFieldsWithTrace(sourceCtx context.Context, severity logger.Level, message string, fields logger.Fields)

LogFieldsWithTrace will log message by logger.Level with trace if it's present in context.Context

func LogWithTrace

func LogWithTrace(sourceCtx context.Context, severity logger.Level, message string)

LogWithTrace will log message by logger.Level with trace if it's present in context.Context

func OverrideTraceResourceName

func OverrideTraceResourceName(sourceCtx context.Context, newResourceName string) error

OverrideTraceResourceName set custom resource name for traced span aka SQL Query, Request, I/O etc

Types

type TraceDetails

type TraceDetails struct {
	// DatadogSpan represents a chunk of computation time for Datadog system
	DatadogSpan ddtrace.Span
}

TraceDetails that must be included in context

Jump to

Keyboard shortcuts

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