tracer

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2022 License: Unlicense Imports: 17 Imported by: 0

Documentation

Overview

Package tracer is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var (
	String = attribute.String

	Error = func(e error) attribute.KeyValue {
		return String("error", fmt.Sprintf("%e", e))
	}
)

Functions

This section is empty.

Types

type Attributes

type Attributes = attribute.KeyValue

type MockTracer

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

MockTracer is a mock of Tracer interface.

func NewMockTracer

func NewMockTracer(ctrl *gomock.Controller) *MockTracer

NewMockTracer creates a new mock instance.

func (*MockTracer) EXPECT

func (m *MockTracer) EXPECT() *MockTracerMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTracer) Extract

func (m *MockTracer) Extract(ctx context.Context, carrier TextMapCarrier) context.Context

Extract mocks base method.

func (*MockTracer) Inject

func (m *MockTracer) Inject(ctx context.Context, carrier TextMapCarrier) error

Inject mocks base method.

func (*MockTracer) ServiceName

func (m *MockTracer) ServiceName() string

ServiceName mocks base method.

func (*MockTracer) Span

func (m *MockTracer) Span(ctx context.Context, options ...Attributes) (context.Context, TSpan)

Span mocks base method.

func (*MockTracer) SpanName

func (m *MockTracer) SpanName(ctx context.Context, name string, options ...Attributes) (context.Context, TSpan)

SpanName mocks base method.

func (*MockTracer) Stop

func (m *MockTracer) Stop(ctx context.Context) error

Stop mocks base method.

type MockTracerMockRecorder

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

MockTracerMockRecorder is the mock recorder for MockTracer.

func (*MockTracerMockRecorder) Extract

func (mr *MockTracerMockRecorder) Extract(ctx, carrier interface{}) *gomock.Call

Extract indicates an expected call of Extract.

func (*MockTracerMockRecorder) Inject

func (mr *MockTracerMockRecorder) Inject(ctx, carrier interface{}) *gomock.Call

Inject indicates an expected call of Inject.

func (*MockTracerMockRecorder) ServiceName

func (mr *MockTracerMockRecorder) ServiceName() *gomock.Call

ServiceName indicates an expected call of ServiceName.

func (*MockTracerMockRecorder) Span

func (mr *MockTracerMockRecorder) Span(ctx interface{}, options ...interface{}) *gomock.Call

Span indicates an expected call of Span.

func (*MockTracerMockRecorder) SpanName

func (mr *MockTracerMockRecorder) SpanName(ctx, name interface{}, options ...interface{}) *gomock.Call

SpanName indicates an expected call of SpanName.

func (*MockTracerMockRecorder) Stop

func (mr *MockTracerMockRecorder) Stop(ctx interface{}) *gomock.Call

Stop indicates an expected call of Stop.

type TSpan

type TSpan struct {
	trace.Span
}

type TextMapCarrier

type TextMapCarrier = propagation.TextMapCarrier

type Tracer

type Tracer interface {
	ServiceName() string
	Span(ctx context.Context, options ...Attributes) (context.Context, TSpan)
	SpanName(ctx context.Context, name string, options ...Attributes) (context.Context, TSpan)
	Extract(ctx context.Context, carrier TextMapCarrier) context.Context
	Inject(ctx context.Context, carrier TextMapCarrier) error
	Stop(ctx context.Context) error
}

func New

func New(endpoint, service, env, version string) (Tracer, error)

func NewNoop

func NewNoop() Tracer

func Setup

func Setup(lc fx.Lifecycle, endpoint, service, env, version string) (Tracer, error)

Jump to

Keyboard shortcuts

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