trace

package
v0.9.1-0...-64b69e3 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextWithTraceContext

func ContextWithTraceContext(ctx context.Context, ev json.RawMessage) (context.Context, error)

ContextWithTraceContext uses the incoming event and/or context object payloads to determine the current TraceContext and then adds that TraceContext to the context object

Types

type Config

type Config struct {
	DDTraceEnabled  bool
	MergeXrayTraces bool
}

Config gives options for how the Listener should work

type Listener

type Listener struct {
	// contains filtered or unexported fields
}

Listener creates a function execution span and injects it into the context

func MakeListener

func MakeListener(config Config) Listener

MakeListener initializes a new trace lambda Listener

func (*Listener) HandlerFinished

func (l *Listener) HandlerFinished(ctx context.Context)

HandlerFinished finishes the function execution span (if it was started) and stops the tracer

func (*Listener) HandlerStarted

func (l *Listener) HandlerStarted(ctx context.Context, msg json.RawMessage) context.Context

HandlerStarted creates the function execution span representing the Lambda function execution and adds that span to the context so that the user can create child spans (if Datadog tracing is enabled)

type TraceContext

type TraceContext map[string]string

TraceContext is map of headers containing a Datadog trace context

func GetTraceHeaders

func GetTraceHeaders(ctx context.Context, useCurrentSegmentAsParent bool) TraceContext

GetTraceHeaders retrieves the current trace headers that should be added to outbound requests

Jump to

Keyboard shortcuts

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