b3

package
v0.0.0-...-9ac8be7 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TraceIDKey     = "B3-Trace-ID"
	SpanIDKey      = "B3-Span-ID"
	SpanSampledKey = "B3-Span-Sampled"
)

Message attribute keys

Variables

This section is empty.

Functions

This section is empty.

Types

type Attributes

type Attributes map[string]string

Attributes is a temporary store for message attributes for translating between SQS and SNS message attribute values

func MessageAttributeValueToAttributes

func MessageAttributeValueToAttributes(v interface{}) Attributes

MessageAttributeValueToAttributes converts MessageAttributeValues to key value map

type Propagator

type Propagator struct{}

Propagator implements the Propagator interface using B3 style formatting to propagate Span contexts on SNS / SQS messages

func New

func New() *Propagator

New constructs a new B3 based propagator

func (*Propagator) SpanContextFromMessageAttributes

func (p *Propagator) SpanContextFromMessageAttributes(v interface{}) (trace.SpanContext, bool)

SpanContextFromMessageAttributes returns a trace.SpanContext based on a SQS message

func (*Propagator) SpanContextToMessageAttributes

func (p *Propagator) SpanContextToMessageAttributes(sc trace.SpanContext, t interface{}) bool

SpanContextToMessageAttributes takes a trace.SpanContext and adds attributes to a given SQS / SNS message

Jump to

Keyboard shortcuts

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