tracing

package
v2.13.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendUserToTrace deprecated

func AppendUserToTrace(_ context.Context, _ string) error

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

Deprecated: AppendUserToTrace previously added CoopID to Datadog-spans, which could be used to look up other PII-information. This is not wanted, and has been replaced with a no-op.

func CreateChildSpan added in v2.9.0

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

CreateChildSpan will create a child-span of the span embedded in sourceCtx. If there is no trace-information in sourceCtx, a noop-span will be returned. The caller is responsible for calling span.Finish().

func CreateNestedTrace deprecated

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

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

Deprecated: Use CreateChildSpan instead.

func LogFieldsWithTrace deprecated

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

Deprecated: LogFieldsWithTrace will be removed in a future major version and should not be used. Use logger.WithContext(ctx Context) from github.com/coopnorge/go-logger

func LogWithTrace deprecated

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

Deprecated: LogWithTrace will be removed in a future major version and should not be used. Use logger.WithContext(ctx Context) from github.com/coopnorge/go-logger

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