contribution/compass
prometheus/prometheus

Prometheus

47 signals · 52 observation events

Open repository ↗

The Prometheus monitoring system and time series database.

65.7K stars10.8K forksGoApache-2.0alertinggraphinghacktoberfestmetricsmonitoringprometheustime-serieskeyword: Prometheus monitoring
PROJECT NEWS

Release, roadmap, and discussion

All news →
prometheus/prometheus

Prometheus

Observability & Reliability
Latest stable

3.13.2 / 2026-07-29

v3.13.2
  • What's Changed
  • [SECURITY] Bump golang.org/x/text to v0.39.0 (CVE-2026-56852) and google.golang.org/grpc to v1.82.1 (GHSA-hrxh-6v49-42gf). #19290 by @krajorama
  • [BUGFIX] PromQL: Preallocate the active query tracker file to avoid SIGBUS crashes when the data disk is full. #19289 by @akshajrawat
Original release notes ↗

Publicly indicated next

Prereleases and milestones indicate public plans; they are not delivery commitments.

Observation trail

  1. changedtitle, updatedAt
  2. changedtext, updatedAt
  3. discoveredinitial snapshot
  4. discoveredinitial snapshot
  5. changedupdatedAt
  6. changedupdatedAt
  7. changedupdatedAt
  8. changedupdatedAt, metrics
  9. changedupdatedAt, metrics
  10. discoveredinitial snapshot
  11. discoveredinitial snapshot
  12. discoveredinitial snapshot
  13. changedinitial snapshot
  14. changedinitial snapshot
  15. changedinitial snapshot
  16. changedinitial snapshot
  17. changedinitial snapshot
  18. changedinitial snapshot
  19. changedinitial snapshot
  20. changedinitial snapshot
  21. changedinitial snapshot
  22. changedinitial snapshot
  23. changedinitial snapshot
  24. changedinitial snapshot
  25. changedinitial snapshot
  26. changedinitial snapshot
  27. changedinitial snapshot
  28. changedinitial snapshot
  29. changedinitial snapshot
  30. changedinitial snapshot
47 shown
issue

__meta_kubernetes_service_loadbalancer_ip not working as expected

### What did you do? used following config snippet to set LB service external IP as param_target for DNS probes ``` .... relabel_configs: - action: keep regex: powerdns-external;pdns-udp source_labels: - __meta_kubernetes_service_name - __meta_kubernetes_service_port_name - source_labels: - __meta_kubernetes_service_loadbalancer_ip target_label: __param_targ

importance 15@whitepiratebakuopenhelp wantedcomponent/service discoverygood first issuecomponent/service discovery/kubernetesOriginal evidence ↗
issue

bug(sending RW2): RW2 sends disconnected exemplars without samples

**Current implementation of the RW2 sending does not implement exemplars correctly.** It keeps the RW1 way of exemplars, where they are sent in a separate `TimeSeries` message with series labels, exemplar details and without samples. This represents the way Prometheus V1 Appender looks like and the current exemplar in-mem (and WAL) storage. We could call thi

importance 10@bwplotkakind/bugcomponent/remote storageOriginal evidence ↗
issue

alerting: expose activeAt for alert templating

### Proposal Is't possible to use information about metric in alert rule, but it's not possible tu use activeAt information. It will be great to have access to it. The question have already been asked #14713, but the solution of going through the alertmanager is only a palliative and does not meet all needs. is it possible to modify following files to add "a

importance 7@tguenneguezopenpriority/Pmaybecomponent/ruleskind/featureOriginal evidence ↗
issue

__address__ label from pod discovered through kubernetes discovery does not include port when relabelling

### What did you do? If you specify scraping annotation for a kubernetes pod, typically for each container port a target is added (kubernetes/pod.go): https://github.com/prometheus/prometheus/blob/main/discovery/kubernetes/pod.go#L280 If you have a second container in the pod, that does not expose any container ports, then kubernetes/pod.go will add the IP a

importance 6@peterhonederclosedOriginal evidence ↗
issue

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the [Dependency Dashboard](https://docs.renovatebot.com/key-concepts/dashboard/) docs to learn more.<br>[View this repository on the Mend.io Web Portal](https://developer.mend.io/github/prometheus/prometheus). ## Repository Problems These problems occurred while renovating this repository. [Vi

importance 6@renovate[bot]openOriginal evidence ↗
issue

discovery/file: Flaky `TestInvalidFileUpdate` and `TestUpdateFileWithPartialWrites` tests

``` FAIL: TestInvalidFileUpdate (1.10s) file_test.go:400: Error Trace: /__w/prometheus/prometheus/discovery/file/file_test.go:227 /__w/prometheus/prometheus/discovery/file/file_test.go:400 Error: Not equal: expected: "[{\"targets\":[\"localhost:9090\",\"example.org:443\"],\"labels\":{\"__meta_filepath\":\"/tmp/TestInvalidFileUpdate505692747/001/valid.yml\",\

importance 6@bwplotkaopenOriginal evidence ↗
issue

promql/parser: parentheses around a plain duration literal are lost on round-trip

Note: I've generated this issue with Claude Opus 4.7 after using it to verify the issue. While reviewing #18768 I noticed that `(N)` inside a duration-expression position (offset, range bracket) is dropped on `Expr.String()` round-trip when N reduces to a single `*NumberLiteral`. Wrapping a multi-term `*DurationExpr` survives because `*DurationExpr` has a `W

importance 5@krajoramaopenkind/bugpriority/Pmaybecomponent/promqlOriginal evidence ↗
pull request

docs: document NaN behaviour of clamp_max() and clamp_min()

#### Which issue(s) does the PR fix: Fixes #19273 #### What this PR does: `clamp()` documents that float samples come back as `NaN` when either bound is `NaN`: > * Float samples are clamped to `NaN` if `min` or `max` is `NaN` `clamp_max()` and `clamp_min()` route through the same `clamp()` helper in `promql/functions.go`, so they behave the same way, but nei

importance 5@om7057openOriginal evidence ↗
pull request

TSDB: improve isolation performance

<!-- - Please give your PR a title in the form "area: short description". For example "tsdb: reduce disk usage by 95%" - Please sign CNCF's Developer Certificate of Origin and sign-off your commits by adding the -s / --signoff flag to `git commit`. See https://github.com/apps/dco for more information. - If the PR adds or changes a behaviour or fixes a bug of

importance 5@prymitiveopenprombenchOriginal evidence ↗
issue

Incorrect Markdown link formatting due to space between [] and ()

There are a couple of links in the documentation where a space exists between the link text ([]) and the URL (()). This breaks standard Markdown link formatting and prevents the links from rendering correctly. The affected links are: * AirBnB's Nerve in https://prometheus.io/docs/prometheus/latest/configuration/configuration/#nerve_sd_config * Serversets in

importance 4@kakabishtclosedOriginal evidence ↗
pull request

Populate __meta_kubernetes_service_loadbalancer_ip from status.loadBalancer.ingress with fallback to spec.loadBalancerIP

Fixes #14398 #### Does this PR introduce a user-facing change? <!-- If no, just write "NONE" in the release-notes block below. Otherwise, please describe what should be mentioned in the CHANGELOG. Use the following prefixes: [FEATURE] [ENHANCEMENT] [PERF] [BUGFIX] [SECURITY] [CHANGE] Refer to the existing CHANGELOG for inspiration: https://github.com/prometh

importance 4@SamarthBaggaopenOriginal evidence ↗
pull request

[BugFix]promql: Reject offset/@ modifiers immediately before subquery range

### Problem The PromQL parser allowed invalid syntax like: ```promql metric offset 5m[2m:10s] # Should error, but was accepted metric @ 123[2m:10s] # Should error, but was accepted ``` While correctly rejecting the same pattern for regular range selectors: ```promql metric offset 5m[2m] # Correctly rejected ``` ### Solution Inline a presence check in both `s

importance 3@adity-a34openOriginal evidence ↗
pull request

model/textparse: implement OM2 scrape format

<!-- - Please give your PR a title in the form "area: short description". For example "tsdb: reduce disk usage by 95%" - Please sign CNCF's Developer Certificate of Origin and sign-off your commits by adding the -s / --signoff flag to `git commit`. See https://github.com/apps/dco for more information. - If the PR adds or changes a behaviour or fixes a bug of

importance 3@rbizosopenOriginal evidence ↗
pull request

promql/parser: fix error position for duration division by zero

Fixes #19206 **What this PR does / why we need it**: This PR fixes an issue where encountering a division or modulo by zero (or an out of range) inside a duration expression correctly evaluates to a dummy `NumberLiteral{Val: 0}` to raise an error, but was failing to capture the `PosRange` of the evaluated expression. Because it lacked a positional range, it

importance 3@oindrilakha12-uiopenOriginal evidence ↗
pull request

config: promote retry_on_http_429 to GA

Fixes #19263 This PR promotes `retry_on_http_429` in `remote_write` configuration to GA while keeping default = false (leaving the default behavior change for a separate discussion/PR per maintainer feedback). ### Details - Removed experimental note for `retry_on_http_429` in documentation docs/configuration/configuration.md. - Maintained RetryOnRateLimit de

importance 2@VedantMadaneopenOriginal evidence ↗
pull request

[PREVIEW] storage/remote: combine exemplars and samples in same PRW v2 request

Fixes #17857 This PR ensures that samples, exemplars, and histograms belonging to the same series are grouped into the same `TimeSeries` message within a single Prometheus Remote Write v2 request. Previously, these were sent as separate `TimeSeries` messages, which could result in them being split across different batches or flush boundaries. ```release-note

importance 2@bwplotkaclosedOriginal evidence ↗
pull request

storage: add OriginalLabelsHash() method to SeriesSet

Add a way to capture the original hash of labels that is "out of bound" of the labels model. This is because even with the best encoding schemes like base 91 storing a hash is wasteful. Also, comparing strings is much slower than comparing uint64s. #### Which issue(s) does the PR fix: NA #### Release notes for end users (**ALL** commits must be considered).

importance 1@GiedriusSopenOriginal evidence ↗
pull request

cmd/prometheus: OS agnostic tests

Allows TestDocumentation to run on windows. The two issues preventing this before were; 1. The test binary name differs between platforms. On non-Windows platforms it is _**prometheus.test**_, while on Windows it is _**prometheus.test.exe**_. Added a platform-specific check to handle the .exe suffix. 2. The loaded _expectedContext_ contained Windows-style li

importance 1@JustDaileclosedOriginal evidence ↗
pull request

cmd/prometheus: fix flaky TestRuntimeGOGCConfig

TL;DR; I saw TestRuntimeGOGCConfig fail in a CI. At first I suspected that it cannot be run in parallel due to environment use, but it's only setting sub process env, so that wasn't it. The issue is that it's not waiting long enough for the process, which can take it's time in CI. LLM also noticed another bug with developer settings leaking into the test. Bo

importance 1@krajoramaclosedOriginal evidence ↗
pull request

docker SD: add Image + ImageID to labels

<!-- - Please give your PR a title in the form "area: short description". For example "tsdb: reduce disk usage by 95%" - Please sign CNCF's Developer Certificate of Origin and sign-off your commits by adding the -s / --signoff flag to `git commit`. See https://github.com/apps/dco for more information. - If the PR adds or changes a behaviour or fixes a bug of

importance 1@NexxursopenOriginal evidence ↗
pull request

discovery/stackit: add support for postgres targets discovery

This PR extends the STACKIT service discovery (`stackit_sd_configs`) to support discovering STACKIT Postgres Flex instances alongside standard IaaS servers. This PR pretends to add more features started here https://github.com/prometheus/prometheus/pull/16401 . It introduces a new `role` configuration option (`server`, `postgres`, `all`, defaulting to `all`)

importance 1@DloriteopenOriginal evidence ↗
pull request

fix(deps): update kubernetes go dependencies to v0.36.3

This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [k8s.io/api](https://redirect.github.com/kubernetes/api) | `v0.35.3` → `v0.36.3` | ![age](https://developer.mend.io/api/mc/badges/age/go/k8s.io%2fapi/v0.36.3?sl

importance 0@renovate[bot]openOriginal evidence ↗
pull request

discovery/aws: paginate Lightsail GetInstances so all instances are discovered

#### Which issue(s) does the PR fix: There is no dedicated tracking issue for this bug. (The only open Lightsail issue, #17395, is a request to add unit tests, not this pagination bug.) `GetInstances` is a paginated Lightsail API, but the Lightsail client adapter called it exactly once and never followed the returned `NextPageToken`, so on any Lightsail acco

importance 0@anxkhnopenOriginal evidence ↗
pull request

tsdb: fix OOO chunk ID overflow via modular wrapping

#### Which issue(s) does the PR fix: Ref: https://github.com/grafana/mimir/issues/4541 #### Release notes for end users (**ALL** commits must be considered). *Reviewers should verify clarity and quality.* ```release-notes [BUGFIX] TSDB: Fix out-of-order chunk ID overflow by wrapping `firstOOOChunkID` modulo 2^23 instead of growing unbounded. ``` ## Summary F

importance 0@periklisOriginal evidence ↗
pull request

scrape: keep staleness tracking in sync when the series ref changes

Follow up on #19325. Staleness is tracked in `scrapeCache.seriesCur`/`seriesPrev`, both keyed by `storage.SeriesRef`. When the storage hands out a new reference for a series it already gave one for (e.g. it was garbage collected and had to be recreated), the scrape loop updates the cached reference and tracks the current scrape under the new one, while the p

importance 0@krajoramaopenOriginal evidence ↗
pull request

tsdb: make panic lock-release test OS agnostic

The old test forced a chunk write failure by removing the **_mmapped_** chunk directory which will not work on Windows, as directories with open files cannot be deleted. This change instead injects a rogue chunk segment with a higher sequence number, causing the next chunk write to fail through the same code path in an OS-independent way. This allows the tes

importance 0@JustDaileclosedOriginal evidence ↗
pull request

config: fix windows config tests

PR addresses two issues in within `config/config_test.go` and `config/config_windows_test.go` in two separate commits. 1. `DefaultOTLPConfig` was missing from the `ruleFilesExpectedConf` which caused `TestLoadConfigRuleFilesAbsolutePath` to fail on **Windows**. 2. `filepath.FromSlash` is used extensively to handle platform pathing differences, but was missin

importance 0@JustDaileclosedOriginal evidence ↗
pull request

fix(discovery/aws): guard nil Placement and ImageId in EC2 discovery

## Summary Fixes #19374 — EC2 service discovery panics when `DescribeInstances` returns instances with a nil `Placement` field (or nil `ImageId`). `discovery/aws/ec2.go` refresh() dereferences `inst.Placement.AvailabilityZone` and `inst.ImageId` with no nil guard. When either is nil, this panics and crashes the entire Prometheus process (there is no `recover

importance 0@waterWangopenOriginal evidence ↗
pull request

feat: add metric analyzer utilities for Prometheus metrics analysis

## What this PR does Adds MetricAnalyzer utility for analyzing Prometheus metrics. ## Changes - metric_analyzer.go: MetricAnalyzer with GetAverage, GetMax, GetMin, GetTrend, DetectAnomalies, GetPercentile, GetSummary - metric_analyzer_test.go: 10 test functions ## Usage analyzer := promql.NewMetricAnalyzer() analyzer.AddMetric(cpu, 50, time.Now(), nil) fmt.P

importance 0@AnkitavasudevopenOriginal evidence ↗
pull request

promql: safely derive info series evaluation time

<!-- - Please give your PR a title in the form "area: short description". For example "tsdb: reduce disk usage by 95%" - Please sign CNCF's Developer Certificate of Origin and sign-off your commits by adding the -s / --signoff flag to `git commit`. See https://github.com/apps/dco for more information. - If the PR adds or changes a behaviour or fixes a bug of

importance 0@aknuds1openkind/bugcomponent/promqlOriginal evidence ↗
pull request

discovery/aws: don't panic on ECS tasks with absent optional fields

ECS SD dereferences optional task fields without guarding them. Any task missing one panics the refresh goroutine and takes the process down instead of degrading a single target. `types.Task.Group`, `TaskArn`, `LastStatus`, `DesiredStatus`, `AvailabilityZone`, `ClusterArn`, `ClusterName` and `TaskDefinitionArn` are all optional — none carry the SDK's `This m

importance 0@r0h1tbclosedOriginal evidence ↗
pull request

scrape: use a dedicated HTTP client per unix socket target

Unix socket scrape support passes the socket path to a shared HTTP client's `DialContext` via the request context. But the transport keys idle connections on scheme and `host:port` only, so two targets sharing the same `__address__` with different `__scrape_unix_socket__` paths can reuse each other's pooled connections and scrape the wrong endpoint. The same

importance 0@roidelapluieopenOriginal evidence ↗
pull request

tsdb: document that OOO chunk IDs are no longer monotonically increasing

Follow-up to #19216: the HeadChunkID doc still promised a monotonically increasing per-series number, which no longer holds for out-of-order chunk IDs now that they wrap modulo 2^23. Also spell out the "much less than" relation in the oooHeadChunkID comment, where << is easy to misread as a bit-shift. <!-- - Please give your PR a title in the form "area: sho

importance 0@roidelapluieclosedOriginal evidence ↗
pull request

promql/parser: preserve parentheses around duration literals

#### Which issue(s) does the PR fix: Fixes #18770 #### Release notes for end users (**ALL** commits must be considered). *Reviewers should verify clarity and quality.* ```release-notes [BUGFIX] PromQL: Preserve parentheses around duration literals on Expr.String() round-trip. ``` `paren_duration_expr` only set `Wrapped` on `*DurationExpr`, so a parenthesised

importance 0@aamoghSopenOriginal evidence ↗
pull request

discovery/kubernetes: populate loadbalancer IP from status.ingress

#### Which issue(s) does the PR fix: Fixes #14398 #### Release notes for end users (**ALL** commits must be considered). *Reviewers should verify clarity and quality.* ```release-notes [BUGFIX] discovery/kubernetes: Populate `__meta_kubernetes_service_loadbalancer_ip` from `status.loadBalancer.ingress`, falling back to deprecated `spec.loadBalancerIP`. ``` K

importance 0@aamoghSopenOriginal evidence ↗
pull request

discovery/aws: don't panic on ElastiCache caches with absent optional fields

#### Which issue(s) does the PR fix: Follow-up to #19396 (same nil-deref class in AWS SD). #### Release notes for end users (**ALL** commits must be considered). *Reviewers should verify clarity and quality.* ```release-notes [BUGFIX] discovery/aws: Don't panic on ElastiCache caches or clusters with absent optional fields. ``` `addServerlessCacheTargets` / `

importance 0@aamoghSopenOriginal evidence ↗
pull request

promql/parser: reject offset expressions and @ start()/end() before range selectors

`matrix_selector` already rejects `foo offset 5m[5m]` and `foo @ 1234[5m]`, but it only looked at `OriginalOffset` and `Timestamp`. Duration-expression offsets and `@ start()` / `@ end()` live in `OriginalOffsetExpr` and `StartOrEnd`, so these still parsed: ```promql foo offset step()[5m] foo @ start()[5m] foo @ end()[5m] ``` The valid forms remain `foo[5m]

importance 0@aamoghSclosedOriginal evidence ↗
pull request

discovery/file: wait for a matching snapshot instead of failing on empty updates

#18259 stopped tests from truncating SD files to zero bytes, but `requireUpdate` still treated the first snapshot with the expected *number* of groups as the result. File SD can emit empty groups (`[{"targets":[]},{"targets":[]}]`) before the file contents are visible, so `TestInvalidFileUpdate` and `TestUpdateFileWithPartialWrites` still flake. Wait until t

importance 0@aamoghSopenOriginal evidence ↗
pull request

docs: note that Kubernetes pod __address__ may omit the port

The generic relabel docs say `__address__` is always `<host>:<port>`. Kubernetes pod SD sets `__address__` to the pod IP with no port when a container declares none, so a port can be added via relabeling. That is already described under the `pod` role; this makes the relabel section match. cc @brancz @rexagod @machine424 Fixes #11678 #### Which issue(s) does

importance 0@aamoghSclosedOriginal evidence ↗
pull request

tsdb: avoid retaining oversized record buffers

Bounds the reusable TSDB record-buffer pool at 1 MB so unusually large OOO/WBL batches can be collected after commit. Buffers at or below the limit remain reusable. Adds a regression test for the retention limit and a benchmark covering both sides of the threshold. In six benchmark runs, the 1 MB case stayed at about 29.5 ns/op with zero allocations. For the

importance 0@Boulea7openOriginal evidence ↗
pull request

Add more spans to tracing

I was trying to use tracing to debug some rules skipping evaluation and other random slowness but I find current set of spans not really giving me enough information. This adds a bunch more spans all over the place: - engine now shows a span per series selected from tsdb, so a query that's doing a ton of selects shows them all more clearly - rule evaluations

importance 0@prymitiveopenOriginal evidence ↗
pull request

Add a counter for created appenders

This helps us better understand how many appenders are created per second. There is already prometheus_tsdb_head_active_appenders but it's a gauge, so it only shows active ones. There's also prometheus_tsdb_head_samples_appended_total, but that counts samples. This new counter adds a different view - how many appenders are created per second, combined with p

importance 0@prymitiveopenOriginal evidence ↗
pull request

tsdb: release oversized head-chunk cache for single-chunk series

Range-query and compaction readers cache collected head chunks for sequential access. When a reader moved from a series with more than `headChunksBufMaxCap` head chunks to a different series with zero or one head chunk, the direct-lookup fast path returned before applying the capacity policy. The reader then retained the oversized backing array and its chunk

importance 0@aknuds1openkind/bugcomponent/tsdbOriginal evidence ↗
pull request

promql: preserve name-dropping through the info function

Previously, the info function did not properly implement delayed name removal, and did not propagate the `dropName` flag properly. This PR makes the info function behave more consistently with other functions like `label_replace` with respect to delayed name removal. #### Which issue(s) does the PR fix: N/A Problem found in https://github.com/prometheus/prom

importance 0@zenadoropenOriginal evidence ↗
pull request

Agent: replay WAL concurrently

<!-- - Please give your PR a title in the form "area: short description". For example "tsdb: reduce disk usage by 95%" - Please sign CNCF's Developer Certificate of Origin and sign-off your commits by adding the -s / --signoff flag to `git commit`. See https://github.com/apps/dco for more information. - If the PR adds or changes a behaviour or fixes a bug of

importance 0@prymitiveopenOriginal evidence ↗
pull request

Enforce GitHub Action security across all repositories in the Prometheus org

#### Which issue(s) does the PR fix: This PR adds [Zizmor](https://github.com/zizmorcore/zizmor) for GitHub Actions static analysis and also add the workflow to the repo_sync automation, to ensure the workflow is added to all repositories in the Prometheus and Prometheus-community organizations. #### Release notes for end users (**ALL** commits must be consi

importance 0@ArthurSensopenOriginal evidence ↗