telemetry

package
v0.0.0-...-5731b70 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package telemetry provides a tiny JSONL emitter, turn-id context helpers, and startup-evaluated config for opt-in observability and artifacts directory resolution.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalibrationModeEnabled

func CalibrationModeEnabled() bool

CalibrationModeEnabled reports whether calibration mode was enabled at startup.

func Emit

func Emit(name string, fields map[string]any)

Emit writes a single JSON line to .agent/events.jsonl when observation is enabled. It augments fields with RFC3339Nano time and the event name.

func EmitLocalFeatures

func EmitLocalFeatures(ctx context.Context, user string)

func ObserveEnabled

func ObserveEnabled() bool

ObserveEnabled reports whether JSONL emission was enabled at startup, considering calibration defaults.

func PersistPayloadsEnabled

func PersistPayloadsEnabled() bool

PersistPayloadsEnabled reports whether request and response payload persistence was enabled at startup.

func TurnIDFromContext

func TurnIDFromContext(ctx context.Context) (string, bool)

TurnIDFromContext returns the turn ID from ctx, if present. Returns "", false if the value is missing or not a non-empty string.

func WithTurnID

func WithTurnID(ctx context.Context, id string) context.Context

WithTurnID returns a child context that carries the provided turn ID. If ctx is nil, context.Background() is used

Types

This section is empty.

Jump to

Keyboard shortcuts

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