telemetry

package
v1.0.235 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: MIT Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateOTLPBearerToken

func GenerateOTLPBearerToken(sharedSecret string, token string) (string, error)

func GenerateOTLPBearerTokenWithExpiration added in v1.0.9

func GenerateOTLPBearerTokenWithExpiration(sharedSecret string, expiration time.Time) (string, error)

func New

func New(ctx context.Context, serviceName string, telemetrySecret string, telemetryURL string, consoleLogger logger.Logger, opts ...Option) (context.Context, logger.Logger, func(), error)

func NewWithAPIKey added in v1.0.27

func NewWithAPIKey(ctx context.Context, serviceName string, telemetryURL string, telemetryAPIKey string, consoleLogger logger.Logger, opts ...Option) (context.Context, logger.Logger, func(), error)

func StartSpan

func StartSpan(ctx context.Context, logger logger.Logger, tracer trace.Tracer, spanName string, opts ...trace.SpanStartOption) (context.Context, logger.Logger, trace.Span)

Types

type Option added in v1.0.84

type Option func(*config)

Option is a functional option for configuring telemetry

func WithDialContext added in v1.0.106

func WithDialContext(dial func(ctx context.Context, network, addr string) (net.Conn, error)) Option

WithDialContext sets a custom dialer for HTTP connections

func WithHeaders added in v1.0.84

func WithHeaders(headers http.Header) Option

WithHeaders sets custom headers for HTTP connections

func WithLogBatchIdleTimeout added in v1.0.235

func WithLogBatchIdleTimeout(d time.Duration) Option

func WithLogBatchMaxBytes added in v1.0.235

func WithLogBatchMaxBytes(n int) Option

func WithLogBatchMaxRecords added in v1.0.235

func WithLogBatchMaxRecords(n int) Option

func WithLogBatchMaxStoredBytes added in v1.0.235

func WithLogBatchMaxStoredBytes(n int64) Option

func WithLogBatchMaxStoredRecords added in v1.0.235

func WithLogBatchMaxStoredRecords(n int) Option

func WithLogBatchPath added in v1.0.235

func WithLogBatchPath(path string) Option

func WithLogEmitQueueSize added in v1.0.235

func WithLogEmitQueueSize(n int) Option

func WithMetricBatchMaxStoredBatches added in v1.0.235

func WithMetricBatchMaxStoredBatches(n int) Option

func WithMetricBatchMaxStoredBytes added in v1.0.235

func WithMetricBatchMaxStoredBytes(n int64) Option

func WithMetricBatchPath added in v1.0.235

func WithMetricBatchPath(path string) Option

func WithTimeout added in v1.0.84

func WithTimeout(dur time.Duration) Option

WithTimeout sets a custom timeout for HTTP connections

func WithTraceBatchMaxStoredBatches added in v1.0.235

func WithTraceBatchMaxStoredBatches(n int) Option

func WithTraceBatchMaxStoredBytes added in v1.0.235

func WithTraceBatchMaxStoredBytes(n int64) Option

func WithTraceBatchPath added in v1.0.235

func WithTraceBatchPath(path string) Option

type ShutdownFunc

type ShutdownFunc func()

Jump to

Keyboard shortcuts

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