16481 Commits

Author SHA1 Message Date
pipiland2612
704afd8529 add timeSeriesAgeChecker to refactor filter code
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
2025-10-31 23:19:53 +02:00
pipiland2612
9e6a626dae create timeSeriesStats to reduce return variable
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
2025-10-31 22:17:45 +02:00
pipiland2612
e1cb29bf8a create common struct and function to DRY
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
2025-10-31 21:55:14 +02:00
Minh Nguyen
9f93c2d2e1
promtool: Add Remote Write 2.0 support to push metrics command (#17417)
* add feature flag for remote write v2

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* change from number to protobuf_message

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* fix test

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* fix name

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* run make cli-documentation

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* fix help

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* run make cli-documentation

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

---------

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
2025-10-31 11:38:40 +00:00
Minh Nguyen
c8f1de18a7
[RW2] Fix type and unit labels propagation in Remote Write v2 receiver to prioritize type-and-unit-labels feature (#17387)
* fix

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* fix nits & update docs

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* fix docs

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

---------

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
2025-10-31 08:59:03 +00:00
Björn Rabenstein
84d2007a08
Merge pull request #17423 from geogrego/main
docs: Fix typos
2025-10-30 16:56:48 +01:00
George Krajcsovits
2683d50085
Merge pull request #17430 from prometheus/krajo/merge-3.7.3-to-main
merge 3.7.3 to main
2025-10-30 11:34:53 +01:00
György Krajcsovits
b8192127ee
Merge remote-tracking branch 'origin/release-3.7' into krajo/merge-3.7.3-to-main
# Conflicts:
#	CHANGELOG.md
#	storage/remote/queue_manager_test.go
2025-10-30 09:21:25 +01:00
George Krajcsovits
664216717e
Merge pull request #17425 from ldufr/ldufresne/add-generic-histogram-error-type
histogram: Add `Error` type for all histogram errors
2025-10-30 09:07:49 +01:00
Laurent Dufresne
a6793c20e8 Added tests for histogram.Error
Signed-off-by: Laurent Dufresne <laurent.dufresne@grafana.com>
2025-10-30 08:47:03 +01:00
Laurent Dufresne
7621eb772c histogram: Add Error type for all histogram errors
`histogram.Error` becomes the generic wrapper type for all histogram errors.
This makes it easier and less error prone when adding new errors to check if
an error is an histogram error as well as making it less error prone to convert
the errors.

This change the type of those specific sentinel errors from error to
`histogram.Error`, but it should almost never matter.
e.g., `errors.Is(err, ErrHistogram...)` would still work out of the box.

Signed-off-by: Laurent Dufresne <laurent.dufresne@grafana.com>
2025-10-30 08:45:34 +01:00
George Krajcsovits
37418b5910
Merge pull request #17166 from Naman-B-Parlecha/NamanParlecha/NHCBtoCH
Unroll NHCBs to Classic Histograms func for RW
2025-10-30 08:44:26 +01:00
George Krajcsovits
0a41f00007
prepare release 3.7.3 (#17428)
various bug fixes

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
v0.307.3 v3.7.3
2025-10-30 08:21:26 +01:00
Ayoub Mrini
6806b68f93
[release-3.7] fix: Remote-write: revert changes in the queue resharding logic (#17412)
* Revert "chore: deprecate prometheus_remote_storage_{samples,exemplars,histograms}_in_total and prometheus_remote_storage_highest_timestamp_in_seconds"

This reverts commit ba14bc49db31a1b0ba3127e6ddf59a9f32a08dff.

Signed-off-by: machine424 <ayoubmrini424@gmail.com>

* Revert "storage/remote: compute highestTimestamp and dataIn at QueueManager level"

This reverts commit 184c7eb9186aa8fea09920f2f8e8aa8a603da300.

Signed-off-by: machine424 <ayoubmrini424@gmail.com>

* fix(remote-write): bring back the per queue metrics

Signed-off-by: machine424 <ayoubmrini424@gmail.com>

* test(remote): add TestRemoteWrite_ReshardingWithoutDeadlock to reproduce the sharding scale up deadlock

Signed-off-by: machine424 <ayoubmrini424@gmail.com>

---------

Signed-off-by: machine424 <ayoubmrini424@gmail.com>
2025-10-29 14:04:09 +00:00
George Krajcsovits
976728a1d9
Merge pull request #17426 from prometheus/krajo/merge-release-3.7-pre3-to-main
merge release 3.7 branch before 3.7.3 to main
2025-10-29 15:02:02 +01:00
György Krajcsovits
bb8b611d2c
Merge remote-tracking branch 'origin/release-3.7' into krajo/merge-release-3.7-pre3-to-main
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2025-10-29 14:32:42 +01:00
geogrego
58dbe927d5 docs: minor improvement for docs
Signed-off-by: geogrego <geogrego@outlook.com>
2025-10-29 14:42:14 +08:00
Fiona Liao
b004db49af
Reduce samples for TestRuntimeRetentionConfigChange (#17422)
* Reduce samples for TestRuntimeRetentionConfigChange

---------

Signed-off-by: Fiona Liao <fiona.liao@grafana.com>
2025-10-28 18:23:32 +01:00
Björn Rabenstein
4fb37ff652
Merge pull request #17418 from prometheus/beorn7/release
Update prometheus/common dependency to v0.67.2
2025-10-28 17:40:33 +01:00
Naman-B-Parlecha
f14c515cbe fix(histogram): handling +Inf bucket count and metric label
Signed-off-by: Naman-B-Parlecha <namanparlecha@gmail.com>
2025-10-28 20:29:44 +05:30
beorn7
e2b19f9011 Update prometheus/common dependency to v0.67.2
Fixes #16622.

Signed-off-by: beorn7 <beorn@grafana.com>
2025-10-28 15:16:04 +01:00
Arve Knudsen
c36e966bf8
OTLP: de-duplicate target_info samples with conflicting timestamps (#17400)
Add logic to the target_info metric generation in the OTLP endpoint, so that any samples with the same timestamp for the same (target_info) series are de-duplicated. It comes out of a user's bug report about duplicated target_info samples in Grafana Mimir (which uses the Prometheus target_info generation logic).

If I'm not mistaken, duplicate target_info samples should stem from multiple resources in the same OTLP request being translated to the same target_info label set. It shouldn't be caused by a Prometheus bug.
2025-10-28 14:13:43 +00:00
Arve Knudsen
92ccadc96d
promtool: generate rulesLintConfig when --lint=none is set (#17414)
* Correctly generate rulesLintConfig when --lint=none is set (#17399)

If I run promtool check config --lint=none I get:

```
Checking rules.yml
  FAILED:
rules.yml: unset nameValidationScheme
```

This is because passing --lint=none stops newConfigLintConfig from generating rulesLintConfig which is needed for validation.
It means that defaults are used then, one of which is unset value for metric name validation, causing this error.
Fix this by handling --lint=none case correctly and still generating rulesLintConfig.

---------

Signed-off-by: Lukasz Mierzwa <l.mierzwa@gmail.com>
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Łukasz Mierzwa <l.mierzwa@gmail.com>
2025-10-28 14:34:52 +01:00
György Krajcsovits
9b99af7cf3
chore(github): add CODEOWNERS file
In order to allow for non team members to be maintainers of components
like service discovery.

Design doc:
https://docs.google.com/document/d/19m5ti00ZzzOspn60xyiK961J6M7g-rC1THNMkYWQbBc/edit?tab=t.0#heading=h.5sybau7waq2q

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2025-10-28 14:13:37 +01:00
Arve Knudsen
df8a9076b9
tsdb: Reduce TestHeadSeriesChunkRace number of iterations to 100 (#17410)
Reduce tsdb.TestHeadSeriesChunkRace number of iterations from 1000 to
100, to stop this test from timing out under CI.

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2025-10-28 13:57:20 +01:00
Björn Rabenstein
5f041ff7da
Merge pull request #17413 from prometheus/beorn7/release
Volunteer @jan--f as release shepherd for v3.8
2025-10-28 13:32:40 +01:00
Łukasz Mierzwa
0e187f5542
Correctly generate rulesLintConfig when --lint=none is set (#17399)
If I run promtool check config --lint=none I get:

```
Checking rules.yml
  FAILED:
rules.yml: unset nameValidationScheme
```

This is becuase passing --lint=none stops newConfigLintConfig from generating rulesLintConfig which is needed for validation.
It means that defaults are used then, one of which is unset value for metric name validation, causing this error.
Fix this by handling --lint=none case correctly and still generating rulesLintConfig.

Fixes #17398.

Signed-off-by: Lukasz Mierzwa <l.mierzwa@gmail.com>
2025-10-28 13:07:10 +01:00
beorn7
d19cc4ddb0 Volunteer @jan--f as release shepherd for v3.8
Signed-off-by: beorn7 <beorn@grafana.com>
2025-10-28 12:45:50 +01:00
George Krajcsovits
436ae330ff
fix(deps): update prometheus/common to 0.67.1 (#17409)
Fix #17405 federation of NHCB histograms

Manual backport of #17299

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2025-10-28 12:06:32 +01:00
Julius Volz
5318689046
Merge pull request #17380 from roidelapluie/roidelapluie/fixat
promql/parser: Add string representation for AT token
2025-10-27 16:21:14 +01:00
Minh Nguyen
ad4b59c504
tsdb: Deprecate retention flags; add tsdb.retention runtime configuration (#17026)
* Move storage from CL to config file

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* Fix .md

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* run make cli-documentation

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* fix

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* run make cli-documentation

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* nit_fixed

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* fix

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* add test and update configuration.md

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* fix lint

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

---------

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
2025-10-27 14:51:33 +00:00
Minh Nguyen
6bb367970e
feat(promtool): add RW2 support to promtool push metrics using client_golang library (#17280)
* Add WriteProto method and tests for promtool metrics

This commit adds:
1. WriteProto method to storage/remote/client.go that handles
   marshaling and compression of protobuf messages
2. Updated parseAndPushMetrics in cmd/promtool/metrics.go to use
   the new WriteProto method
3. Comprehensive tests for PushMetrics functionality

The WriteProto method provides a cleaner API for sending protobuf
messages without manually handling marshaling and compression.

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* use Write method from exp/api/remote

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* fix

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* fix lint

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* fix test

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* fix

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* nit fixed

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* fix lint

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

---------

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
2025-10-27 13:56:48 +00:00
Julius Volz
dca3289c28
Merge pull request #17334 from roidelapluie/roidelapluie/explain
UI: Add smoothed/anchored in explain
2025-10-27 14:11:36 +01:00
Julien
de23c5a856
Merge pull request #17404 from sylr/template-urlQueryEscape
Add urlQueryEscape to template functions
2025-10-27 13:41:23 +01:00
Sylvain Rabot
50de066a7e
Add urlQueryEscape to template functions
Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
2025-10-27 10:47:29 +01:00
dependabot[bot]
817dde743c
chore(deps): bump github.com/grpc-ecosystem/grpc-gateway/v2 (#17266)
Bumps [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway) from 2.27.1 to 2.27.2.
- [Release notes](https://github.com/grpc-ecosystem/grpc-gateway/releases)
- [Changelog](https://github.com/grpc-ecosystem/grpc-gateway/blob/main/.goreleaser.yml)
- [Commits](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.27.1...v2.27.2)

---
updated-dependencies:
- dependency-name: github.com/grpc-ecosystem/grpc-gateway/v2
  dependency-version: 2.27.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-24 16:50:53 +02:00
Linas Medžiūnas
042fe9d6bd
promql: benchmark for join queries with more labels (#17130)
* promql: benchmark for join queries with more labels

Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>

* Add benchmark case for GROUP_LEFT

Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>

* Address PR feedback

Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>

---------

Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
2025-10-24 13:08:01 +01:00
George Krajcsovits
d237230334
Merge pull request #17232 from prometheus/krajo/nh-stable
feat(nh): mark native histograms as stable and keep optional
2025-10-24 12:49:46 +02:00
György Krajcsovits
18efd9d629
feat(ui): mark native histograms as stable in ui strings
Plus some docstrings

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2025-10-24 12:32:15 +02:00
György Krajcsovits
c929578718
feat(nh): mark native histograms as stable in docs
Fixes: #16572

Mark as stable means that breaking changes are only allowed together with
major version release of Prometheus.

Co-authored-by: Björn Rabenstein <beorn@grafana.com>
Signed-off-by: George Krajcsovits <krajorama@users.noreply.github.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2025-10-24 12:31:42 +02:00
Björn Rabenstein
0ac71624cb
Merge pull request #17390 from prymitive/sample_limit
Include histograms in sample_limit logic
2025-10-24 12:07:06 +02:00
Minh Nguyen
f070e35358
[RW]: Adopt client_golang/exp/api/remote types for receiving RW1 and RW2 (#17197)
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

# Conflicts:
#	storage/remote/write_handler.go

* add comment

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* fix

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* fix failling test

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* nit_fixing

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

* fix comment

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>

---------

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
2025-10-24 10:31:34 +01:00
Lukasz Mierzwa
aac472df5b Fix TestScrapeLoop_HistogramBucketLimit
TestScrapeLoop_HistogramBucketLimit tests the bucket limiter but it also sets sample_limit to the same value, which seems incorrect.

Signed-off-by: Lukasz Mierzwa <l.mierzwa@gmail.com>
2025-10-24 10:04:18 +01:00
Lukasz Mierzwa
ce520b9256 Include histograms in sample_limit logic
Currently histograms bypass sample_limit logic as the limitAppender only implements the Append() method, while histograms are appended using AppendHistogram.
This means that they are effectively ignored during sample_limit checks and a scrape with sample_limit=100 and 500 histograms will accept all samples.
Add AppendHistogram method to the limitAppender so histograms are also counted towards sample_limit.

Signed-off-by: Lukasz Mierzwa <l.mierzwa@gmail.com>
2025-10-24 10:04:18 +01:00
Linas Medžiūnas
20815562d2
[BUGFIX] PromQL: fix more slice indexing bugs in info function (#17199)
* [BUGFIX] PromQL: fix more slice indexing bugs in info function

---------

Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
2025-10-23 17:39:22 +02:00
Julius Hinze
05612757b4
prometheusremotewrite: fix require.equal argument order (#17391)
Signed-off-by: Julius Hinze <julius.hinze@grafana.com>
2025-10-23 15:13:32 +02:00
Julien
ca00c97497
Merge pull request #17392 from prometheus/superq/rm_circleci
Remove obsolete CircleCI config
2025-10-23 15:03:01 +02:00
SuperQ
ab7f2d0b24
Remove obsolete CircleCI config
Builds have been stopped, we can remove the CircleCI config file.

Signed-off-by: SuperQ <superq@gmail.com>
2025-10-23 14:47:03 +02:00
Julius Volz
ae83804ab0
docs: Minor formatting/typo fixes in the HTTP API docs (#17339)
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2025-10-23 09:48:36 +00:00
zenador
87eb072c0a
Move unit tests for info function from go file to testdata (#17307)
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2025-10-23 11:47:42 +02:00