Commit graph

16769 commits

Author SHA1 Message Date
yy
0e77dcfdb9
fix: typo in error message (#17878)
Signed-off-by: Yohei Yamamoto <yhymmt123@gmail.com>
2026-01-20 12:14:02 +01:00
Julien
3c532e14de
Merge pull request #17893 from roidelapluie/roidelapluie/distrolessarch
Some checks are pending
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Fix multi-arch support for distroless Docker image
2026-01-20 11:07:05 +01:00
Siavash Safi
a89c665f47
feat(notifier): independent alertmanager sendloops (#16355)
* notifier: unit test for dropping throughput on stuck AM

Ref: https://github.com/prometheus/prometheus/issues/7676

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: Siavash Safi <siavash@cloudflare.com>

* chore(notifier): remove year from copyrights

Signed-off-by: Siavash Safi <siavash@cloudflare.com>

* feat(notifier): independent alertmanager sendloops

Independent Alertmanager sendloops avoid issues with queue overflowing
when one or more Alertmanager instances are unavailable which could
result in lost alert notifications.
The sendloops are managed per AlertmanagerSet which are dynamically
added/removed with service discovery or configuration reload.

The following metrics now include an extra dimention for alertmanager label:
- prometheus_notifications_dropped_total
- prometheus_notifications_queue_capacity
- prometheus_notifications_queue_length

This change also includes the test from #14099

Closes #7676

Signed-off-by: machine424 <ayoubmrini424@gmail.com>
Signed-off-by: Siavash Safi <siavash@cloudflare.com>

---------

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: Siavash Safi <siavash@cloudflare.com>
Signed-off-by: machine424 <ayoubmrini424@gmail.com>
Co-authored-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2026-01-20 10:33:07 +01:00
Ben Kochie
1a0c56993c
Use standard library errors in otlptranslator (#17894)
Remove direct use of `go.uber.org/multierr` in favor of standard
library `errors` package.

Signed-off-by: SuperQ <superq@gmail.com>
2026-01-20 10:13:40 +01:00
Julius Volz
1d3d98ed16
Merge pull request #17644 from prometheus/binop-fill-modifier
Some checks are pending
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
PromQL: Add `fill*()` binop modifiers to provide default values for missing series
2026-01-19 20:05:52 +01:00
Julien Pivotto
01637b47b0 Fix multi-arch support for distroless Docker image
The distroless Dockerfile was using a hardcoded SHA256 digest that
referenced only the amd64 image, preventing builds for other
architectures. This caused the main-distroless tag to only publish
amd64 images while the regular main tag had all 5 architectures.

Changes:
- Use architecture-specific image tags (nonroot-${DISTROLESS_ARCH})
  instead of SHA256 digest to enable multi-arch manifest resolution
- Add DISTROLESS_ARCH build arg to handle architecture name mapping
  (armv7 -> arm) between Prometheus and distroless conventions
- Move ARG declarations before FROM to support variable substitution

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-01-19 15:58:37 +01:00
Julien
716003851d
Merge pull request #17876 from roidelapluie/roidelapluie/distroless
Some checks are pending
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Add distroless Docker image variant
2026-01-19 15:09:59 +01:00
Julien Pivotto
1105c825cf Add distroless Docker image variant
Introduces distroless image using UID/GID 65532 instead of nobody,
and removes VOLUME declaration. Busybox image remains default with
unchanged tags for backwards compatibility.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-01-19 14:39:59 +01:00
Arve Knudsen
572f247b4d
tsdb: add auto-cleanup to newTestHead and remove redundant cleanup calls (#17890)
Add automatic cleanup to newTestHeadWithOptions so that heads created
with newTestHead are automatically closed when the test ends. This
simplifies test code by removing the need for manual cleanup in most
cases.

Changes:
- Add t.Cleanup in newTestHeadWithOptions immediately after creating
  the head, using _ = h.Close() to handle double-close gracefully
- Remove redundant t.Cleanup, defer, and explicit Close calls from
  tests that use newTestHead
- Add cleanup for heads created with NewHead directly in restart
  patterns (e.g., restartHeadAndVerifySeriesCounts, startHead)

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2026-01-19 12:57:05 +01:00
Arve Knudsen
dd85d7ca97
tsdb: fix memory leaks in buffer pools (#17879)
* tsdb: fix memory leaks in buffer pools

Clear reference fields when returning buffers to pools to avoid
retaining data after the buffer is reused.

Affected pools:
- refSeriesPool: clear Labels
- histogramsPool: clear H pointer
- floatHistogramsPool: clear FH pointer
- metadataPool: clear Unit and Help strings

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Clear slices

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Clear metadata buffer

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Remove tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

---------

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2026-01-19 11:14:31 +00:00
Julius Volz
90dbdcd5dc Fix a missing space/newline in the binop docs
Some checks failed
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Build Prometheus for common architectures (push) Has been cancelled
CI / Build Prometheus for all architectures (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2026-01-16 20:11:58 +01:00
Julius Volz
05440ffc3b Add a few fill modifier tests with keyword-like metric names
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2026-01-16 20:11:38 +01:00
Bartlomiej Plotka
c4b0da94db
Merge pull request #17835 from prometheus/bwplotka/a2-storage-support
Some checks failed
buf.build / lint and publish (push) Has been cancelled
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Build Prometheus for common architectures (push) Has been cancelled
CI / Build Prometheus for all architectures (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
feat(storage)[PART4b]: add AppenderV2 to the rest of storage.Storage implementations + mock exemplar fix
2026-01-16 13:04:14 +00:00
Julien
c7f92054fc
Merge pull request #17871 from roidelapluie/roidelapluie/fix-fuzzing-issues
fuzzing: fix artifact path and experimental parser flags
2026-01-16 12:54:31 +01:00
Julien Pivotto
66bb47ade6 fuzzing: fix artifact path and experimental parser flags
Fix two issues in fuzzing infrastructure:
- Correct artifact upload path from promql/testdata/fuzz to util/fuzzing/testdata/fuzz to match where Go stores crash artifacts
- Fix GetCorpusForFuzzParseExpr to preserve original parser flag values instead of always resetting them to false, which was disabling experimental features before actual fuzzing ran

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-01-16 12:07:16 +01:00
bwplotka
f61a83bcd6 fix: appenderV2 mock exemplar appendErr injection before appending it
Signed-off-by: bwplotka <bwplotka@gmail.com>
2026-01-16 10:47:00 +00:00
Arve Knudsen
4afa76d083
OTLP: label caching for OTLP-to-Prometheus conversion to reduce allocations and improve latency (#17860)
* otlptranslator: add label caching for OTLP-to-Prometheus conversion

Add per-request caching to reduce redundant computation and allocations
during OTLP metric conversion:

1. Per-request label sanitization cache: Cache sanitized label names
   within a request to avoid repeated string allocations for commonly
   repeated labels like __name__, job, instance.

2. Resource-level label caching: Precompute and cache job, instance,
   promoted resource attributes, and external labels once per
   ResourceMetrics boundary instead of for each datapoint.

3. Scope-level label caching: Precompute and cache scope metadata labels
   (otel_scope_name, otel_scope_version, etc.) once per ScopeMetrics
   boundary.

4. LabelNamer instance caching: Reuse the LabelNamer struct across
   datapoints within the same resource context.

These optimizations significantly reduce allocations and improve latency
for OTLP ingestion workloads with many datapoints per resource/scope.

---------

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
2026-01-16 10:30:05 +00:00
Julius Volz
ded3a8c309
UI: Fix broken Y axis after graph page reload (#17869)
* UI: Fix broken Y axis after graph page reload

The new `y_axis_min` setting was always encoded into the URL, even if its value
was `null` (in which case it would be set to an empty string parameter). On the
decoding side, this wasn't taken into account correctly, and we tried to parse
the empty string as a float, causing completely broken graphs showing nothing
after reloading the graph page with such URL parameters.

I'm doing two things now:

* For the future, only encode the Y axis min into the URL if it's set at all,
  similar as we do for the `end_input` and `moment_input` fields.
* On the decoding side, accommodate people (at least for now) who already saved
  some links with the empty `y_axis_min` parameter by treating an empty string
  as `null` instead of a number.

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Add URL state encoding/decoding tests

Signed-off-by: Julius Volz <julius.volz@gmail.com>

---------

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2026-01-16 09:50:39 +00:00
George Krajcsovits
ef350b2b54
Merge pull request #17840 from prometheus/krajo/st-in-chunks
feat(tsdb): new Append parameter and AtST interface for chunks
2026-01-16 10:32:53 +01:00
bwplotka
1d3c6210f3 add extra fanout test
Signed-off-by: bwplotka <bwplotka@gmail.com>
2026-01-15 14:13:58 +00:00
Julius Volz
d3b6e61487 Put binop fill modifiers behind a feature flag
Some checks failed
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Build Prometheus for common architectures (push) Has been cancelled
CI / Build Prometheus for all architectures (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2026-01-15 11:18:48 +01:00
Arve Knudsen
a85a8998c9
otlptranslator: fix BenchmarkPrometheusConverter_FromMetrics (#17866)
Some checks are pending
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
The benchmark was passing appendMetadata=false to NewCombinedAppender,
which caused UpdateMetadata to never be called on the underlying
noOpAppender. This resulted in app.metadata always being 0, failing
the assertion that metadata count should be positive.

Fix by enabling metadata appending in the benchmark.

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2026-01-15 09:33:16 +01:00
Julius Hinze
e49d11c88d
tsdb: fix rare case of OOO exemplar insertion pointing to the exemplar being deleted (#17865)
Some checks are pending
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Signed-off-by: Julius Hinze <julius.hinze@grafana.com>
2026-01-15 08:49:37 +01:00
Julius Volz
d6aa6a3fc7 Add new fill modifiers to features test data
Some checks are pending
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2026-01-15 07:56:23 +01:00
Julius Volz
4c97952210 Document new fill binop modifiers
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2026-01-15 07:56:23 +01:00
Julius Volz
ce26370eeb Add PromLens binop matching explain view tests
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2026-01-15 07:56:23 +01:00
Julius Volz
57dd1f18b4 Add fill modifier PromQL tests
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2026-01-15 07:56:23 +01:00
Julius Volz
af3277f832 PromQL: Add fill*() binop modifiers to provide default values for missing series
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2026-01-15 07:56:21 +01:00
Julius Hinze
ccb7468b09
tsdb: fix grow/shrink nextIndex calculation (#17863)
Some checks are pending
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Signed-off-by: Julius Hinze <julius.hinze@grafana.com>
2026-01-14 16:44:50 +01:00
George Krajcsovits
06a59346fe
Update tsdb/chunkenc/chunk.go
Some checks failed
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Build Prometheus for common architectures (push) Has been cancelled
CI / Build Prometheus for all architectures (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Signed-off-by: George Krajcsovits <krajorama@users.noreply.github.com>
2026-01-14 16:41:03 +01:00
bwplotka
8a2921e385 addressed feedback
Some checks are pending
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Signed-off-by: bwplotka <bwplotka@gmail.com>
2026-01-14 13:57:48 +00:00
bwplotka
49c3aea56d feat(storage)[PART4b]: add AppenderV2 to the rest of storage.Storage impl
Signed-off-by: bwplotka <bwplotka@gmail.com>
2026-01-14 13:54:27 +00:00
Bartlomiej Plotka
3374d2e56f
feat(teststorage)[PART4a]: Add AppendableV2 support for mock Appendable (#17834)
* feat(teststorage)[PART4a]: Add AppendableV2 support for mock Appendable

Signed-off-by: bwplotka <bwplotka@gmail.com>

* fix: adjusted AppenderV1 flow for reliability

Found in https://github.com/prometheus/prometheus/pull/17838 and by
Krajo comment

Signed-off-by: bwplotka <bwplotka@gmail.com>

* addressed comments

Signed-off-by: bwplotka <bwplotka@gmail.com>

* fix broken appV2 commit and rollback; added tests

Signed-off-by: bwplotka <bwplotka@gmail.com>

---------

Signed-off-by: bwplotka <bwplotka@gmail.com>
2026-01-14 13:48:33 +00:00
György Krajcsovits
6137de085e
test ListSeriesIterator with ST
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2026-01-14 13:15:19 +01:00
György Krajcsovits
5ecc0e7062
test that ChainSampleIterator passes on the AtST call
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2026-01-14 13:15:18 +01:00
György Krajcsovits
8067b3d60a
add test coverage for buffer.go
I've checked that commenting out any one of the new lines produces an error.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2026-01-14 13:15:17 +01:00
György Krajcsovits
adf734db7a
update remaining tests
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2026-01-14 13:15:16 +01:00
György Krajcsovits
a5ac0bff1d
update ooo_head.go but only with TODOs
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2026-01-14 13:15:15 +01:00
György Krajcsovits
6647e512ad
update ExpandSamples
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2026-01-14 13:15:14 +01:00
György Krajcsovits
28dca34f4f
auto update head sample use in tests
find . -name "*.go" -type f -exec sed -E -i \
's/([^[:alpha:]]sample\{)([^,{:]+,[^,]+,[^,]+,[^,]+\})/\10, \2/g' {} +

I've omitted tsdb/ooo_head.go from the commit because I'm also adding todo
there.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2026-01-14 13:15:13 +01:00
György Krajcsovits
f616689f09
tsdb/head.go: add start timestamp to sample type used in tests
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2026-01-14 13:15:12 +01:00
György Krajcsovits
a00c0d6a66
auto update f/h/fh sample init with positional fields
find . -name "*.go" -type f \
-exec sed -E -i 's/((f|h|fh)Sample\{)([^,{:]+,[^,]+\})/\10, \3/g' {} +

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2026-01-14 13:15:11 +01:00
György Krajcsovits
1e77d9ded8
storage/buffer.go: add ST to sample types and iterators
Also fix the single multi line fSample definition to be one liner.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2026-01-14 13:15:10 +01:00
György Krajcsovits
70bc06718d
feat(tsdb): new AppenderV2 and AtST interface for chunks
No implementation yet. Just to test the shape of the interface.
AtST is implemented for trivial cases, anything else is hard coded
to return 0.

Ref: https://github.com/prometheus/prometheus/issues/17791

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2026-01-14 13:15:09 +01:00
Devarsh
c7bc56cf6c
Add scrape commit and total duration metrics (#17665)
Some checks are pending
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
* Add scrape commit and total duration metrics

Signed-off-by: Devarsh <devarshshah2608@gmail.com>

* update metric based on the review

Signed-off-by: Devarsh <devarshshah2608@gmail.com>

* conditionally record scrape duration

Signed-off-by: Devarsh <devarshshah2608@gmail.com>

* Fix formatting in scrape.go

Signed-off-by: Devarsh <devarshshah2608@gmail.com>

---------

Signed-off-by: Devarsh <devarshshah2608@gmail.com>
2026-01-13 14:07:27 -03:00
Ben Kochie
72a23934ad
Refactor various tsdb sub-packages (#17847)
Some checks are pending
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Migrate various tsdb related packages from `tsdb/errors` to the standard
library `errors` package.

Signed-off-by: SuperQ <superq@gmail.com>
2026-01-13 13:38:58 +00:00
Gregor Zeitlinger
f331aa6d14
fix typo in release notes about scrape_native_histograms (#17655)
* fix typo

Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>

* add changelog

Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>

* Update CHANGELOG.md

Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>

* remove migration notes again

Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>

---------

Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
2026-01-13 11:41:57 +01:00
Julien
6b0b93d2d3
Merge pull request #17393 from roidelapluie/roidelapluie/fuzzing
Fuzzing: Move to go fuzzing
2026-01-13 10:38:16 +01:00
Ben Kochie
836caf7b16
Refactor storage package errors (#17846)
Replace use of `tsdb/errors` with standard library `errors`.

Signed-off-by: SuperQ <superq@gmail.com>
2026-01-13 10:21:33 +01:00
Julien Pivotto
802e959ec2 chore(fuzzing): Meet required check expectation
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-01-13 10:02:58 +01:00