- V2 gauge int-histogram round-trip with constant ST
- V2 gauge float-histogram round-trip with constant ST
- V1 backward compat: int-histograms encoded with V1 decode with ST=0
- V1 backward compat: float-histograms encoded with V1 decode with ST=0
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- 4 int-histogram subtests: no ST, constant ST, varying ST, same ST
- 4 float-histogram subtests: same ST scenarios via ToFloat() derivation
- All scenarios include custom-bucket histogram (schema=-53) exercising split encode/decode path
- ST field correctly propagated in float histogram conversion
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace inline V1 body with switch dispatch on type byte
- V1 types route to floatHistogramSamplesV1, V2 types to floatHistogramSamplesV2
- Error message now includes actual type value, matching HistogramSamples() pattern
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Extract V1 float-histogram decode body into floatHistogramSamplesV1 private method
- Add floatHistogramSamplesV2 with all-varint decode, ST marker reconstruction, schema validation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace inline V1 body with switch on type byte
- V1 types dispatch to histogramSamplesV1, V2 types to histogramSamplesV2
- Error message now includes actual type value for debugging
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Extract V1 body into histogramSamplesV1 (pure mechanical extraction)
- Add histogramSamplesV2 with all-varint decode, ST marker scheme, schema validation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- FloatHistogramSamples dispatches to floatHistogramSamplesV2 when EnableSTStorage is true
- CustomBucketsFloatHistogramSamples dispatches to customBucketsFloatHistogramSamplesV2 when EnableSTStorage is true
- V1 bodies extracted to floatHistogramSamplesV1 / customBucketsFloatHistogramSamplesV1 (wire format unchanged)
- V2 uses varint first-sample, ref-delta-to-prev, T-delta-to-first, noST/sameST/explicitST ST marker scheme
- All four histogram encoder methods now have V1/V2 dispatch
- Extract HistogramSamples body to histogramSamplesV1 (unchanged)
- Extract CustomBucketsHistogramSamples body to customBucketsHistogramSamplesV1 (unchanged)
- Add dispatch in both public methods via e.EnableSTStorage
- Add histogramSamplesV2: varint ref/T/ST for first sample, ref-delta-to-prev, T-delta-to-first, ST marker scheme, custom-bucket filtering
- Add customBucketsHistogramSamplesV2: same V2 pattern, no filtering, no buf.Reset
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Added HistogramSamplesV2 (12), FloatHistogramSamplesV2 (13), CustomBucketsHistogramSamplesV2 (14), CustomBucketsFloatHistogramSamplesV2 (15) constants
- Added four cases to Type.String() returning snake_case_v2 strings grouped with V1 histogram types
- Expanded Decoder.Type() case clause to recognize all four new types as valid (not Unknown)
- Added ST, T int64 field pair to RefHistogramSample (ST before T, matching RefSample layout)
- Added ST, T int64 field pair to RefFloatHistogramSample (ST before T, matching RefSample layout)
- Removed TODO(owilliams) comments requesting ST support
- Aligned field spacing to match RefSample column style
* feat(tsdb): allow appending to ST capable XOR chunk optionally
Only for float samples as of now. Supports for in-order and out-of-order
samples.
Make sure that on readout the ST capable chunks are returned automatically.
When the chunks are returned as is, this is trivially true.
When a chunk needs to be re-coded due to deletion (tombstone) markers,
we take the encoding of the original chunk.
When a chunk needs to be created from overlapping chunks, we observe
whether ST is zero or not and create the new chunk based on that.
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
* RemoveTmpDirs function to tsdbutil
* Refactor db to use RemoveTmpDirs and no longer cleanup checkpoint tmp dirs
* Use RemoveTmpDirs in wlog checkpoint to cleanup all checkpoint tmp folders
* Add tests for RemoveTmpDirs
* Ensure db.Open will still cleanup extra temporary checkpoints
Signed-off-by: Kyle Eckhart <kgeckhart@users.noreply.github.com>
Replace polling loops (for range 100 { time.Sleep }) with explicit
db.Compact() calls after disabling background compaction, eliminating
CI flakiness on slow machines. Also fix incorrect overlap assertions
that were checking the wrong direction (LessOrEqual -> GreaterOrEqual).
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Initial implementation of https://github.com/prometheus/prometheus/issues/17790.
Only implements ST-per-sample for Counters. Tests and benchmarks updated.
Note: This increases the size of the RefSample object for all users, whether st-per-sample is turned on or not.
Signed-off-by: Owen Williams <owen.williams@grafana.com>
* Update npm dependencies for v3.10
Signed-off-by: Ganesh Vernekar <ganesh.vernekar@reddit.com>
* Fix critical npm vulnerabilities with npm audit fix
Signed-off-by: Ganesh Vernekar <ganesh.vernekar@reddit.com>
* UI: Move HistoryCompleteStrategy into its own file and fix lint
Signed-off-by: Ganesh Vernekar <ganesh.vernekar@reddit.com>
* [REFACTOR] Relabel: Remove unnecessary Process() function
All uses can be replaced by ProcessBuilder, which is more efficient.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
* promql: use Kahan summation for Native Histograms (#15687)
As for float samples, Kahan summation is used for the `sum` and `avg` aggregation and for the respective `_over_time` functions.
Kahan summation is not perfect. This commit also adds tests that even Kahan summation cannot reliably pass.
These tests are commented out.
Note that the behavior might be different on other hardware platforms. We have to keep an eye on test failing on other hardware platforms and adjust them accordingly.
Signed-off-by: Aleksandr Smirnov <5targazer@mail.ru>
* fix(docs): typo in prometheus_agent.md doc
Signed-off-by: Mohammad Abbasi <mohammad.v184@gmail.com>
* AWS SD: ECS Standalone Tasks
The current ECS role in AWS SD assumes that a task is part of a service.
This means that tasks that are started as part of AWS Batch will get
missed and not be discovered. This changed fixes this so that standalone
tasks can be discovered as well.
Signed-off-by: matt-gp <small_minority@hotmail.com>
* AWS SD: Optmise MSK Role
Signed-off-by: matt-gp <small_minority@hotmail.com>
* promtool: support missing promql syntax features (#17926)
Namely promql-duration-expr and promql-extended-range-selectors. This
allows promtool to e.g. check rules files using syntax gated by these
features.
Signed-off-by: Ian Kerins <git@isk.haus>
* Also run CI on release tags
Make sure we also run the main CI workflow `v*` release tags
so `publish_release` job is run.
Signed-off-by: SuperQ <superq@gmail.com>
* chore(deps): bump github.com/hashicorp/consul/api from 1.32.0 to 1.33.2 (#17449)
Bumps [github.com/hashicorp/consul/api](https://github.com/hashicorp/consul) from 1.32.0 to 1.33.2.
- [Release notes](https://github.com/hashicorp/consul/releases)
- [Changelog](https://github.com/hashicorp/consul/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hashicorp/consul/compare/api/v1.32.0...api/v1.33.2)
---
updated-dependencies:
- dependency-name: github.com/hashicorp/consul/api
dependency-version: 1.33.2
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* AWS SD: Load Region Fallback (#18019)
* AWS SD: Load Region Fallback
---------
Signed-off-by: matt-gp <small_minority@hotmail.com>
* Build riscv64 docker image by default (#17508)
* Allow building riscv64 docker image
Co-authored by: nijincheng@iscas.ac.cn;
Signed-off-by: ffgan <sudoemt@gmail.com>
* Update Makefile
Co-authored-by: Ben Kochie <superq@gmail.com>
Signed-off-by: ffgan <sudoemt@gmail.com>
---------
Signed-off-by: ffgan <sudoemt@gmail.com>
Co-authored-by: Ben Kochie <superq@gmail.com>
* Increase Renovate speed (#18052)
* Allow Renovate to run all day on the monthly day.
* Increase the max PRs from 10 to 20.
* Incresae the PR open rate from 2 to 5.
Signed-off-by: SuperQ <superq@gmail.com>
* docs(api): clarify metadata vs remote protocols (#17481)
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
* tsdb/index: export sentinel error for symbol table size exceeded
Signed-off-by: Patryk Prus <p@trykpr.us>
* Update Go dependencies for v3.10 release
Signed-off-by: Ganesh Vernekar <ganesh.vernekar@reddit.com>
* Kubernetes SD: Disable WatchListClient in tests
Signed-off-by: Ganesh Vernekar <ganesh.vernekar@reddit.com>
* Replace deprecated google.CredentialsFromJSON with option.WithAuthCredentialsFile
Signed-off-by: Ganesh Vernekar <ganesh.vernekar@reddit.com>
* chore(deps): update actions/checkout action to v4.3.1 (#18054)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* chore(deps): update actions/cache action to v5.0.3 (#18053)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* chore(deps): update actions/setup-go action to v6.2.0 (#18055)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
---------
Signed-off-by: Ganesh Vernekar <ganesh.vernekar@reddit.com>
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
Signed-off-by: Aleksandr Smirnov <5targazer@mail.ru>
Signed-off-by: Mohammad Abbasi <mohammad.v184@gmail.com>
Signed-off-by: matt-gp <small_minority@hotmail.com>
Signed-off-by: Ian Kerins <git@isk.haus>
Signed-off-by: SuperQ <superq@gmail.com>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Signed-off-by: ffgan <sudoemt@gmail.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: Patryk Prus <p@trykpr.us>
Co-authored-by: Ganesh Vernekar <ganesh.vernekar@reddit.com>
Co-authored-by: Bryan Boreham <bjboreham@gmail.com>
Co-authored-by: Sasha <103973965+crush-on-anechka@users.noreply.github.com>
Co-authored-by: Mohammad Abbasi <mohammad.v184@gmail.com>
Co-authored-by: matt-gp <small_minority@hotmail.com>
Co-authored-by: Ian Kerins <git@isk.haus>
Co-authored-by: SuperQ <superq@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Julien <291750+roidelapluie@users.noreply.github.com>
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
Co-authored-by: ffgan <sudoemt@gmail.com>
Co-authored-by: Patryk Prus <p@trykpr.us>
Co-authored-by: Ganesh Vernekar <ganeshvern@gmail.com>
Co-authored-by: Joe Adams <github@joeadams.io>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>