trace

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InvalidTraceId = "00000000000000000000000000000000"
	InvalidSpanId  = "0000000000000000"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type TraceContextInfo

type TraceContextInfo struct {
	// contains filtered or unexported fields
}

TraceContextInfo is the type returned by `OneAgentSDK.GetTraceContextInfo()`. It provides information about the active PurePath node using the TraceContext (Trace ID, Span ID) model as defined in https://www.w3.org/TR/trace-context.

The Span ID represents the active PurePath node and is not intended for tagging or context propagation scenarios, it is primarily designed for log-enrichment use cases.

func NewTraceContextInfo

func NewTraceContextInfo(traceId, spanId string) TraceContextInfo

NewTraceContextInfo creates an instance of TraceContextInfo with given Trace ID and Span ID.

func (*TraceContextInfo) GetSpanId

func (c *TraceContextInfo) GetSpanId() string

GetSpanId returns Span ID represented as lower-case hex-encoded string (see: https://tools.ietf.org/html/rfc4648#section-8).

func (*TraceContextInfo) GetTraceId

func (c *TraceContextInfo) GetTraceId() string

GetTraceId returns Trace ID represented as lower-case hex-encoded string (see: https://tools.ietf.org/html/rfc4648#section-8).

func (*TraceContextInfo) IsValid

func (c *TraceContextInfo) IsValid() bool

IsValid returns true if TraceContextInfo has valid Trace ID and Span ID.

Jump to

Keyboard shortcuts

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