data

package
v1.0.0-rcv0013 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SpanID

type SpanID [spanIDSize]byte

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

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 [traceIDSize]byte

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

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

Jump to

Keyboard shortcuts

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