16733 Commits

Author SHA1 Message Date
Arthur Silva Sens
d58b10e8e4
Replace config metrics from main.go
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
2026-01-15 19:05:34 -03:00
Arthur Silva Sens
a5e5969457
Add generated metrics and documentation
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
2026-01-15 19:05:15 -03:00
Arthur Silva Sens
3412366a6a
Add inferred registries
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
2026-01-15 19:00:52 -03:00
Arthur Silva Sens
e643df27fd
Add weaver templates and automations
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
2026-01-15 18:43:18 -03:00
Arve Knudsen
a85a8998c9
otlptranslator: fix BenchmarkPrometheusConverter_FromMetrics (#17866)
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)
Signed-off-by: Julius Hinze <julius.hinze@grafana.com>
2026-01-15 08:49:37 +01:00
Julius Hinze
ccb7468b09
tsdb: fix grow/shrink nextIndex calculation (#17863)
Signed-off-by: Julius Hinze <julius.hinze@grafana.com>
2026-01-14 16:44:50 +01: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
Devarsh
c7bc56cf6c
Add scrape commit and total duration metrics (#17665)
* 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)
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
Ben Kochie
03a1d7a350
Refactor storage package errors (#17844)
Replace use of `tsdb/errors` with standard library `errors`.

Signed-off-by: SuperQ <superq@gmail.com>
2026-01-13 09:53:49 +01:00
Ben Kochie
d9ed026658
Refractor promtool errors (#17842)
Replace use of `tsdb/errors` with standard library `errors`.

Signed-off-by: SuperQ <superq@gmail.com>
2026-01-13 06:35:11 +00:00
Arthur Silva Sens
c980c74f51
Update google/pprof to allow go 1.24.0 (#17843)
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
2026-01-13 06:32:12 +00:00
Nick Pillitteri
a769a7eeb7
model/labels: fix regex with capture, wildcards, literal (#17828)
This change fixes an issue introduced in #17707. When a regex
with a wildcard, literal, and final wildcard surounded by a
capture group was parsed - the capture group was not removed
first preventing `optimizeConcatRegex` from running.

Found via fuzz testing.

Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com>
2026-01-12 15:51:45 +00:00
Julien Pivotto
de0a864b5c Fuzzing: Move to go fuzzing
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-01-12 12:59:10 +01:00
Ganesh Vernekar
9cb3641ccd
Volunteer to shepherd the release v3.10 (#17822)
Signed-off-by: Ganesh Vernekar <ganesh.vernekar@reddit.com>
2026-01-09 15:00:53 +00:00
Julien
f0eaf596fe
Merge pull request #17743 from RushabhMehta2005/optimization/extend-floats-prealloc
promql: preallocate slice in extendFloats optimization
2026-01-09 12:40:00 +01:00
Arve Knudsen
16703766f4
promql: fix info() returning empty when filtering by overlapping labels (#17817)
When filtering by a label that exists on both the input metric and
target_info (e.g., info(metric, {host_name="orbstack"}) where host_name
exists on both), the function incorrectly returned empty results.

The bug was in combineWithInfoVector: when no new labels were added
(because they all overlapped with base metric labels), the code entered
the "no match" filtering block even though an info series WAS matched.

The fix checks len(seenInfoMetrics) == 0 to correctly identify when no
info series matched. If an info series matched (seenInfoMetrics is
non-empty), the series is kept even if no new labels were added.

Fixes #17813

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2026-01-09 10:04:37 +01:00
Arthur Silva Sens
14de1eb043
Make service discoveries removable through build tags (#17736)
* Make service discoveries removable through build tags

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

* Fix cross-platform build issues

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

* Change build tags used

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

* Remove year from License header

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

* Remove plugins automation

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

* Update README

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

* Update README.md

Co-authored-by: Julien <291750+roidelapluie@users.noreply.github.com>
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

---------

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
Co-authored-by: Julien <291750+roidelapluie@users.noreply.github.com>
2026-01-08 10:06:33 -03:00
Vilius Pranckaitis
6a81e4441e
promql: avoid unnecessary Metric.Get() calls in functions.go (#17676)
Moved some Metric.Get() calls in PromQL functions to avoid unnecessary label extraction.
In many cases, this work was done to extract metric name, and was only used if annotations were emitted.

In the same go I also replaced labels.MetricName with model.MetricNameLabel, since the former was deprecated.

Signed-off-by: Vilius Pranckaitis <vpranckaitis@gmail.com>
2026-01-08 11:58:05 +00:00
Bryan Boreham
da254fd680
Merge pull request #17798 from prometheus/merge-3.9-into-main
Merge release-3.9 into main
2026-01-08 10:43:54 +00:00
Bryan Boreham
63b86fa851 Merge branch 'release-3.9' into merge-3.9-into-main 2026-01-08 10:22:01 +00:00
Charles Korn
a919e6d5ef
model/labels: improve performance of regex matchers like .*-.*-.* (#17707)
#14173 introduced an optimisation to better handle regex patterns like .*-.*-.*. It identifies strings the pattern cannot possibly match (because they do not contain all of the literal values) and returns false from MatchString early.

However, if the string does contain all literal values, then the Go regex engine is used to confirm that the string does match the pattern. But this is not necessary in the case where the start and end of the pattern is .* and everything in between is either a literal or .*: if the string contains all of the literals in order, then it matches the pattern, and invoking Go's regex engine to confirm this is unnecessary and quite slow.

* Add some more test cases
* Add benchmark, since existing benchmark doesn't show much impact given most of the random test strings will not match the patterns.

Signed-off-by: Charles Korn <charles.korn@grafana.com>
2026-01-08 10:20:23 +00:00
Bryan Boreham
9ec59baffb
Cut v3.9.1 (#17804)
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
v3.9.1 v0.309.1
2026-01-07 16:05:27 +00:00
Bryan Boreham
da754cd240 Merge remote-tracking branch 'origin/release-3.9' into merge-3.9-into-main 2026-01-07 15:51:44 +00:00
Bryan Boreham
4caa4c0914
Merge pull request #17807 from bboreham/fix-scrape-relabel-drop
Release 3.9: Fix scrape relabel not dropping series
2026-01-07 15:43:28 +00:00
Bryan Boreham
4f337c2a41
Merge pull request #17806 from marvin-roesch/fix/scrape-relabeling-keep
[BUGFIX] Scraping: return empty label set if sample is not to be kept
2026-01-07 15:38:40 +00:00
Marvin Rösch
66c8e31956 [BUGFIX] Scraping: drop sample if relabeling config says so
Signed-off-by: Marvin Rösch <marvinroesch99@gmail.com>
2026-01-07 15:20:24 +00:00
Bryan Boreham
ae71185255 Scraping: add a test for relabel with keep and drop
Co-authored-by: Marvin Rösch <marvinroesch99@gmail.com>
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2026-01-07 15:18:53 +00:00
Marvin Rösch
fff29d330d
[BUGFIX] Scraping: drop sample if relabeling config says so
Signed-off-by: Marvin Rösch <marvinroesch99@gmail.com>
2026-01-07 16:11:22 +01:00
Bryan Boreham
f1719fa1d4
[BUGFIX] Agent: fix crash from invalid type in pool (#17802)
We have separate pools for Appender and AppenderV2 objects, and must not
put another kind of object into them.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2026-01-07 14:01:02 +00:00
Julius Hinze
22463b1e9f
tsdb: add support for OOO exemplars in CircularExemplarStorage (#17469)
* tsdb: add support for OOO exemplars in CircularExemplarStorage

Doubly linked exemplar storage resize.
Split exemplar buffer resize into shrink and grow functions.
Skip duplicate OOO exemplars, re-initialize emptied index after deleting its last exemplar.

Signed-off-by: Julius Hinze <julius.hinze@grafana.com>
2026-01-07 13:25:50 +01:00
dependabot[bot]
99c8351d0e
chore(deps): bump github.com/hetznercloud/hcloud-go/v2 from 2.32.0 to 2.33.0 (#17762)
* chore(deps): bump github.com/hetznercloud/hcloud-go/v2

Bumps [github.com/hetznercloud/hcloud-go/v2](https://github.com/hetznercloud/hcloud-go) from 2.32.0 to 2.33.0.
- [Release notes](https://github.com/hetznercloud/hcloud-go/releases)
- [Changelog](https://github.com/hetznercloud/hcloud-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hetznercloud/hcloud-go/compare/v2.32.0...v2.33.0)

---
updated-dependencies:
- dependency-name: github.com/hetznercloud/hcloud-go/v2
  dependency-version: 2.33.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

* Use `server.Datacenter` until next minor release - disable linting of it in the meantime

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2026-01-07 13:21:56 +01:00
George Krajcsovits
66bdc88013
fix(remote_read): NHCB not returned over remote read samples (#17794)
NHCB is native histograms with custom buckets.

prompb is used for both remote write 1.0 and remote read. We do not
support NHCB over remote write 1.0 , however we should absolutely
support it for remote read.

Prometheus remote write 1.0 client already refuses to send NHCB.
Prometheus remote write 1.0 server accepts NHCB, but doesn't store
custom values, corrupting the result. I'm now handling NHCB correctly,
instead of refusing or corrupting.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2026-01-07 08:44:57 +01:00
Rushabh Mehta
fc330642e4 promql: Preallocate slice in extendFloats
Signed-off-by: Rushabh Mehta <mehtarushabh2005@gmail.com>
2026-01-06 22:06:30 +05:30
Bryan Boreham
cd875bd8c9
Cut release 3.9.0 (#17796)
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
v0.309.0 v3.9.0
2026-01-06 16:30:06 +00:00
renovate[bot]
6286e3fb55
fix(deps): update github.com/hashicorp/nomad/api digest to e8f2200 (#17780)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-06 15:53:09 +01:00
renovate[bot]
ce8bb9ee9b
chore(deps): update quay.io/prometheus/golang-builder docker tag to v1.25 (#17783)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-06 13:52:10 +00:00
renovate[bot]
a588145bc1
fix(deps): update github.com/prometheus/client_golang/exp digest to 2cd067e (#17781)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-06 14:46:47 +01:00
renovate[bot]
5b257abc52
chore(deps): update dependency prettier to v3.7.4 (#17782)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-06 14:44:23 +01:00
Jan-Otto Kröpke
167418a5ad
fix: renovate configuration (#17793)
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2026-01-06 13:34:29 +00:00
Patryk Prus
dcda4840a7
tsdb/index: export sentinel errors for size limit failures (#17773)
* tsdb/index: export sentinel errors for size limit failures

---------

Signed-off-by: Patryk Prus <p@trykpr.us>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2026-01-06 14:07:23 +01:00
Arthur Silva Sens
1e317d0098
Add configuration option to control extra-scrape-metrics (#17606) 2026-01-06 09:00:49 -03:00
Julius Volz
ffcdb2bc1f
Merge pull request #17788 from prometheus/fix-identifier-completion-end
Replace entire identifier when autocompleting inside of it
2026-01-06 11:24:52 +01:00
Julius Volz
fe76e6c297 Remove unneeded state parameter
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2026-01-06 11:00:01 +01:00
Julius Volz
3fc800410a Handle autocomplete replacement better for more node types
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2026-01-06 10:58:44 +01:00