Help us shape the future of Go! Take the 2026 Go Developer Survey

telemetry

package
v0.2.197 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

Package telemetry owns the operator's operational telemetry policy.

Index

Constants

View Source
const Scope = "github.com/kubescape/operator/telemetry"

Variables

This section is empty.

Functions

func Admission

func Admission(ctx context.Context, outcome string, elapsed time.Duration)

Admission records only fixed outcomes; it never exports objects or rule IDs.

func ConfigureEndpoint

func ConfigureEndpoint(ctx context.Context, base string) (bool, error)

ConfigureEndpoint returns false for explicit global opt-out. An explicitly empty base skips discovery but still allows per-signal overrides.

func Init

func Init(ctx context.Context, cfg otelsetup.ProviderConfig, enabled bool) (func(context.Context) error, error)

Init uses exactly one shared provider set. Conservative defaults can be overridden via standard SDK environment variables (see docs/telemetry.md).

func Kind

func Kind(command string) string

Only enumerated classifications enter exported data, including span names.

func ObserveAdmission

func ObserveAdmission(size, capacity func() int) (metric.Registration, error)

func ObservePool

func ObservePool(running, waiting, capacity func() int) (metric.Registration, error)

ObservePool reports pressure independently of workload identity. Registration is owned by the pool's lifetime and must be released on shutdown.

func Reconcile

func Reconcile(ctx context.Context) (context.Context, func(error))

Reconcile instruments one autoscaler control cycle without node-group labels.

Types

type Recorder

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

func NewRecorder

func NewRecorder() *Recorder

func (*Recorder) Begin

func (r *Recorder) Begin(ctx context.Context, command string) (context.Context, func(error))

Begin counts every operation; high-volume work only creates a retrospectively timed slow-path span after 10s, globally gated to one per minute.

Jump to

Keyboard shortcuts

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