telemetry

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOrCreateInstallID added in v0.10.0

func GetOrCreateInstallID(ctx context.Context, db *pgxpool.Pool) (string, error)

GetOrCreateInstallID returns the install ID, creating a row if none exists. Exposed so the lookups flusher can attribute deltas to the same install without needing a full Collector.

Types

type Collector

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

Collector gathers anonymous usage data and sends it periodically.

func NewCollector

func NewCollector(db *pgxpool.Pool, cfg CollectorConfig, lookupsStore lookups.Store) *Collector

NewCollector creates a new telemetry collector. lookupsStore is optional; when nil, the payload's Lookups field stays empty.

func (*Collector) Run

func (c *Collector) Run(ctx context.Context)

Run starts the telemetry collection loop. Returns immediately if disabled.

type CollectorConfig

type CollectorConfig struct {
	Enabled  bool
	Endpoint string
	Interval time.Duration
	Version  string
}

CollectorConfig holds configuration for the telemetry collector.

type Payload

type Payload struct {
	InstallID       string           `json:"install_id"`
	Version         string           `json:"version"`
	GoVersion       string           `json:"go_version"`
	OS              string           `json:"os"`
	Arch            string           `json:"arch"`
	DeploymentMode  string           `json:"deployment_mode"`
	UptimeSeconds   int64            `json:"uptime_seconds"`
	Timestamp       time.Time        `json:"timestamp"`
	AssetCount      int              `json:"asset_count"`
	UserCount       int              `json:"user_count"`
	LineageEdges    int              `json:"lineage_edges"`
	ConnectorCounts map[string]int   `json:"connector_counts"`
	Lookups         lookups.Snapshot `json:"lookups,omitempty"`
}

Payload is the anonymous telemetry payload sent to the ingest endpoint.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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