natsprop

package module
v2.0.0-...-341fd6f Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2022 License: MIT Imports: 7 Imported by: 1

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