natsprop

package module
v0.0.0-...-b1b98f9 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SubjectKey      = attribute.Key("nats.subject")
	SubjectReplySub = attribute.Key("nats.request.subject")
)

Variables

This section is empty.

Functions

func Extract

func Extract(ctx context.Context, msg *nats.Msg, opts ...Option) ([]attribute.KeyValue, baggage.Baggage, trace.SpanContext)

Extract returns the Attributes, Context Entries, and SpanContext that were encoded by Inject.

func Inject

func Inject(ctx context.Context, msg *nats.Msg, opts ...Option)

func NewAttributesFromNATSRequest

func NewAttributesFromNATSRequest(msg *nats.Msg) []attribute.KeyValue

Types

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option allows configuration of the httptrace Extract() and Inject() functions.

func WithPropagators

func WithPropagators(props propagation.TextMapPropagator) Option

WithPropagators sets the propagators to use for Extraction and Injection

Jump to

Keyboard shortcuts

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