telemetry

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SchemaVersion       = "hera.telemetry/2"
	LegacySchemaVersion = "hera.telemetry/1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	SchemaVersion string    `json:"schema_version"`
	Timestamp     time.Time `json:"timestamp"`
	Variant       string    `json:"variant"`

	BenchmarkRunID  string `json:"benchmark_run_id"`
	ConversationID  string `json:"conversation_id"`
	ModelCallID     string `json:"model_call_id"`
	HostToolCallID  string `json:"host_tool_call_id"`
	ProcessLaunchID string `json:"process_launch_id"`
	MCPRequestID    string `json:"mcp_request_id"`
	OperationID     string `json:"operation_id"`
	UnityRequestID  string `json:"unity_request_id"`
	TaskID          string `json:"task_id"`
	IDAccounting    string `json:"id_accounting"`
	TokenAccounting string `json:"token_accounting"`

	FirstAttemptSuccess  bool  `json:"first_attempt_success"`
	FinalTaskSuccess     bool  `json:"final_task_success"`
	WrongToolAction      int64 `json:"wrong_tool_action"`
	InvalidArgument      int64 `json:"invalid_argument"`
	ModelCalls           int64 `json:"model_calls"`
	HostCalls            int64 `json:"host_calls"`
	ProcessLaunches      int64 `json:"process_launches"`
	UnityHTTPRequests    int64 `json:"unity_http_requests"`
	RepairCalls          int64 `json:"repair_calls"`
	RawTokens            int64 `json:"raw_tokens"`
	CachedTokens         int64 `json:"cached_tokens"`
	BilledTokens         int64 `json:"billed_tokens"`
	ToolResultTokens     int64 `json:"tool_result_tokens"`
	ElapsedMS            int64 `json:"elapsed_ms"`
	DuplicateSideEffects int64 `json:"duplicate_side_effects"`
	UnsafeMutations      int64 `json:"unsafe_mutations"`
	ReloadRecoveries     int64 `json:"reload_recoveries"`
	HumanInterventions   int64 `json:"human_interventions"`
}

func DecodeJSONL

func DecodeJSONL(reader io.Reader) ([]Event, error)

func ReadJSONL

func ReadJSONL(path string) ([]Event, error)

func (Event) Validate

func (event Event) Validate() error

type JSONLRecorder

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

func NewJSONLRecorder

func NewJSONLRecorder(path string) (*JSONLRecorder, error)

func (*JSONLRecorder) Record

func (recorder *JSONLRecorder) Record(event Event) error

type Summary

type Summary struct {
	Tasks                int64 `json:"tasks"`
	FirstAttemptSuccess  int64 `json:"first_attempt_success"`
	FinalTaskSuccess     int64 `json:"final_task_success"`
	WrongToolAction      int64 `json:"wrong_tool_action"`
	InvalidArgument      int64 `json:"invalid_argument"`
	ModelCalls           int64 `json:"model_calls"`
	HostCalls            int64 `json:"host_calls"`
	ProcessLaunches      int64 `json:"process_launches"`
	UnityHTTPRequests    int64 `json:"unity_http_requests"`
	RepairCalls          int64 `json:"repair_calls"`
	RawTokens            int64 `json:"raw_tokens"`
	CachedTokens         int64 `json:"cached_tokens"`
	BilledTokens         int64 `json:"billed_tokens"`
	ToolResultTokens     int64 `json:"tool_result_tokens"`
	ElapsedMS            int64 `json:"elapsed_ms"`
	P50ElapsedMS         int64 `json:"p50_elapsed_ms"`
	P95ElapsedMS         int64 `json:"p95_elapsed_ms"`
	DuplicateSideEffects int64 `json:"duplicate_side_effects"`
	UnsafeMutations      int64 `json:"unsafe_mutations"`
	ReloadRecoveries     int64 `json:"reload_recoveries"`
	HumanInterventions   int64 `json:"human_interventions"`
}

func Summarize

func Summarize(events []Event) (Summary, error)

Jump to

Keyboard shortcuts

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