tracer

package
v0.0.0-...-663eb47 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddInt64

func AddInt64(ctx context.Context, component string, name string, value int64, opts ...metric.AddOption) error

func MustAddInt64

func MustAddInt64(ctx context.Context, component string, name string, value int64, opts ...metric.AddOption)

func NewMetric

func NewMetric(ctx context.Context, component string, opts ...metric.MeterOption) metric.Meter

func NewSpan

func NewSpan(ctx context.Context, name string, attributes ...attribute.KeyValue) (context.Context, trace.Span)

func RecordError

func RecordError(span trace.Span, description string, err error)

func Start

func Start(ctx context.Context, wg *sync.WaitGroup)

func StartTracer

func StartTracer(ctx context.Context) (*sdktrace.TracerProvider, error)

Types

type Component

type Component struct{}

func NewComponent

func NewComponent() *Component

func (*Component) Name

func (d *Component) Name() string

func (*Component) Start

func (d *Component) Start(ctx context.Context, wg *sync.WaitGroup)

type MockTracer

type MockTracer struct {
	trace.Span
}

func (*MockTracer) AddEvent

func (t *MockTracer) AddEvent(string, ...trace.EventOption)

func (*MockTracer) End

func (t *MockTracer) End(...trace.SpanEndOption)

func (*MockTracer) IsRecording

func (t *MockTracer) IsRecording() bool

func (*MockTracer) RecordError

func (t *MockTracer) RecordError(error, ...trace.EventOption)

func (*MockTracer) SetAttributes

func (t *MockTracer) SetAttributes(...attribute.KeyValue)

func (*MockTracer) SetName

func (t *MockTracer) SetName(string)

func (*MockTracer) SetStatus

func (t *MockTracer) SetStatus(codes.Code, string)

func (*MockTracer) SpanContext

func (t *MockTracer) SpanContext() trace.SpanContext

func (*MockTracer) TracerProvider

func (t *MockTracer) TracerProvider() trace.TracerProvider

Jump to

Keyboard shortcuts

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