traceparent

package
v1.31.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DoNotRecordFlag Flag    = "00"
	RecordFlag      Flag    = "01"
	CurrentVersion  Version = "00"
)

Variables

View Source
var DefaultConfig = Config{
	RecordFlag,
	CurrentVersion,
}

Functions

This section is empty.

Types

type Config

type Config struct {
	Flag    Flag
	Version Version
}

type Flag

type Flag string

type Traceparent

type Traceparent struct {
	Config
	TraceID string
	SpanID  string
}

func Generate

func Generate() (*Traceparent, error)

func GenerateCustom

func GenerateCustom(c Config) (*Traceparent, error)

func New

func New(traceID, spanID string) *Traceparent

func NewCustom

func NewCustom(traceID, spanID string, c Config) *Traceparent

func Parse

func Parse(s string) (*Traceparent, error)

func (*Traceparent) Pretty

func (t *Traceparent) Pretty() string

func (*Traceparent) SetHeader

func (t *Traceparent) SetHeader(req *http.Request)

func (*Traceparent) String

func (t *Traceparent) String() string

type Version

type Version string

Jump to

Keyboard shortcuts

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