telemetrytypes

package
v0.33.0 Latest Latest
Warning

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

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

Documentation

Overview

Package telemetrytypes holds the telemetry value types shared between GTB's dependency-injection container (pkg/props) and the collector implementation (pkg/telemetry). Keeping them here lets both packages agree on the same EventType and DeliveryMode without either importing the other: props can declare the TelemetryCollector interface and the tool-author TelemetryConfig field, while telemetry keeps the runtime behaviour, and neither drags in the other's dependency graph.

This package imports nothing from GTB (or anywhere else) by design — it is a leaf so that pkg/telemetry stays free of a pkg/props import and remains a standalone extraction candidate.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeliveryMode

type DeliveryMode string

DeliveryMode controls the delivery guarantee for spilled telemetry events.

const (
	// DeliveryAtLeastOnce deletes spill files only after a successful send.
	// Possible duplicates if the acknowledgement is lost; no data loss.
	DeliveryAtLeastOnce DeliveryMode = "at_least_once"
	// DeliveryAtMostOnce deletes spill files before sending.
	// Possible data loss; no duplicates.
	DeliveryAtMostOnce DeliveryMode = "at_most_once"
)

type EventType

type EventType string

EventType identifies the category of a telemetry event. It is a string so that values are stable on the wire and interchangeable across the boundary between props and telemetry.

const (
	// EventCommandInvocation records that a command ran.
	EventCommandInvocation EventType = "command.invocation"
	// EventCommandError records that a command failed.
	EventCommandError EventType = "command.error"
	// EventFeatureUsed records that a named feature was exercised.
	EventFeatureUsed EventType = "feature.used"
	// EventUpdateCheck records a self-update check.
	EventUpdateCheck EventType = "update.check"
	// EventUpdateApplied records that a self-update was applied.
	EventUpdateApplied EventType = "update.applied"
	// EventDeletionRequest records a user data-deletion request.
	EventDeletionRequest EventType = "data.deletion_request"
)

Jump to

Keyboard shortcuts

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