otelstorage

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package otelstorage contains common types and utilities for storing OpenTelemetry data.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attrs

type Attrs pcommon.Map

Attrs is a YSON wrapper for attributes.

func (Attrs) AsMap

func (m Attrs) AsMap() pcommon.Map

AsMap returns Attrs as pcommon.Map.

func (Attrs) CopyTo

func (m Attrs) CopyTo(target pcommon.Map)

CopyTo copies all attributes from m to target.

func (Attrs) MarshalYSON

func (m Attrs) MarshalYSON(w *yson.Writer) error

MarshalYSON implemenets yson.StreamMarshaler.

func (*Attrs) UnmarshalYSON

func (m *Attrs) UnmarshalYSON(r *yson.Reader) error

UnmarshalYSON implemenets yson.StreamUnmarshaler.

type SpanID

type SpanID [8]byte

SpanID is OpenTelemetry span ID.

func SpanIDFromUint64

func SpanIDFromUint64(v uint64) (r SpanID)

SpanIDFromUint64 creates new SpanID from uint64.

func (SpanID) AsUint64

func (id SpanID) AsUint64() uint64

AsUint64 returns span ID as LittleEndian uint64.

func (SpanID) Hex

func (id SpanID) Hex() string

Hex returns a hex representation of SpanID.

func (SpanID) IsEmpty

func (id SpanID) IsEmpty() bool

IsEmpty returns true if span ID is empty.

func (SpanID) MarshalYSON

func (id SpanID) MarshalYSON(w *yson.Writer) error

MarshalYSON implemenets yson.StreamMarshaler.

func (*SpanID) UnmarshalYSON

func (id *SpanID) UnmarshalYSON(r *yson.Reader) error

UnmarshalYSON implemenets yson.StreamUnmarshaler.

type Timestamp

type Timestamp = pcommon.Timestamp

Timestamp is a time specified as UNIX Epoch time in nanoseconds since 1970-01-01 00:00:00 +0000 UTC.

func NewTimestampFromTime

func NewTimestampFromTime(t time.Time) Timestamp

NewTimestampFromTime creates new Timestamp from time.Time.

type TraceID

type TraceID [16]byte

TraceID is OpenTelemetry trace ID.

func ParseTraceID

func ParseTraceID(input string) (_ TraceID, err error)

ParseTraceID parses trace ID from given string.

Deals with missing leading zeroes.

func (TraceID) Hex

func (id TraceID) Hex() string

Hex returns a hex representation of TraceID.

func (TraceID) IsEmpty

func (id TraceID) IsEmpty() bool

IsEmpty returns true if span ID is empty.

func (TraceID) MarshalYSON

func (id TraceID) MarshalYSON(w *yson.Writer) error

MarshalYSON implemenets yson.StreamMarshaler.

func (*TraceID) UnmarshalYSON

func (id *TraceID) UnmarshalYSON(r *yson.Reader) error

UnmarshalYSON implemenets yson.StreamUnmarshaler.

Jump to

Keyboard shortcuts

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