trace

package
v0.10.1-0...-caa904f Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: Apache-2.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertTraceContextToSpanContext

func ConvertTraceContextToSpanContext(traceCtx TraceContext) (ddtrace.SpanContext, error)

ConvertTraceContextToSpanContext converts a TraceContext object to a SpanContext that can be used by dd-trace.

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 ends the function execution span and stops the tracer

func (*Listener) HandlerStarted

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

HandlerStarted sets up tracing and starts the function execution span if Datadog tracing is enabled

type TraceContext

type TraceContext map[string]string

TraceContext is map of headers containing a Datadog trace context

func ConvertCurrentXrayTraceContext

func ConvertCurrentXrayTraceContext(ctx context.Context) TraceContext

ConvertCurrentXrayTraceContext returns the current X-Ray trace context converted to Datadog headers, taking into account the current subsegment. It is designed for sending Datadog trace headers from functions instrumented with the X-Ray SDK.

Jump to

Keyboard shortcuts

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