Documentation
¶
Index ¶
- func GenerateOTLPBearerToken(sharedSecret string, token string) (string, error)
- func GenerateOTLPBearerTokenWithExpiration(sharedSecret string, expiration time.Time) (string, error)
- func New(ctx context.Context, serviceName string, telemetrySecret string, ...) (context.Context, logger.Logger, func(), error)
- func NewLogForwarderWithAPIKey(ctx context.Context, serviceName string, telemetryURL string, ...) (logger.Logger, func(), error)
- func NewWithAPIKey(ctx context.Context, serviceName string, telemetryURL string, ...) (context.Context, logger.Logger, func(), error)
- func StartSpan(ctx context.Context, logger logger.Logger, tracer trace.Tracer, ...) (context.Context, logger.Logger, trace.Span)
- type Option
- func WithDialContext(dial func(ctx context.Context, network, addr string) (net.Conn, error)) Option
- func WithHeaders(headers http.Header) Option
- func WithLogBatchIdleTimeout(d time.Duration) Option
- func WithLogBatchMaxBytes(n int) Option
- func WithLogBatchMaxRecords(n int) Option
- func WithLogBatchMaxStoredBytes(n int64) Option
- func WithLogBatchMaxStoredRecords(n int) Option
- func WithLogBatchPath(path string) Option
- func WithLogEmitQueueSize(n int) Option
- func WithLogWriteBatchSize(n int) Option
- func WithLogWriteInterval(d time.Duration) Option
- func WithMetricBatchMaxStoredBatches(n int) Option
- func WithMetricBatchMaxStoredBytes(n int64) Option
- func WithMetricBatchPath(path string) Option
- func WithResourceAttributes(attrs ...attribute.KeyValue) Option
- func WithShutdownTimeout(dur time.Duration) Option
- func WithTimeout(dur time.Duration) Option
- func WithTraceBatchMaxStoredBatches(n int) Option
- func WithTraceBatchMaxStoredBytes(n int64) Option
- func WithTraceBatchPath(path string) Option
- type ShutdownFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateOTLPBearerToken ¶
func GenerateOTLPBearerTokenWithExpiration ¶ added in v1.0.9
func NewLogForwarderWithAPIKey ¶ added in v1.0.238
func NewLogForwarderWithAPIKey(ctx context.Context, serviceName string, telemetryURL string, telemetryAPIKey string, consoleLogger logger.Logger, opts ...Option) (logger.Logger, func(), error)
NewLogForwarderWithAPIKey creates an OTLP log-only logger backed by the durable local log queue. It does not mutate global OpenTelemetry providers, so callers can safely create multiple forwarders with different resource attributes and durable queue paths in the same process.
func NewWithAPIKey ¶ added in v1.0.27
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
WithDialContext sets a custom dialer for HTTP connections
func WithHeaders ¶ added in v1.0.84
WithHeaders sets custom headers for HTTP connections
func WithLogBatchIdleTimeout ¶ added in v1.0.235
func WithLogBatchMaxBytes ¶ added in v1.0.235
func WithLogBatchMaxRecords ¶ added in v1.0.235
func WithLogBatchMaxStoredBytes ¶ added in v1.0.235
func WithLogBatchMaxStoredRecords ¶ added in v1.0.235
func WithLogBatchPath ¶ added in v1.0.235
func WithLogEmitQueueSize ¶ added in v1.0.235
func WithLogWriteBatchSize ¶ added in v1.0.242
func WithLogWriteInterval ¶ added in v1.0.242
func WithMetricBatchMaxStoredBatches ¶ added in v1.0.235
func WithMetricBatchMaxStoredBytes ¶ added in v1.0.235
func WithMetricBatchPath ¶ added in v1.0.235
func WithResourceAttributes ¶ added in v1.0.238
func WithShutdownTimeout ¶ added in v1.0.236
WithShutdownTimeout sets the per-component timeout used while shutting down telemetry providers and durable queues. Each provider/exporter gets its own budget so a slow OTLP endpoint for logs or metrics cannot starve trace drain.
func WithTimeout ¶ added in v1.0.84
WithTimeout sets a custom timeout for HTTP connections
func WithTraceBatchMaxStoredBatches ¶ added in v1.0.235
func WithTraceBatchMaxStoredBytes ¶ added in v1.0.235
func WithTraceBatchPath ¶ added in v1.0.235
type ShutdownFunc ¶
type ShutdownFunc func()