tracing

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	OtelHTTPEndpoint string
	OtelGRPCEndpoint string
	Logger           logging.LoggerInterface

	Enabled bool
}

func NewConfig

func NewConfig(enabled bool, otelGRPCEndpoint, otelHTTPEndpoint string, logger logging.LoggerInterface) *Config

func NewNoopConfig added in v0.12.0

func NewNoopConfig() *Config

type Middleware

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

Middleware is the monitoring middleware object implementing Prometheus monitoring

func NewMiddleware

func NewMiddleware(monitor monitoring.MonitorInterface, logger logging.LoggerInterface) *Middleware

NewMiddleware returns a Middleware based on the type of monitor

func (*Middleware) OpenTelemetry

func (mdw *Middleware) OpenTelemetry(handler http.Handler) http.Handler

type Tracer

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

func NewNoopTracer added in v0.12.0

func NewNoopTracer() *Tracer

func NewTracer

func NewTracer(cfg *Config) *Tracer

basic tracer implementation of trace.Tracer, just adding some extra configuration

func (*Tracer) Start

func (t *Tracer) Start(ctx context.Context, spanName string, opts ...trace.SpanStartOption) (context.Context, trace.Span)

type TracingInterface added in v0.12.0

type TracingInterface interface {
	Start(ctx context.Context, spanName string, opts ...trace.SpanStartOption) (context.Context, trace.Span)
}

Jump to

Keyboard shortcuts

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