telemetry

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 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 EmitCompactionRewriteApplied added in v0.2.0

func EmitCompactionRewriteApplied(ctx context.Context, schemaID int16)

EmitCompactionRewriteApplied records a committed dirty-ratio rewrite (#188). name: "compaction_rewrite_applied_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 EmitParquetChecksumMismatch added in v0.2.0

func EmitParquetChecksumMismatch(ctx context.Context, schemaID int16)

EmitParquetChecksumMismatch records a parquet object whose bytes no longer hash to the checksum its manifest entry carries (#347). name: "parquet_checksum_mismatch_total" with label {"schema_id": "<id>"}

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 EmitReportOnlyValidationViolation added in v0.2.0

func EmitReportOnlyValidationViolation(ctx context.Context, schemaID int16, schemaName, kind string)

EmitReportOnlyValidationViolation records a write that violated its entity JSON schema and was accepted because strict update validation is off (#317). kind is "required" (the document lacks a property) or "constraint" (a present value is illegal); package internal classifies it. name: "entity_report_only_validation_violation_total" with labels {"schema_id": "<id>", "schema_name": "<name>", "kind": "required"|"constraint"}

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