om2: add om2 complex type format for PoC #17293
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change is introducing the drafted (more or less prometheus/docs#2679) OM2 format with the complex types.
This is mostly for demo purposes, exploring the benefits (and downsides) of complex type format, but it could be merged as an initial step towards OM2 implementation (it's not used by Prometheus scrape yet).
Related to our PromCon talk with @krajorama
Example OM2 text:
With ST/CT:
Initial observations:
Benchmarks
NHCB
This benchmarks shows the difference between parsing histograms in OM 1.x vs OM 2.0 complex types, if Prometheus would only store histograms as NHCB. This assumes Prometheus is intending to store summaries and histograms as NS and NHCB (and NH) going forward (for best case efficiency).
NOTE: OM1 file with 1 histogram is 4.1KB size, OM 2 + complex type file with the same data is 713B size.
CT/ST
Does this PR introduce a user-facing change?