Commit Graph

1041 Commits

Author SHA1 Message Date
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
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
Julius Volz
13564c03ef Standardize doc page title handling
See https://groups.google.com/g/prometheus-developers/c/cwL3cM66Em8

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2025-05-28 21:37:27 +02:00
Antonio Jimenez
2834a665ed
Add support for promoting all OTel resource attributes (#16426)
Add support for promoting all OTel resource attributes via `promote_all_resource_attributes`,
except for those ignored using 'ignore_resource_attributes'.

---------

Signed-off-by: Antonio Jimenez <antonjim@thousandEyes.com>
Signed-off-by: Antonio Jimenez <123171955+antonjim-te@users.noreply.github.com>
2025-05-26 18:15:01 +02:00
bragi92
14fc57e4cf
remote_write azure auth : allow empty client_id to suppport system assigned managed identity (#16421)
* squash (#1)

* remote-write: allow empty azure client_id to support system assigned managed identity

* add blank line for tests

* remote-write: allow empty azure client_id to support system assigned managed identity

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

* add blank line for tests

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

---------

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

* treat empty client_id as system-assigned identity; this is a valid case

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

* rename file 

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

---------

Signed-off-by: Kaveesh Dubey <kadubey@microsoft.com>
Signed-off-by: bragi92 <kadubey@microsoft.com>
2025-05-24 15:01:49 +02:00
dongjiang
8d9332c199
fix metric_name_escaping_scheme option (#16625) 2025-05-24 14:25:39 +02:00
Ayoub Mrini
2edc3ed6c5
feat(tsdb): introduce --use-uncached-io feature flag and allow using it for chunks writing (#15365)
Signed-off-by: machine424 <ayoubmrini424@gmail.com>
Signed-off-by: Ayoub Mrini <ayoubmrini424@gmail.com>
2025-05-21 14:42:30 +02:00
Ayoub Mrini
f2fac45eaf
Merge pull request #16563 from zepellin/patch-1
docs: Fix `metric_name_escaping_scheme` config parameter
2025-05-19 16:31:57 +02:00
Ayoub Mrini
4b7321c8e8
Merge pull request #16607 from marcoderama/patch-3
docs: fix typo in operators.md
2025-05-19 10:55:42 +02:00
Bartlomiej Plotka
8e6b008608
feature: type-and-unit-labels (PROM-39 implementation) (#16228)
* feature: type-and-unit-labels (extended MetricIdentity)

Experimental implementation of https://github.com/prometheus/proposals/pull/39

Previous (unmerged) experiments:
* https://github.com/prometheus/prometheus/compare/main...dashpole:prometheus:type_and_unit_labels
* https://github.com/prometheus/prometheus/pull/16025

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

feature: type-and-unit-labels (extended MetricIdentity)

Experimental implementation of https://github.com/prometheus/proposals/pull/39

Previous (unmerged) experiments:
* https://github.com/prometheus/prometheus/compare/main...dashpole:prometheus:type_and_unit_labels
* https://github.com/prometheus/prometheus/pull/16025

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

* Fix compilation errors

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

Lint

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

Revert change made to protobuf 'Accept' header

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

Fix compilation errors for 'dedupelabels' tag

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

* Rectored into schema.Metadata

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

* texparse: Added tests for PromParse

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

* add OM tests.

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

* add proto tests

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

* Addressed comments.

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

* add schema label tests.

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

* addressed comments.

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

* fix tests.

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

* add promql tests.

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

* lint

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

* Addressed comments.

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

---------

Signed-off-by: bwplotka <bwplotka@gmail.com>
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com>
2025-05-17 09:37:25 +00:00
marcoderama
778d49bbfb
docs: fix typo in operators.md
Signed-off-by: marcoderama <marcoderamagit@gmail.com>
2025-05-16 12:03:24 -07:00
Julius Volz
1b818b03d5 Clean up codeboxes and headings in docs
The new docs site will have syntax highlighting, so this adds language tags
to code boxes that are currently missing them. I didn't add `promql` as a
language yet since the highlighter doesn't support it yet, plus a lot of
the PromQL codeboxes in our docs aren't strictly valid PromQL, they are
more like multiple expressions listed in the same code box on multiple
lines. So I'm leaving that for sometime later.

In the HTTP API page, I moved the curl examples from the JSON codeboxes to
their own ones above the JSON output. I considered putting an "Output:"
text between the curl + JSON output, but I think the way it currently looks
without it is probably fine.

I also fixed a number of headings which were at the wrong level relative to
their nesting in the document.

I also removed `go` as a language from the Go template language examples,
because the Go template language isn't Go at all.

I also adjusted the indent on one codebox to be more reasonable (2 spaces
instead of 8).

And then finally, my editor made a bunch of whitespace changes
automatically, like removing trailing spaces.

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

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2025-05-13 15:38:29 +02:00
Martin Danko
148968e399
docs: Fix metric_name_escaping_scheme config parameter
This is a fix for documentation update done in https://github.com/prometheus/prometheus/pull/16066, setting correct name for a configuration value.

Signed-off-by: Martin Danko <46035688+zepellin@users.noreply.github.com>
2025-05-07 12:41:49 +02:00