Documentation
¶
Overview ¶
Package telemetry owns synchronizer operational instrumentation. Providers and transport are supplied by go-logger/otelsetup; sandbox events are independent.
Index ¶
- Constants
- func ConfigureEndpoint(ctx context.Context, base string, ...) error
- func Init(ctx context.Context, cfg otelsetup.ProviderConfig, apiURL string) func()
- func LoadServices(ctx context.Context, base string) (schema.IBackendServices, error)
- type Instruments
- func (i *Instruments) Begin(ctx context.Context, op string) func(error, int)
- func (i *Instruments) Connection(ctx context.Context, delta int64)
- func (i *Instruments) Control(ctx context.Context, op string) (context.Context, func(error))
- func (i *Instruments) Drop(ctx context.Context, reason string)
- func (i *Instruments) Span(ctx context.Context, op string, start time.Time, err error)
Constants ¶
const EndpointEnv = "OTEL_EXPORTER_OTLP_ENDPOINT"
Variables ¶
This section is empty.
Functions ¶
func ConfigureEndpoint ¶
func ConfigureEndpoint(ctx context.Context, base string, get func(context.Context, string) (schema.IBackendServices, error)) error
ConfigureEndpoint intentionally distinguishes unset from explicitly empty. It never discovers or modifies the independent sandbox events endpoint.
func Init ¶
func Init(ctx context.Context, cfg otelsetup.ProviderConfig, apiURL string) func()
Init must precede logger and instrument construction. All telemetry failures are nonfatal; errors are deliberately fixed text to avoid leaking endpoints.
func LoadServices ¶
LoadServices reuses the v3 client URL/parser with a bounded transport. The shared client's Get uses http.Get without a deadline or response-body close.
Types ¶
type Instruments ¶
type Instruments struct {
// contains filtered or unexported fields
}
func Default ¶
func Default() *Instruments
func New ¶
func New() *Instruments
func (*Instruments) Begin ¶
Begin aggregates ordinary work; only completed operations taking >=1s create a retrospective slow span, with an additional process-wide 10s creation gate. A timer exists only while work is active and is stopped on completion.
func (*Instruments) Connection ¶
func (i *Instruments) Connection(ctx context.Context, delta int64)