mirror of
https://github.com/prometheus/prometheus.git
synced 2026-03-21 18:10:42 -04:00
Remove metric metadata persistence (keeping only OTel resource/scope features) and refactor the native metadata subsystem from hardcoded resource/scope handling to a generic kind framework. The kind framework uses Go generics for type-safe hot paths (Versioned[V], MemStore[V], KindOps[V]) and a KindDescriptor interface for runtime dispatch at serialization boundaries (WAL, Parquet, head commit/replay). Key changes: - Remove metric metadata persistence feature and related API endpoints - Add Versioned[V] generic container and MemStore[V] generic store - Add KindDescriptor interface and global kind registry - Implement resourceKindDescriptor and scopeKindDescriptor - Replace memSeries resource/scope fields with kindMeta []kindMetaEntry - Use kind-aware iteration in compaction and DB.SeriesMetadata() - Update WAL replay to use CommitToSeries via kind registry - Wire WAL encode/decode functions via init() to break import cycle - Fix silent data corruption when RefResolver fails on read or write - Provide type aliases for backward compatibility Adding a new metadata kind now requires implementing KindOps + KindDescriptor and registering in init(), instead of modifying 12+ files. Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> |
||
|---|---|---|
| .. | ||
| remote | ||
| buffer.go | ||
| buffer_test.go | ||
| errors.go | ||
| errors_test.go | ||
| fanout.go | ||
| fanout_test.go | ||
| generic.go | ||
| interface.go | ||
| interface_append.go | ||
| interface_test.go | ||
| lazy.go | ||
| memoized_iterator.go | ||
| memoized_iterator_test.go | ||
| merge.go | ||
| merge_test.go | ||
| noop.go | ||
| secondary.go | ||
| series.go | ||
| series_test.go | ||