Files
zeekay c3dc2f1ecf Read the event plane, not what it replaced
HIP-0132 unified o11y_logs, o11y_traces and o11y_metrics into one `event`
database and dropped them. The commit that restored the reads repointed
three files and said so; it was thirty. The rest went on naming databases
that no longer exist, so trace funnels, the Kafka and queue panels, the
v3/v4 logs and traces builders and the PromQL adapter each answered
Code: 81 UNKNOWN_DATABASE, and the golden tests agreed with them because
they pinned the same dead SQL.

pkg/telemetryplane is the one address for the name, imports nothing, and
is reachable from every depth that needs it. Its test walks the tree and
fails the build on a literal that names a dropped database, tests
included — a golden encoding broken SQL is a second vote for the bug, not
coverage.

Two service views turned a failed read into an offer to instrument an
already-instrumented application. A failure now shows the failure, and
onboarding is offered on a successful empty read.

Cherry-picked from salvage/blue-wt-o11y-readers 83ecbec03c.
2026-09-08 23:07:06 -07:00

30 lines
1.5 KiB
Go

package telemetrymetadata
import "github.com/hanzoai/o11y/pkg/telemetryplane"
// DBName is NOT the event plane, and that is deliberate.
//
// HIP-0132 unified the three SIGNAL databases — o11y_logs, o11y_traces,
// o11y_metrics — into `event`, and dropped them. It did not touch o11y_metadata,
// which the otel-collector metadata exporter still WRITES on every flush. A
// reader repointed at `event` would stop reading a table that is being fed,
// which is the same defect as reading a database that was dropped, pointed the
// other way.
//
// The name is spelled in pkg/telemetryplane with the plane and the other three
// survivors, so "which databases does this binary name?" has one answer.
const (
DBName = telemetryplane.MetadataDBName
AttributesMetadataTableName = "distributed_attributes_metadata"
AttributesMetadataLocalTableName = "attributes_metadata"
ColumnEvolutionMetadataTableName = "distributed_column_evolution_metadata"
// FieldKeysTable is the distributed field-keys table the otel-collector
// metadata exporter writes to (o11y_metadata.distributed_field_keys). The
// bare table-name constant was dropped from the collector's public
// constants package in v0.144.7, so it is pinned locally here.
FieldKeysTable = "distributed_field_keys"
// Column Evolution table stores promoted paths as (signal, column_name, field_context, field_name); see otel-collector metadata_migrations.
PromotedPathsTableName = "distributed_column_evolution_metadata"
SkipIndexTableName = "system.data_skipping_indices"
)