natsutil

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTraceContextFromMsg

func GetTraceContextFromMsg(msg *nats.Msg) (spanContext trace.SpanContext, err error)

GetTraceContextFromMsg attempts to create a span context from the provided NATS message by reading the trace ID and the span ID from its headers.

func NewTraceMsg

func NewTraceMsg(ctx context.Context, subject string) *nats.Msg

NewTraceMsg is a wrapper around nats.NewMsg() which essentially attempts to get the span context from the given context and adds the trace ID and span ID to the NATS message.

Types

This section is empty.

Jump to

Keyboard shortcuts

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