1052 Commits

Author SHA1 Message Date
Ganesh Vernekar
8b906524ce Add docs for the promql-normalise-le-quantile-labels experimental feature
Signed-off-by: Ganesh Vernekar <ganesh.vernekar@reddit.com>
2025-09-03 16:00:04 -07:00
Julien
637b176a9b
Merge pull request #17021 from ringerc/add_first_over_time
Add first_over_time and ts_of_first_over_time as experimental functions
2025-09-02 14:56:00 +02:00
Daniel Gospodinow
562d13e930
docs: minor grammar improvements in basics.md (#17077)
Corrected minor grammatical errors in the documentation.

Signed-off-by: Daniel Gospodinow <danielgospodinow@gmail.com>
2025-09-02 12:44:14 +01:00
Craig Ringer
1ce84d8e2f feat(promql): add first_over_time and ts_of_first_over_time
Add a first_over_time function, and corresponding ts_of_first_over_time
function.  Both are behind the experimental functions feature flag.

Signed-off-by: Craig Ringer <craig.ringer@enterprisedb.com>
2025-09-02 10:24:31 +12:00
bragi92
20580b6ba8
remote_write azure auth : add workload identity support (#16788)
* initial changes

Signed-off-by: Kaveesh Dubey <kadubey@microsoft.com>

* .

Signed-off-by: Kaveesh Dubey <kadubey@microsoft.com>

* fix comments

Signed-off-by: Kaveesh Dubey <kadubey@microsoft.com>

* fix tenantid test

Signed-off-by: Kaveesh Dubey <kadubey@microsoft.com>

* style

Signed-off-by: Kaveesh Dubey <kadubey@microsoft.com>

* Update storage/remote/azuread/azuread.go

Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: bragi92 <kadubey@microsoft.com>

* Update storage/remote/azuread/azuread.go

Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: bragi92 <kadubey@microsoft.com>

* Update storage/remote/azuread/azuread.go

Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: bragi92 <kadubey@microsoft.com>

* Update storage/remote/azuread/azuread.go

Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: bragi92 <kadubey@microsoft.com>

* Update storage/remote/azuread/azuread.go

Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: bragi92 <kadubey@microsoft.com>

* Update storage/remote/azuread/azuread.go

Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: bragi92 <kadubey@microsoft.com>

* Update storage/remote/azuread/azuread.go

Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: bragi92 <kadubey@microsoft.com>

* pr feedback

Signed-off-by: Kaveesh Dubey <kadubey@microsoft.com>

---------

Signed-off-by: Kaveesh Dubey <kadubey@microsoft.com>
Signed-off-by: bragi92 <kadubey@microsoft.com>
Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
2025-08-26 07:14:47 +01:00
Björn Rabenstein
e8f650b00c
Merge pull request #17049 from prometheus/beorn7/doc
docs: counter vs. gauge histogram behavior with `+`/`-`
2025-08-15 11:19:51 +02:00
beorn7
1071c82b42 docs: counter vs. gauge histogram behavior with +/-
This mostly handles the cases mentioned in #16576. However, there are
some related changes in here, too:

- Some line formatting to avoid lines longer than 80 characters.

- Establish in basics.md that histograms have a counter vs. gauge
  "flavor" that is also stored in the sample and not just by
  convention as for float samples.

- Add the documentation of the unary minus, which was missing so far.
  This require a bit of restructuring.

- Cleaned up a few references to "Prometheus" that should better refer
  to "PromQL" (and "Prometheus's query language" → "PromQL" etc.).

I decided to not explain in all detail when and how PromQL detects an
incompatible counter reset. The spec is linked from basics.md, so the
minority that might be interested in this can still look it up.

Signed-off-by: beorn7 <beorn@grafana.com>
2025-08-13 19:25:17 +02:00
shk1999
6851b1095c chore(configuration.md): fix unit_testing_rules typo
Signed-off-by: shk1999 <sh.karimi@vasl.ir>
2025-08-13 16:48:28 +03:30
machine424
a48d348811 chore: exclude experimental /v1/ endpoints from stability guarantees
a bunch is marked as experimental in https://prometheus.io/docs/prometheus/latest/querying/api/

Signed-off-by: machine424 <ayoubmrini424@gmail.com>
2025-08-12 16:45:17 +02:00
Julius Volz
2e709c6567
Merge pull request #16695 from sujalshah-bit/block_endpoint
api: Create `/status/tsdb/blocks` endpoint.
2025-07-31 18:15:49 +02:00
Julien
fe67b30e9e
Merge pull request #16731 from roidelapluie/rename-master-main
docs: Direct link to remote read proto to the main branch
2025-07-28 16:34:55 +02:00
Olivier Lemasle
da9b8b2f8d chore(configuration.md): Fix typo
Signed-off-by: Olivier Lemasle <o.lemasle@gmail.com>
2025-07-22 13:50:21 +01:00
Arthur Silva Sens
3602785a89
Support including scope metadata as metric labels (#16878)
* Support including scope metadata as metric labels

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

* Ensure Scope Name, Version and Schema URL aren't overriden by attributes

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

---------

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
2025-07-18 13:44:05 -03:00
Ayoub Mrini
9dc274687b
Merge pull request #16831 from machine424/nsmeta
feat(discovery/kubernetes): allow attaching namespace metadata
2025-07-17 10:30:27 +01:00
machine424
b74c3ce153
chore(configuration.md): adjust kubernetes DS config
Signed-off-by: machine424 <ayoubmrini424@gmail.com>
2025-07-17 09:55:10 +02:00
machine424
a9f6fdd910
feat(discovery/kubernetes): allow attaching namespace metadata
to ingress and service roles.

with the help of claude-4-sonnet

Signed-off-by: machine424 <ayoubmrini424@gmail.com>
2025-07-17 09:53:16 +02:00
Bryan Boreham
36ec1e4fb0
Merge branch 'main' into merge-3.5-into-main
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2025-07-14 15:29:00 +01:00
Owen Williams
d2f1f4fb27
config: Add UnderscoreEscapingWithoutSuffixes translation strategy (#16849)
The last permutation of the translation options does underscore translation but does not add suffixes.
This translation option already exists in Mimir as otel_metric_suffixes_enabled, indicating external demand for this strategy.
There is an accompanying update to prometheus-docs to explain the use of this mode: https://github.com/prometheus/docs/pull/2688

Signed-off-by: Owen Williams <owen.williams@grafana.com>
2025-07-10 11:27:23 -04:00
Charles Korn
8397b738bf
docs: clarify docs for PromQL aggregation operators (#16837)
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2025-07-10 15:34:57 +02:00
Dmitry Ponomaryov
b18272a572
Add template functions to support various use cases. (#16619)
Presumably, this will help with Loki alerts, but the added functionality is also generally useful.

For one, this enables `parseDuration` to also accept negative duration (as that's something that is also used in PromQL by now).

This also adds a function `now` to return the evaluation time of the template (as seconds since epoch AKA Unix time) and a function `toDuration` (akin to `toTime`), which creates a Go `time.Duration` from a duration in seconds.

---------

Signed-off-by: Dmitry Ponomaryov <me@halje.ru>
Signed-off-by: Dmitry Ponomaryov <iamhalje@gmail.com>
2025-07-10 00:33:20 +02:00
liangmulu
b1a7df2c0c chore: fix some minor issues in comments
Signed-off-by: liangmulu <liangmulu@outlook.com>
2025-07-09 18:05:41 +08:00
Arthur Silva Sens
4b9d0fb92f
Revert: OTLP Support including scope metadata as metric labels (#16842)
Reverts #16730 and #16760

This is being done because we've noticed a problem in the spec that could
lead to name collisions if attributes name, version or schema_url are added
to the scope. They would collide with the already reserved labels
otel_scope_name, otel_scope_version and otel_scope_schema_url.

Since this new configuration option never made it into a release, we can
safely remove it from the 3.5 release. We'll sort this out for the 3.6 release

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
2025-07-08 10:37:19 +00:00
RaphSku
938e5cb62b
docs: Added documentation for promtool configuration with http.config.file (#16522)
Includes an example.

Signed-off-by: RaphSku <rapsku.dev@gmail.com>
2025-07-07 00:00:51 +02:00
sujal shah
4408a6bcaf api: Create /status/tsdb/blocks endpoint.
this endpoint serves blocks data to the client.

Signed-off-by: sujal shah <sujalshah28092004@gmail.com>
2025-07-04 03:13:54 +05:30
machine424
c2d6e528e4
feat(discovery/kubernetes): allow attaching namespace metadata
to endpointslice, endpoints and pod roles

after injecting the labels for endpointslice, claude-4-sonnet
helped transpose the code and tests to endpoints and pod roles

fixes https://github.com/prometheus/prometheus/issues/9510
supersedes https://github.com/prometheus/prometheus/pull/13798

Signed-off-by: machine424 <ayoubmrini424@gmail.com>
Co-authored-by: Paul BARRIE <paul.barrie.calmels@gmail.com>
2025-07-03 19:41:08 +02:00
Julien
432f130a32 PromQL: min/max/step: Address review comments
Signed-off-by: Julien <291750+roidelapluie@users.noreply.github.com>
2025-07-02 11:17:36 +02:00
Julien Pivotto
ee7d5158a7 Add step(), min(a,b) and max(a,b) in promql duration expressions
step() is a new keyword introduced to represent the query step width in duration expressions.

min(a,b) and max(a,b) return the min and max from two duration expressions.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2025-07-02 11:17:17 +02:00
Julius Volz
bfbae39931
Merge pull request #16716 from charleskorn/charleskorn/binops-docs
docs: clarify and expand binary operations documentation
2025-07-02 10:02:17 +02:00
Charles Korn
d19a9ab673
Remove other instances of "obvious"
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2025-07-01 20:13:46 +10:00
Charles Korn
1977452331
Address PR feedback: adjust docs to match current behaviour
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2025-07-01 20:10:20 +10:00
Charles Korn
665eb3d6cb
Address PR feedback: remove use of "obvious"
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2025-07-01 20:08:18 +10:00
Charles Korn
70df21a680
Address PR feedback: format Inf and NaN as monospace
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2025-07-01 20:07:07 +10:00
Charles Korn
9c6916f4f9
Address PR feedback: add blank lines before lists
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2025-07-01 20:06:15 +10:00
George Krajcsovits
5b7ff92d95
fix(promql): histogram_quantile and histogram_fraction NaN observed in native histogram (#16724)
* fix(promql): histogram_quantile NaN observed in native histogram

Fixes: #16578

See the issue for detailed explanation.
When a histogram had only NaN observations and no normal observations,
we returned 0 from the quantile, which is completely wrong. If there were
normal observations but we went over them, we returned the upper bound of
the existing buckets, however that contradicts expectations on
histogram_fraction. Now we return NaN if the quantile is calculated to be
over all normal observations, falling into NaNs (in a virtual +Inf bucket).

We also return info level annotations if we see any NaN observations.
The annotation calls out if we returned NaN or even if we took the
virtual +Inf bucket into account.

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

* fix(promql): histogram_fraction NaN observed in native histogram

Fixes: #16580

According to the specification we should not take NaN observations
into account when calculating the fraction. This commit fixes that
and adds an info level annotation to let the user know about this.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2025-06-25 13:37:43 +02:00
Rishi Jat
31e158b749
Add documentation for custom_values usage in NHCB (#16757)
Signed-off-by: rishi-jat <rishijat098@gmail.com>
Signed-off-by: Rishi Jat <rishijat098@gmail.com>
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
2025-06-24 21:52:55 +02:00
Julien Pivotto
c07950e5e9 docs: remote read: Mention buf.build
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2025-06-20 16:25:55 +02:00
Arve Knudsen
c701636034
OTLP receiver: Rename otlp.convert_scope_metadata to otlp.promote_scope_metadata (#16760)
* Rename otlp.convert_scope_metadata to otlp.promote_scope_metadata

---------

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Julius Hinze <juliusmh@proton.me>
2025-06-20 13:09:02 +00:00
Arve Knudsen
964bd7d1a9
OTLP: Support including scope metadata as metric labels (#16730)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2025-06-18 09:13:51 +02:00
Jan-Otto Kröpke
ceaa3bd6f9
discovery: add STACKIT SD (#16401) 2025-06-17 15:41:14 +02:00
Julien Pivotto
0fb698675c docs: Direct link to remote read proto to the main branch
Left over of the master->main branch rename.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2025-06-16 11:47:58 +02:00
Julien
998840c496
Merge pull request #16713 from roidelapluie/fix-pow-dur-expr
promql: Fix unary operator precedence in duration expressions
2025-06-16 11:13:34 +02:00
Julien Pivotto
db15681633 Update duration expression docs
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2025-06-16 10:53:36 +02:00
Michael Hoffmann
a5fa9431d8 promql: add ts_of_(max,min,last)_over_time functions
This commit adds the ts_of_(max,min,last)_over_time functions behind the experimental feature flag.

Signed-off-by: Michael Hoffmann <mhoffmann@cloudflare.com>
2025-06-12 15:03:28 +00:00
Charles Korn
5926159f2a
Clarify expected behaviour of on(__name__)
See https://github.com/prometheus/prometheus/issues/16631

Signed-off-by: Charles Korn <charles.korn@grafana.com>
2025-06-11 13:38:06 +10:00
Charles Korn
0c6ef1b23c
Clarify behaviour of bool modifier
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2025-06-11 13:38:05 +10:00
Charles Korn
40bed6281e
Clarify behaviour of metric names with bool modifier
Based on discussion in https://github.com/prometheus/prometheus/issues/15471

Signed-off-by: Charles Korn <charles.korn@grafana.com>
2025-06-11 13:38:02 +10:00
Charles Korn
1e794f7ef9
Break large paragraphs into smaller pieces
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2025-06-11 13:21:10 +10:00
Ayoub Mrini
50ba25f273
chore(docs/kubernetes SD): add a note about Endpoints API being deprecated in kubernetes 1.33+ (#16684)
* chore(docs/kubernetes SD): add a note about Endpoints API being deprecated in kubernetes 1.33+

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

* chore(discovery/kubernetes): add Endpoints API deprecation comment

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

---------

Signed-off-by: machine424 <ayoubmrini424@gmail.com>
2025-06-06 11:56:27 +02:00
Björn Rabenstein
eb1272eda7
Merge pull request #16653 from jkroepke/release-3.4-main
Merge release-3.4 into main
2025-06-04 18:06:11 +02:00
Jan-Otto Kröpke
638dc8dbdc
Merge branch 'release-3.4' into release-3.4-main
# Conflicts:
#	.github/workflows/ci.yml
#	CHANGELOG.md
#	RELEASE.md
#	VERSION
#	cmd/prometheus/main_test.go
#	docs/configuration/configuration.md
#	web/ui/mantine-ui/package.json
#	web/ui/module/codemirror-promql/package.json
#	web/ui/module/lezer-promql/package.json
#	web/ui/package-lock.json
#	web/ui/package.json
2025-05-31 12:48:16 +02:00