instrumentation

package
v0.0.0-...-035f276 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IInstrumentationProvider

type IInstrumentationProvider interface {
	// GetTracerProvider is function that gets a string as the context of the tracer and returns new tracer provider
	//with context of the struct.
	GetTracerProvider(context string) (tracer trace.ITracerProvider)
	// GetMetricSubmitter is function that returns metric submitter.
	GetMetricSubmitter() (metricSubmitter metric.IMetricSubmitter)
}

IInstrumentationProvider is the instrumentation provider interface that provides tracer and metric submitter

func NewNoOpInstrumentationProvider

func NewNoOpInstrumentationProvider() (provider IInstrumentationProvider)

NewNoOpInstrumentationProvider Ctor for NoOpInstrumentationProvider

type IInstrumentationProviderFactory

type IInstrumentationProviderFactory interface {
	// CreateInstrumentationProvider  creates instrumentation provider.
	CreateInstrumentationProvider() (IInstrumentationProvider, error)
}

IInstrumentationProviderFactory InstrumentationFactory - Instrumentation factory interface

type InstrumentationProvider

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

InstrumentationProvider struct manage the instrumentation of the server

func NewInstrumentationProvider

func NewInstrumentationProvider(tracer trace.ITracer, metricSubmitter metric.IMetricSubmitter) (provider *InstrumentationProvider)

NewInstrumentationProvider Ctor for InstrumentationProvider

func (*InstrumentationProvider) GetMetricSubmitter

func (provider *InstrumentationProvider) GetMetricSubmitter() (metricSubmitter metric.IMetricSubmitter)

GetMetricSubmitter implements IInstrumentationProvider.GetMetricSubmitter method of IInstrumentationProvider interface

func (*InstrumentationProvider) GetTracerProvider

func (provider *InstrumentationProvider) GetTracerProvider(context string) (tracer trace.ITracerProvider)

GetTracerProvider implements IInstrumentationProvider.GetTracer method of IInstrumentationProvider interface - register the logger with the context.

type InstrumentationProviderConfiguration

type InstrumentationProviderConfiguration struct {
}

InstrumentationProviderConfiguration is the configuration of the instrumentation.

type InstrumentationProviderFactory

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

InstrumentationProviderFactory a factory for creating a instrumentation entry

func NewInstrumentationProviderFactory

func NewInstrumentationProviderFactory(
	configuration *InstrumentationProviderConfiguration,
	tracerFactory trace.ITracerFactory,
	metricSubmitterFactory metric.IMetricSubmitterFactory) (factory *InstrumentationProviderFactory)

NewInstrumentationProviderFactory returns new InstrumentationFactory

func (*InstrumentationProviderFactory) CreateInstrumentationProvider

func (factory *InstrumentationProviderFactory) CreateInstrumentationProvider() (instrumentationProvider IInstrumentationProvider, err error)

CreateInstrumentationProvider creates instrumentation using Tivan infra.

type NoOpInstrumentationProvider

type NoOpInstrumentationProvider struct {
}

NoOpInstrumentationProvider is implementation that does nothing of IInstrumentationProvider. NoOp is used for testing/debugging.

func (*NoOpInstrumentationProvider) GetMetricSubmitter

func (n *NoOpInstrumentationProvider) GetMetricSubmitter() (metricSubmitter metric.IMetricSubmitter)

func (*NoOpInstrumentationProvider) GetTracerProvider

func (n *NoOpInstrumentationProvider) GetTracerProvider(context string) (tracer trace.ITracerProvider)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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