telemetry

package
v4.69.8 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: MIT Imports: 26 Imported by: 23

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddOpenTelemetryToClient

func AddOpenTelemetryToClient(httpClient *http.Client, meterProvider meter.MeterProvider, tracerProvider tr.TracerProvider) *http.Client

func AddToAmqp added in v4.69.7

func AddToAmqp(ctx context.Context, payload amqp.Publishing) amqp.Publishing

func FromAmqp added in v4.69.7

func FromAmqp(ctx context.Context, message amqp.Delivery) context.Context

Types

type Config

type Config struct {
	URL         string
	Rate        string
	TraceUint64 bool
}

func Flags

func Flags(fs *flag.FlagSet, prefix string, overrides ...flags.Override) *Config

type FinishSpan added in v4.64.0

type FinishSpan = func(err *error, options ...tr.SpanEndOption)

func StartSpan

func StartSpan(ctx context.Context, tracer tr.Tracer, name string, opts ...tr.SpanStartOption) (context.Context, FinishSpan)

type OtlpLogger added in v4.69.1

type OtlpLogger struct {
	slog.Handler
	Attributes []slog.Attr
	Uint64     bool
}

func (OtlpLogger) Handle added in v4.69.1

func (tl OtlpLogger) Handle(ctx context.Context, r slog.Record) error

type Service added in v4.64.0

type Service struct {
	TraceUint64 bool
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, config *Config) (Service, error)

func (Service) AddTraceToLogHandler added in v4.69.2

func (s Service) AddTraceToLogHandler(handler slog.Handler) slog.Handler

func (Service) Close added in v4.64.0

func (s Service) Close(ctx context.Context)

func (Service) MeterProvider added in v4.64.0

func (s Service) MeterProvider() meter.MeterProvider

func (Service) Middleware added in v4.64.0

func (s Service) Middleware(name string) func(next http.Handler) http.Handler

func (Service) TracerProvider added in v4.64.0

func (s Service) TracerProvider() tr.TracerProvider

Jump to

Keyboard shortcuts

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