trace

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSpan

func NewSpan(ctx context.Context, cfg *SpanConfig) (*v1.Span, error)

func Push

func Push(ctx context.Context, cfg *PushConfig) error

Types

type PushConfig

type PushConfig struct {
	Mode PushMode
	Span *v1.Span
}

type PushMode

type PushMode string
const (
	PushModeStdout   PushMode = "stdout"
	PushModeOtlp     PushMode = "otlp"
	PushModeOtlpHttp PushMode = "otlphttp"
)

func (*PushMode) Set

func (m *PushMode) Set(s string) error

func (*PushMode) String

func (m *PushMode) String() string

func (*PushMode) Type

func (m *PushMode) Type() string

type SpanAttributes

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

func (*SpanAttributes) Set

func (a *SpanAttributes) Set(s string) error

func (*SpanAttributes) String

func (a *SpanAttributes) String() string

func (*SpanAttributes) Type

func (a *SpanAttributes) Type() string

type SpanConfig

type SpanConfig struct {
	TraceID     []byte
	SpanID      []byte
	TraceState  string
	TraceParent TraceParent
	Name        string
	StartTime   SpanTime
	EndTime     SpanTime
	Attributes  SpanAttributes
	Status      struct {
		Code        StatusCode
		Description string
	}
	BaseSpan *v1.Span
}

type SpanTime

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

func (*SpanTime) Set

func (v *SpanTime) Set(s string) error

func (*SpanTime) String

func (v *SpanTime) String() string

func (*SpanTime) Type

func (v *SpanTime) Type() string

type StatusCode

type StatusCode uint64
const (
	StatusCodeUnset StatusCode = 0
	StatusCodeOk    StatusCode = 1
	StatusCodeError StatusCode = 2
)

func (*StatusCode) Set

func (m *StatusCode) Set(s string) error

func (*StatusCode) String

func (m *StatusCode) String() string

func (*StatusCode) Type

func (m *StatusCode) Type() string

type TraceParent

type TraceParent struct {
	Version    byte
	TraceID    [16]byte
	ParentID   [8]byte
	TraceFlags byte
	// contains filtered or unexported fields
}

func (*TraceParent) IsValid

func (t *TraceParent) IsValid() bool

func (*TraceParent) Set

func (t *TraceParent) Set(s string) error

func (*TraceParent) String

func (t *TraceParent) String() string

func (*TraceParent) Type

func (v *TraceParent) Type() string

Jump to

Keyboard shortcuts

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