Commit graph

1170 commits

Author SHA1 Message Date
Arve Knudsen
56c6370b26
promql: fix info() handling of negated __name__ matchers (#17932)
Some checks are pending
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests for Prometheus upgrades and downgrades (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Compliance testing (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
* promql: fix info() handling of negated __name__ matchers

---------

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2026-04-08 16:01:27 +00:00
Bryan Boreham
e58f16abc6
Merge pull request #18418 from saikocat/promtool-query-instant-header
promtool: add --header flag to query instant command
2026-04-07 12:23:01 +01:00
Will Bollock
b70a871988
fix(discovery): delete expired refresh metrics on reload (#17614)
Building off config-specific Prometheus refresh metrics from an earlier
PR (https://github.com/prometheus/prometheus/pull/17138), this deletes
refresh metrics like `prometheus_sd_refresh_duration_seconds` and
`prometheus_sd_refresh_failures_total` when the underlying scrape job
configuration is removed on reload. This reduces un-needed cardinality
from scrape job specific metrics while still preserving metrics that
indicate overall health of a service discovery engine.

For example,
`prometheus_sd_refresh_failures_total{config="linode-servers",mechanism="linode"} 1`
will no longer be exported by Prometheus when the `linode-servers`
scrape job for the Linode service provider is removed. The generic,
service discovery specific `prometheus_sd_linode_failures_total` metric
will persist however.

* fix: add targetsMtx lock for targets access

* test: validate refresh/discover metrics are gone

* ref: combine sdMetrics and refreshMetrics

Good idea from @bboreham to combine sdMetrics and refreshMetrics!
They're always passed around together and don't have much of a
reason not to be combined. mechanismMetrics makes it clear what kind of
metrics this is used for (service discovery mechanisms).

---------

Signed-off-by: Will Bollock <wbollock@linode.com>
2026-04-02 13:43:35 +01:00
Frederic Branczyk
b014aa101d
Merge pull request #17601 from joelkbiju12/ft-kubernetes-nodeready-label
Some checks are pending
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests for Prometheus upgrades and downgrades (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Compliance testing (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
discovery: adding kubernetes node condition labels
2026-04-01 18:05:27 +02:00
Hoa
7c0801a926 promtool: add --header flag to query instant command
The `--header` flag was already supported by `promtool query range` but was
missing from `promtool query instant`. This adds the same flag so users can
pass extra HTTP headers (e.g. `X-Scope-OrgID` for multi-tenant setups)
without needing to create an `--http.config.file`.

```
[ENHANCEMENT] promtool: Add `--header` flag to `query instant` command, matching existing `query range` behaviour.
```

Signed-off-by: Hoa <hoameomu@gmail.com>
2026-04-01 17:10:56 +08:00
Aurélien Duboc
fa5960bf08
feat(discovery): add Outscale VM service discovery (#18139)
Add Outscale VM service discovery using osc-sdk-go, including optional secret_key_file support, metrics, docs, and configuration examples. Document the default region (eu-west-2).

Signed-off-by: Aurelien Duboc <aurelienduboc96@gmail.com>
2026-03-31 18:03:51 +02:00
Carrie Edwards
4326d54760
Rename created timestamp to start timestamp in proto (#18368)
Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>
2026-03-31 08:38:45 -07:00
Bryan Boreham
ffb296eed7
Merge pull request #16155 from LukoJy3D/docs/migration/clarify_on_content_type_headers
docs(migration): clarify on content-type headers
2026-03-31 12:58:48 +01:00
Skesov
cf09d9b885
Update docs/configuration/configuration.md
Co-authored-by: Ben Kochie <superq@gmail.com>
Signed-off-by: Skesov <12987308+Skesov@users.noreply.github.com>
2026-03-30 12:30:14 +03:00
Vladimir Skesov
20ff771593 discovery: add DigitalOcean Managed Databases service discovery
This adds 'databases' role to digitalocean_sd_config to discover DigitalOcean
Managed Database clusters. It follows the multi-role design pattern by
introducing a 'role' parameter (default: 'droplets').

Includes:
- Support for Managed Databases API.
- Pagination handling for Databases API.
- Comprehensive meta labels for database targets.
- Updated documentation and tests.

Signed-off-by: Vladimir Skesov <skesov@gmail.com>
2026-03-30 11:31:17 +03:00
Arve Knudsen
d6c18a4d62
promql: add test and docs for info() behavior when info series goes stale (#18352)
Some checks are pending
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Compliance testing (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
* promql: add test for info() with data label matcher when info series goes stale

When info() is called with a data label matcher that doesn't match
the empty string (e.g. {data=~".+"}), samples at timestamps where
no info series is available should be dropped rather than falling
back to the original un-enriched series.

This case was missing from the test suite.

* docs: document info() behavior when info series is unavailable

Document that when no matching info series exists at a timestamp,
data label matchers that don't match the empty string cause the
sample to be dropped, while empty-matching matchers or no selector
return the series unenriched.

* promql: add test cases for info() fallback when info series goes stale

Add test cases for info(metric, {data=~".*"}) and info(metric) to
complement the existing info(metric, {data=~".+"}) test case, making
the behavioral contrast explicit: empty-matching matchers and no
selector fall back to the unenriched series, while non-empty-matching
matchers drop the sample.

---------

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2026-03-30 09:32:29 +02:00
Pavel Rysnik
354c0b262a
docs: change 'standard variance' to 'variance'
Update functions.md file, change 'standard variance' to 'variance' in function descriptions

Signed-off-by: Pavel Rysnik <126406830+sakuuj@users.noreply.github.com>
2026-03-23 18:42:45 +03:00
Pavel Rysnik
e680e9bf49
docs: clarify 'stdvar' operator description
Updated the description of the stdvar operator to clarify that it calculates variance instead of standard variance.

Signed-off-by: Pavel Rysnik <126406830+sakuuj@users.noreply.github.com>
2026-03-23 11:12:46 +03:00
Pavel Rysnik
da22492abc
docs: fix 'stdvar' detailed explanation
Signed-off-by: Pavel Rysnik <126406830+sakuuj@users.noreply.github.com>
2026-03-22 18:37:19 +03:00
Julien
16876bab95
Merge pull request #18200 from roidelapluie/roidelapluie/retention-validation
Some checks are pending
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Compliance testing (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Multiple fixes in retention configuration
2026-03-20 12:27:37 +01:00
Julien Pivotto
1064c26da2 Log retention changes
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-03-19 17:21:45 +01:00
Jeremy Rickards
530c4bfcc9
docs: clarify that histogram_avg/count/sum/stddev/stdvar are native-histogram-only
The docs for these functions previously described them as acting on
"each histogram sample," which was ambiguous. Add "native" to clarify
they only operate on native histogram samples, not classic histograms.
This distinction was originally documented but lost when the
experimental feature warnings were removed.

Signed-off-by: Jeremy Rickards <jeremy.rickards@sap.com>
2026-03-19 14:33:05 +01:00
Jonas L.
a9d90952ba
Deprecate Hetzner Cloud server datacenter labels (#17850)
Some checks are pending
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Compliance testing (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
[hcloud.Server.Datacenter] is deprecated and will be removed after 1 July 2026. Use [hcloud.Server.Location] instead.

See https://docs.hetzner.cloud/changelog#2025-12-16-phasing-out-datacenters

Changes to Hetzner meta labels:

- `__meta_hetzner_datacenter`
    - is deprecated for the role `robot` but kept for backward compatibility. Using `__meta_hetzner_robot_datacenter` is preferred.
    - is deprecated for the role `hcloud` and will stop working after the 1 July 2026.

-  `__meta_hetzner_hcloud_datacenter_location` label
    - is deprecated but kept for backward compatibility, the same data is available in the [`hcloud.Server.Location`](https://pkg.go.dev/github.com/hetznercloud/hcloud-go/v2/hcloud#Server) struct.
    - using `__meta_hetzner_hcloud_location` is preferred.

-  `__meta_hetzner_hcloud_datacenter_location_network_zone`
    - is deprecated but kept for backward compatibility, the same data is available in the [`hcloud.Server.Location`](https://pkg.go.dev/github.com/hetznercloud/hcloud-go/v2/hcloud#Server) struct.
    - using `__meta_hetzner_hcloud_location_network_zone` is preferred.

- `__meta_hetzner_hcloud_location`
    - replacement label for `__meta_hetzner_hcloud_datacenter_location`

- `__meta_hetzner_hcloud_location_network_zone`
    - replacement label for `__meta_hetzner_hcloud_datacenter_location_network_zone`

- `__meta_hetzner_robot_datacenter`
    - replacement label for `__meta_hetzner_datacenter` with the role `robot`.

Signed-off-by: Jonas Lammler <jonas.lammler@hetzner-cloud.de>
2026-03-19 11:25:01 +01:00
Bartlomiej Plotka
364d70812f
st: disconnect st-storage with xor2-encoding given planned experiments (#18316)
* st: disconnect st-storage with xor2-encoding given planned experiments

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

* Update docs/feature_flags.md

Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>

* Update docs/feature_flags.md

Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>

* Update docs/feature_flags.md

Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>

* Update docs/feature_flags.md

Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>

---------

Signed-off-by: bwplotka <bwplotka@gmail.com>
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
2026-03-19 08:47:42 +00:00
Bartlomiej Plotka
a02e20d98e
Merge branch 'main' into feature/start-time
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
2026-03-17 13:06:25 +01:00
Bartlomiej Plotka
7e2b7e425c
Merge branch 'feature/start-time' into cedwards/document-st-storage
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
2026-03-17 06:21:05 +01:00
Carrie Edwards
870fdf71f1 Update documentation for st-storage feature
Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>
2026-03-16 09:59:36 -07:00
mihir-dixit2k27
c669470f07
docs: add HTTP SD integrations cross-reference (#18278)
Some checks are pending
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Compliance testing (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
* docs: add HTTP SD integrations cross-reference

Signed-off-by: Mihir Dixit <dixitmihir1@gmail.com>

* docs: add HTTP SD integrations cross-reference to configuration.md

Signed-off-by: Mihir Dixit <dixitmihir1@gmail.com>

---------

Signed-off-by: Mihir Dixit <dixitmihir1@gmail.com>
2026-03-16 14:09:54 +01:00
Carrie Edwards
a4a17a77cd Update comments and feature flag description
Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>
2026-03-13 07:43:28 -07:00
Carrie Edwards
b49ad5fc4b Update feature flag description
Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>
2026-03-12 13:24:59 -07:00
Carrie Edwards
7694434044 Document xor2-encoding feature flag
Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>
2026-03-12 11:05:59 -07:00
Charles Korn
24bc6d27ac
docs: clarify that lookback_delta query parameter takes either a duration or number of seconds
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2026-03-06 19:07:33 +11:00
Julius Volz
c023dec14b Docs: Fix Markdown formatting for __name__ label mention
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2026-03-04 14:22:14 +01:00
Matt
5a02b92c0e
AWS SD: RDS Role (#18206) 2026-03-04 12:17:38 +01:00
Pranshu Srivastava
9d2ed113c8
fixup! fixup! fixup! discovery/kubernetes: Support linked pod controllers
Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
2026-03-03 18:34:03 +05:30
Pranshu Srivastava
228b94f6eb
discovery/kubernetes: Support linked pod controllers
Extended Kubernetes SD to support the following pod-based labels:
* `__meta_kubernetes_pod_deployment_name`
* `__meta_kubernetes_pod_cronjob_name`
* `__meta_kubernetes_pod_job_name`

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
2026-03-03 18:30:48 +05:30
Craig Ringer
158647fb45 Document traceID / spanID injection in query log
Signed-off-by: Craig Ringer <craig.ringer@enterprisedb.com>
2026-02-26 11:48:15 +13:00
George Krajcsovits
5d3f9ee39b
Merge pull request #17904 from linasm/trim_histogram
Some checks are pending
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Compliance testing (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
promql: Implement </ and >/ operators for trimming native histograms
2026-02-24 17:16:24 +01:00
Julien
9d38077e50
Merge pull request #18080 from ldufr/ldufresne/retention-size-percentage
Some checks are pending
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Compliance testing (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Add percentage based retention
2026-02-24 15:50:36 +01:00
Laurent Dufresne
971143edac Added Retention.Percentage to config file with runtime config reloading
Signed-off-by: Laurent Dufresne <laurent.dufresne@grafana.com>
2026-02-24 15:28:20 +01:00
Julien
019e842249
Merge pull request #17916 from roidelapluie/roidelapluie/sigv4up
Add AWS external_id support in sigv4 configuration
2026-02-23 13:15:11 +01:00
Julien Pivotto
0a6fbefaf4 docs: Add AWS external_id support in sigv4 configuration
This adds documentation for the external_id parameter when assuming
AWS roles in the sigv4 configuration.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-02-23 12:28:57 +01:00
Matt
ce30ae49f3
[FEATURE] AWS SD: Add Elasticache Role (#18099)
* AWS SD: Elasticache

This change adds Elasticache to the AWS SD.

Co-authored-by: Ben Kochie <superq@gmail.com>
Signed-off-by: Matt <small_minority@hotmail.com>

---------

Signed-off-by: Matt <small_minority@hotmail.com>
Co-authored-by: Ben Kochie <superq@gmail.com>
2026-02-22 15:56:03 +01:00
Linas Medziunas
fbb706b886 Documentation
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
2026-02-20 15:13:12 +02:00
Linas Medžiūnas
5bd0d00f8c
PromQL: Add experimental histogram_quantiles variadic function (#17285)
Some checks failed
buf.build / lint and publish (push) Has been cancelled
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Build Prometheus for common architectures (push) Has been cancelled
CI / Build Prometheus for all architectures (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
Signed-off-by: Björn Rabenstein <github@rabenste.in>
Signed-off-by: beorn7 <beorn@grafana.com>
Co-authored-by: Björn Rabenstein <github@rabenste.in>
Co-authored-by: beorn7 <beorn@grafana.com>
2026-02-18 17:32:29 +01:00
hridyesh bisht
b64d56cbf3
Fix a couple of broken links in configuration.md (#18045)
Signed-off-by: kakabisht <kakabisht07@gmail.com>
2026-02-13 11:15:37 +01:00
George Krajcsovits
6fec996722
docs(api): clarify metadata vs remote protocols (#17481)
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2026-02-10 17:33:06 +01:00
George Krajcsovits
69f1bc9dad
Merge pull request #18040 from mohammadv184/patch-1
docs: fix typo in prometheus_agent.md doc
2026-02-10 12:17:48 +01:00
Ian Kerins
4383499997
promtool: support missing promql syntax features (#17926)
Some checks failed
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Push README to Docker Hub / Push README to Docker Hub (push) Has been cancelled
Push README to Docker Hub / Push README to quay.io (push) Has been cancelled
Namely promql-duration-expr and promql-extended-range-selectors. This
allows promtool to e.g. check rules files using syntax gated by these
features.

Signed-off-by: Ian Kerins <git@isk.haus>
2026-02-09 07:26:37 +00:00
Mohammad Abbasi
a19a5314a3
fix(docs): typo in prometheus_agent.md doc
Signed-off-by: Mohammad Abbasi <mohammad.v184@gmail.com>
2026-02-08 19:02:56 +03:30
Matt
cf9d093f8f
prw2: Move Remote Write 2.0 CT to be per Sample; Rename to ST (start timestamp) (#17411) (#17600)
Relates to
https://github.com/prometheus/prometheus/issues/16944#issuecomment-3164760343

Signed-off-by: bwplotka <bwplotka@gmail.com>
Signed-off-by: matt-gp <small_minority@hotmail.com>
Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
2026-02-05 10:40:45 +01:00
Eric Eastwood
f0f40b970d
Document special labels that affect scraping and targets (__address__, __scheme__, __metrics_path__, __scrape_interval__, __scrape_timeout__) (#17765)
Signed-off-by: Eric Eastwood <contact@ericeastwood.com>
2026-02-04 13:42:37 +01:00
Julien
75f94903b3
Add OpenAPI 3.2 specification generation for Prometheus HTTP API (#17825)
* Add OpenAPI 3.2 specification generation for Prometheus HTTP API

This commit introduces an OpenAPI specification for the Prometheus API.
After testing multiple code-generation servers with built-in APIs, this
implementation uses an independent spec file outside of the critical path.
This spec file is tested with a framework present in this pull request.

The specification helps clients know which parameters they can use and is
served at /api/v1/openapi.yaml. The spec file will evolve with the
Prometheus API and has the same version number.

Downstream projects can tune the APIs presented in the spec file with
configuration options using the IncludePaths setting for path filtering.

In the future, there is room to generate a server from this spec file
(e.g. with interfaces), but this is out of scope for this pull request.

Architecture:
- Core OpenAPI infrastructure (openapi.go): Dynamic spec building,
  caching, and thread-safe spec generation
- Schema definitions (openapi_schemas.go): Complete type definitions
  for all API request and response types
- Path specifications (openapi_paths.go): Endpoint definitions with
  parameters, request bodies, and response schemas
- Examples (openapi_examples.go): Realistic request/response examples
- Helper functions (openapi_helpers.go): Reusable builders for common
  OpenAPI structures

Testing:
- Comprehensive test suite with golden file validation
- Test helpers package for API testing infrastructure
- OpenAPI compliance validation utilities

The golden file captures the complete specification for snapshot testing.
Update with: go test -run TestOpenAPIGolden -update-openapi-spec

REVIEWERS: The most important thing to check would be the OpenAPI golden
file (web/api/v1/testdata/openapi_golden.yaml). Test scenarios are important
as they test the actual OpenAPI spec validity.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>

* Add OpenAPI 3.1 support with version selection

Add support for both OpenAPI 3.1 and 3.2 specifications with version
selection via openapi_version query parameter. Defaults to 3.1 for
broader compatibility

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>

* Enhance OpenAPI examples and add helper functions

- Add timestampExamples helper for consistent time formatting
- Add exampleMap helper to simplify example creation
- Improve example summaries with query details
- Add matrix result example for range vector queries

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>

* web/api: Add AtST method to test helper iterators

Implement the AtST() method required by chunkenc.Iterator interface
for FakeSeriesIterator and FakeHistogramSeriesIterator test helpers.
The method returns 0 as these test helpers don't use start timestamps

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>

* OpenAPI: Add minimum coverage test

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>

* OpenAPI: Improve examples handling

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>

---------

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-01-29 13:36:13 +01:00
Jeanette Tan
df31bfd59d Update docs about ignoring info metrics
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2026-01-28 02:48:07 +08:00
Ganesh Vernekar
8721871cf7
docs: Document the stale_series_compaction_threshold config file option (#17928)
Some checks are pending
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Signed-off-by: Ganesh Vernekar <ganesh.vernekar@reddit.com>
Signed-off-by: Björn Rabenstein <beorn@grafana.com>
Co-authored-by: Björn Rabenstein <beorn@grafana.com>
2026-01-27 11:52:41 +00:00