Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SpanID

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

SpanID is a custom data type that is used for all span_id fields in OTLP Protobuf messages.

func NewSpanID

func NewSpanID(bytes [8]byte) SpanID

NewSpanID creates a SpanID from a byte slice.

func (SpanID) Bytes

func (sid SpanID) Bytes() [8]byte

Bytes returns the byte array representation of the SpanID.

func (SpanID) Equal

func (sid SpanID) Equal(that SpanID) bool

Equal returns true if ids are equal.

func (SpanID) HexString

func (sid SpanID) HexString() string

HexString returns hex representation of the ID.

func (SpanID) IsEmpty

func (sid SpanID) IsEmpty() bool

IsEmpty returns true if id contains at least one non-zero byte.

func (SpanID) MarshalJSON

func (sid SpanID) MarshalJSON() ([]byte, error)

MarshalJSON converts SpanID into a hex string enclosed in quotes.

func (*SpanID) MarshalTo

func (sid *SpanID) MarshalTo(data []byte) (n int, err error)

MarshalTo converts trace ID into a binary representation. Called by Protobuf serialization.

func (*SpanID) Size

func (sid *SpanID) Size() int

Size returns the size of the data to serialize.

func (*SpanID) Unmarshal

func (sid *SpanID) Unmarshal(data []byte) error

Unmarshal inflates this trace ID from binary representation. Called by Protobuf serialization.

func (*SpanID) UnmarshalJSON

func (sid *SpanID) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes SpanID from hex string, possibly enclosed in quotes. Called by Protobuf JSON deserialization.

type TraceID

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

TraceID is a custom data type that is used for all trace_id fields in OTLP Protobuf messages.

func NewTraceID

func NewTraceID(bytes [16]byte) TraceID

NewTraceID creates a TraceID from a byte slice.

func (TraceID) Bytes

func (tid TraceID) Bytes() [16]byte

Bytes returns the byte array representation of the TraceID.

func (TraceID) Equal

func (tid TraceID) Equal(that TraceID) bool

Equal returns true if ids are equal.

func (TraceID) HexString

func (tid TraceID) HexString() string

HexString returns hex representation of the ID.

func (TraceID) IsEmpty

func (tid TraceID) IsEmpty() bool

IsEmpty returns true if id contains at leas one non-zero byte.

func (TraceID) MarshalJSON

func (tid TraceID) MarshalJSON() ([]byte, error)

MarshalJSON converts trace id into a hex string enclosed in quotes.

func (*TraceID) MarshalTo

func (tid *TraceID) MarshalTo(data []byte) (n int, err error)

MarshalTo converts trace ID into a binary representation. Called by Protobuf serialization.

func (*TraceID) Size

func (tid *TraceID) Size() int

Size returns the size of the data to serialize.

func (*TraceID) Unmarshal

func (tid *TraceID) Unmarshal(data []byte) error

Unmarshal inflates this trace ID from binary representation. Called by Protobuf serialization.

func (*TraceID) UnmarshalJSON

func (tid *TraceID) UnmarshalJSON(data []byte) error

UnmarshalJSON inflates trace id from hex string, possibly enclosed in quotes. Called by Protobuf JSON deserialization.

Directories

Path Synopsis
protogen
collector/logs/v1
Package v1 is a reverse proxy.
Package v1 is a reverse proxy.
collector/metrics/v1
Package v1 is a reverse proxy.
Package v1 is a reverse proxy.
collector/trace/v1
Package v1 is a reverse proxy.
Package v1 is a reverse proxy.