Commit Graph

503 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
dongjiang
2bf6f4c9dc update fix configuration.md
Signed-off-by: dongjiang <dongjiang1989@126.com>
2025-05-06 20:09:42 +02:00
George Krajcsovits
2726a18ae3
Merge pull request #16452 from chardch/global-always-scrape-classic-hist
Add global config option for always_scrape_classic_histograms
2025-05-06 09:29:30 +02:00
chardch
a1c157aaef Add global config option for always_scrape_classic_histograms
Addresses https://github.com/prometheus/prometheus/issues/16371
This will help with migrating to native histograms with `convert_classic_histograms_to_nhcb` since users may still need to keep the classic histograms during a migration

Signed-off-by: chardch <otwordsne@gmail.com>
2025-05-05 10:14:04 -07:00
Graham Reed
b6aaea22fb
promtool: Optional fuzzy float64 comparison in rules unittests (#16395)
Make fuzzy compare opt-in via fuzzy_compare boolean in each unittest file.

Signed-off-by: Graham Reed <greed@hypervolt.co.uk>
2025-05-01 17:58:12 +10:00
Jonas Lammler
08982b177f
Add label_selector to hetzner service discovery
Allows to filter the servers when sending the listing request to the API. This feature is only available when using the `role=hcloud`.

See https://docs.hetzner.cloud/#label-selector for details on how to use the label selector.

Signed-off-by: Jonas Lammler <jonas.lammler@hetzner-cloud.de>
2025-04-30 09:24:14 +02:00
Arthur Silva Sens
9659e30dec
Add documentation for 'NoTranslation' mode (#16470)
* Add documentation for 'NoTranslation' mode

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

* Update docs/configuration/configuration.md

Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

---------

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
2025-04-23 14:15:18 +00:00
beorn7
2763b6ba13 docs: Remove recording rule note for native histograms
We implemented proper type handling (gauge vs. counter histogram) a
while ago. The note about it is obsolete.

Signed-off-by: beorn7 <beorn@grafana.com>
2025-04-15 14:43:31 +02:00
George Krajcsovits
c15ae44455
Merge pull request #13613 from vvyushmanov/main
Documentation: Add description for OAuth2 password grant type setup
2025-04-15 13:29:20 +02:00
chardch
357b5ed640 Fix small issues and clarify documentation
Signed-off-by: chardch <otwordsne@gmail.com>
2025-03-29 08:35:11 -07:00
chardch
2f59d38054 Add global config option for convert_classic_histograms_to_nhcb
Addresses the global part of https://github.com/prometheus/prometheus/issues/13532

Signed-off-by: chardch <otwordsne@gmail.com>
2025-03-27 10:55:27 -07:00
Owen Williams
6566c5a2b3
scrape: Add config option for escaping scheme request. (#16066)
The new metric_name_escaping_scheme config option works in parallel with metric_name_validation_scheme and controls which escaping scheme is requested when scraping. When not specified, the scheme will request underscores if the validation scheme is set to legacy, and will request allow-utf-8 when the validation scheme is set to utf8. This setting allows users to allow utf8 names if they like, but explicitly request an escaping scheme rather than UTF-8.

Fixes https://github.com/prometheus/prometheus/issues/16034

Built on https://github.com/prometheus/prometheus/pull/16080

Signed-off-by: Owen Williams <owen.williams@grafana.com>
2025-03-26 18:27:28 -04:00
Carrie Edwards
c90b387d89
Optionally translate OTel histograms to NHCB (#15850)
* Optionally translate OTEL histograms to NHCB

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Add tests for explicit histogram to NHCB translation

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Linting

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Add test for translation with flag

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Refactor to re-use bucket conversion function

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Update prompb

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Add comment explaining explicit bounds and use defined CustomBucketSchema

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Add TODO for limiting max bucket count

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Fix imports and remove extra blank line

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Update configuration docs and CHANGELOG

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Update CHANGELOG

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

* Use otlptranslator package

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>

---------

Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>
2025-03-20 09:18:51 -07:00
co63oc
0e4e5a71bd
Fix typos (#16076)
Signed-off-by: co63oc <co63oc@users.noreply.github.com>
2025-02-28 11:24:25 +11:00
Sebastian Schubert
efa4f4a60b
doc: clarified behaviour of source_labels in relabel_config
Signed-off-by: Sebastian Schubert <basti@schubert.digital>
2025-02-26 17:57:44 +01:00
Ian Kerins
8c8b83ed4e
doc: fix broken kuma.io link (#16028)
doc: fix broken kuma.io link

I'm not actually familiar with kuma, but I noticed this link was broken, and I believe the one I've found here is equivalent.

Signed-off-by: Ian Kerins <git@isk.haus>
Signed-off-by: Björn Rabenstein <github@rabenste.in>
Co-authored-by: Björn Rabenstein <github@rabenste.in>
2025-02-20 23:14:33 +01:00
Ayoub Mrini
de6add2c7d
Merge pull request #14228 from Codelax/sd-scaleway-routed-ips
feat(scaleway-sd): add labels for multiple public IPs
2025-02-11 17:21:29 +01:00
Paulo Dias
cddf729ca3
Merge branch 'main' of github.com:prometheus/prometheus into openstack-loadbalancer-discovery
Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
2025-01-21 11:16:52 +00:00
Paulo Dias
c803f7e82f
Merge branch 'openstack-loadbalancer-discovery' of github.com:paulojmdias/prometheus into openstack-loadbalancer-discovery
Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
2025-01-06 15:15:32 +00:00
Paulo Dias
816a5c94b9
fix: fix docs typo
Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
2025-01-06 15:15:17 +00:00
Hélia Barroso
56094197b5
[Docs] Note that scrape_timeout cannot be greater than scrape_interval (#15786)
Signed-off-by: Hélia Barroso <helia_barroso@hotmail.com>
2025-01-06 14:13:17 +00:00
Arve Knudsen
4f67a38a39
template: Use cases.Title instead of deprecated strings.Title (#15721)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2025-01-03 17:58:02 +01:00
Paulo Dias
36ccf62692
Merge branch 'prometheus:main' into openstack-loadbalancer-discovery 2025-01-02 14:44:19 +00:00
Paulo Dias
d40e99c2ec
Merge branch 'openstack-loadbalancer-discovery' of github.com:paulojmdias/prometheus into openstack-loadbalancer-discovery
Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
2025-01-02 14:43:46 +00:00
Paulo Dias
cb7254158b
feat: rename status to provisioning_status and add operating_status
Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
2025-01-02 14:43:31 +00:00