telemetry

package
v4.64.5 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: MIT Imports: 23 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 AddTraceToLogger

func AddTraceToLogger(span tr.Span, logger *slog.Logger) *slog.Logger

Types

type Config

type Config struct {
	URL  string
	Rate string
}

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 Service added in v4.64.0

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

func New

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

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