prometheus/util/teststorage
Arve Knudsen cdfacef1b6 feat: add OTel resource/scope attributes persistence per time series
Add support for persisting OTel resource/scope attributes alongside time series
data in TSDB, enabling the info() PromQL function to enrich metrics with
resource context without relying on target_info metric scraping.

Storage layer:
- Add ResourceUpdater interface with UpdateResource() to storage.Appender
- Add ResourceContext to AppendV2Options for passing resource attributes
- Add ResourceQuerier interface for querying stored resource attributes
- Add EntityData type for passing OTel entity information through storage

TSDB seriesmetadata subsystem:
- Add Entity type with OTel entity data model (type, ID, description)
- Add ResourceVersion with versioned identifying/descriptive attributes
- Add VersionedResource for tracking attribute changes over time
- Add MemResourceStore for in-memory resource storage with versioning
- Extend Parquet schema with resource namespace, nested attribute lists,
  and entity rows
- Add zstd compression, row sorting, and footer metadata to Parquet writer

OTLP integration:
- Extend CombinedAppender to extract and persist resource attributes from
  OTLP ResourceMetrics during ingestion

PromQL info() function:
- Rewrite to use stored resource attributes instead of fetching target_info
  series, with attribute name translation via LabelNamer mappings

Web API:
- Add /api/v1/resources endpoint for querying stored resource attributes
- Support format=attributes for autocomplete use cases
- Add OpenAPI documentation for the new endpoint

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2026-03-20 17:56:16 +01:00
..
appender.go feat: add OTel resource/scope attributes persistence per time series 2026-03-20 17:56:16 +01:00
appender_test.go fix(teststorage/appender.go): TODO and Sample staleness check (#17905) 2026-01-21 15:25:31 +00:00
storage.go tests(teststorage, api_test): Fix leaking readers; kill fake exemplar storage (#17906) 2026-01-27 10:07:56 +00:00