telemetry

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EmitCompactionDirtyRatio

func EmitCompactionDirtyRatio(ctx context.Context, schemaID int16, ratio float64)

EmitCompactionDirtyRatio records the evaluated dirty ratio for a compaction pass. name: "compaction_dirty_ratio" with label {"schema_id": "<id>"}

func EmitCompactionManifestContractViolation

func EmitCompactionManifestContractViolation(ctx context.Context, schemaID int16)

EmitCompactionManifestContractViolation records a contract violation event when compaction detects SaveManifest succeeded without metadata advancement. name: "compaction_manifest_contract_violation_total" with label {"schema_id": "<id>"}

func EmitCompactionRewritePending

func EmitCompactionRewritePending(ctx context.Context, schemaID int16)

EmitCompactionRewritePending records that a rewrite is needed but cannot be applied yet. name: "compaction_rewrite_pending_total" with label {"schema_id": "<id>"}

func EmitLatency

func EmitLatency(ctx context.Context, stage string, ms int64)

EmitLatency records a latency measure (milliseconds) for a named stage. name: "fed_query_latency_histogram" with label {"stage": "<translation|execution|streaming>"}

func EmitPushdownEfficiency

func EmitPushdownEfficiency(ctx context.Context, schemaID int16, ratio float64)

EmitPushdownEfficiency records pushdown efficiency as a ratio (float64). name: "fed_query_pushdown_efficiency" with label {"schema_id": "<id>"}

func EmitRowCount

func EmitRowCount(ctx context.Context, source string, rows int64)

EmitRowCount records row counts per source. name: "fed_query_row_count" with label {"source": "pg"|"s3"|"duckdb"}

func RegisterTelemetryEmitter

func RegisterTelemetryEmitter(fn Emitter)

RegisterTelemetryEmitter registers a custom emitter function. Callers can provide an OpenTelemetry-backed emitter or a test stub. Passing nil resets the emitter back to the default no-op implementation.

Types

type Emitter

type Emitter func(ctx context.Context, name string, labels map[string]string, value any)

Emitter is the callback signature used by telemetry hooks.

Jump to

Keyboard shortcuts

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