Commit graph

11831 commits

Author SHA1 Message Date
Linas Medziunas 1cd6c1cde5 ValidateHistogram: strict Count check in absence of NaNs
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
2023-11-03 16:17:24 +02:00
Björn Rabenstein fae4561369
Merge pull request #12954 from linasm/linasm/optimize-floatBucketIterator2
Histogram performance: optimize floatBucketIterator
2023-11-02 23:59:32 +01:00
Bryan Boreham 0b02cc5277
Merge pull request #13078 from prometheus/dependabot/go_modules/github.com/linode/linodego-1.24.0
build(deps): bump github.com/linode/linodego from 1.23.0 to 1.24.0
2023-11-02 20:08:12 +00:00
Björn Rabenstein 79f4e45d64
Merge pull request #13089 from prometheus/beorn7/release
Merge release-2.48 back into main
2023-11-02 20:43:18 +01:00
beorn7 5dca994f64 Merge branch 'release-2.48' into beorn7/release 2023-11-02 19:58:33 +01:00
Bryan Boreham 6e2586b1c7
Merge pull request #13083 from LeviHarrison/release-2.48.0-rc.2
Release 2.48.0-rc.2
2023-11-02 18:21:02 +00:00
Julien Pivotto 8c560c9632
Merge pull request #13069 from prometheus/dependabot/go_modules/documentation/examples/remote_storage/github.com/prometheus/common-0.45.0
build(deps): bump github.com/prometheus/common from 0.44.0 to 0.45.0 in /documentation/examples/remote_storage
2023-11-02 14:10:06 -04:00
dependabot[bot] ea27db7389
build(deps): bump github.com/linode/linodego from 1.23.0 to 1.24.0
Bumps [github.com/linode/linodego](https://github.com/linode/linodego) from 1.23.0 to 1.24.0.
- [Release notes](https://github.com/linode/linodego/releases)
- [Commits](https://github.com/linode/linodego/compare/v1.23.0...v1.24.0)

---
updated-dependencies:
- dependency-name: github.com/linode/linodego
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-02 18:04:56 +00:00
Julien Pivotto 540a6729c0
Merge pull request #13077 from prometheus/dependabot/go_modules/go-opentelemetry-io-a16b2b5997
build(deps): bump the go-opentelemetry-io group with 2 updates
2023-11-02 14:03:52 -04:00
Julien Pivotto caec414964
Merge pull request #13085 from dimitarvdimitrov/dimitar/expose-findQueryMinMaxTime
Export `promql.FindMinMaxTime`
2023-11-02 14:02:17 -04:00
Bryan Boreham ae5dd1ffcb
Merge pull request #13062 from zenador/min-time-hist-chunks
Add min time to histogram chunks
2023-11-02 14:13:51 +00:00
Jeanette Tan 52eb303031 Refactor assigning MinTime in histogram chunks
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-11-02 21:23:05 +08:00
Dimitar Dimitrov 9e3df532d8
Export promql.Engine.FindMinMaxTime
This function is useful to analyze promQL queries. We want to use this in Mimir to record the time range which the query touches.

I also chose to remove the `Engine` receiver because it was unnecessary, and it makes it easier to use, but happy to refactor that if you disagree.

The function is untested on its own. If you prefer to have unit tests now that its exported, I can look into adding some.

Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
2023-11-02 13:17:35 +01:00
Jeanette Tan 3ccaaa40ba Fix according to code review
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-11-02 13:37:07 +08:00
György Krajcsovits 4296ecbd14 tsdb/compact_test.go: test mixed typed series with PopulateBlock
Add testcase and update test so that it can test native histograms as well.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2023-11-02 13:33:42 +08:00
Jeanette Tan 27abf09e7f Fix missing MinTime in histogram chunks
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-11-02 13:33:39 +08:00
Jeanette Tan 2f7060bd5a Expand TestPopulateWithTombSeriesIterators to test earlier deletion intervals for histogram chunks as well as time-overlapping chunks
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-11-02 13:33:35 +08:00
Jeanette Tan 7a4a1127b7 Expand TestPopulateWithTombSeriesIterators to test min max times of chunks, including mixed chunks
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-11-02 13:33:33 +08:00
Jeanette Tan 04aabdd7cc Refactor TestPopulateWithDelSeriesIterator unit tests to reuse more code
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-11-02 13:33:30 +08:00
Jeanette Tan 46be85f2dc Make TestPopulateWithDelSeriesIterator tests cover histogram types and check MinTime
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-11-02 13:33:26 +08:00
Levi Harrison 8b87f3bbf1 Release 2.48.0-rc.2
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2023-11-01 21:19:24 -04:00
Levi Harrison 287511d92f
Merge pull request #13066 from prometheus/superq/pick_timestamp
scrape: Added trackTimestampsStaleness configuration option
2023-11-01 21:00:43 -04:00
dependabot[bot] 1103569841
build(deps): bump the go-opentelemetry-io group with 2 updates
Bumps the go-opentelemetry-io group with 2 updates: [go.opentelemetry.io/collector/pdata](https://github.com/open-telemetry/opentelemetry-collector) and [go.opentelemetry.io/collector/semconv](https://github.com/open-telemetry/opentelemetry-collector).


Updates `go.opentelemetry.io/collector/pdata` from 1.0.0-rcv0016 to 1.0.0-rcv0017
- [Release notes](https://github.com/open-telemetry/opentelemetry-collector/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-collector/blob/main/CHANGELOG-API.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-collector/compare/pdata/v1.0.0-rcv0016...pdata/v1.0.0-rcv0017)

Updates `go.opentelemetry.io/collector/semconv` from 0.87.0 to 0.88.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-collector/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-collector/blob/main/CHANGELOG-API.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-collector/compare/v0.87.0...v0.88.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/collector/pdata
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go-opentelemetry-io
- dependency-name: go.opentelemetry.io/collector/semconv
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-opentelemetry-io
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-01 23:44:15 +00:00
dependabot[bot] f9d060c65f
build(deps): bump github.com/prometheus/common
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.44.0 to 0.45.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.44.0...v0.45.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-01 23:30:13 +00:00
Matthieu MOREL 7eaefcf379
ci(lint): enable errorlint on scrape (#12923)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Signed-off-by: Jesus Vazquez <jesusvazquez@users.noreply.github.com>
Co-authored-by: Jesus Vazquez <jesusvazquez@users.noreply.github.com>
2023-11-01 20:06:46 +01:00
George Krajcsovits e399395b01
Native histograms vs labels (#13005)
* Document le and quantile label transition due to native histograms

Fixes: #12984

For full explanation see the related issue. The le and quantile labels
are formatted as float with trailing .0 for whole number values when
native histograms is enabled, e.g. 10.0. This changes the resulting series
in Prometheus if previously we scraped the whole number itself, e.g. 10
over the text format.

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

---------

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: George Krajcsovits <krajorama@users.noreply.github.com>
2023-11-01 18:30:34 +01:00
Björn Rabenstein a43669e611
Merge pull request #12928 from alexandear/ci-enable-godot
ci(lint): enable godot; append dot at the end of comments
2023-11-01 17:15:41 +01:00
Julien Pivotto fed6f81377
scrape: Added trackTimestampsStaleness configuration option
Add the ability to track staleness when an explicit timestamp is set.
Useful for cAdvisor.

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-11-01 15:34:19 +01:00
Matthias Loibl 6518d6fdec
Merge pull request #13036 from prometheus/codeowners-mixins
Assign new code owners for prometheus-mixin
2023-11-01 11:47:58 +01:00
Julien Pivotto 79bbfe601f
Merge pull request #13060 from roidelapluie/trackTimestampsStaleness
scrape: Added trackTimestampsStaleness configuration option
2023-10-31 19:34:31 -04:00
Charles Korn 5184368db6
Fix issue where chainSampleIterator can obscure errors (#13006)
* Fix issue where `chainSampleIterator` can obscure errors

Signed-off-by: Charles Korn <charles.korn@grafana.com>

* Address PR feedback.

Signed-off-by: Charles Korn <charles.korn@grafana.com>

---------

Signed-off-by: Charles Korn <charles.korn@grafana.com>
2023-10-31 22:35:17 +00:00
Julien Pivotto 84aadfc45b scrape: Added trackTimestampsStaleness configuration option
Add the ability to track staleness when an explicit timestamp is set.
Useful for cAdvisor.

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-10-31 16:58:42 -04:00
Julien Pivotto 12dd0cb53b
Merge pull request #13034 from charleskorn/rule-evaluation-logs
Include trace ID in log lines emitted during rule evaluation
2023-10-31 15:53:17 -04:00
Julien Pivotto f568221610
Merge pull request #13057 from prometheus/release-2.48
Merge release-2.48 back into main
2023-10-31 15:24:39 -04:00
Oleksandr Redko fa90ca46e5 ci(lint): enable godot; append dot at the end of comments
Signed-off-by: Oleksandr Redko <Oleksandr_Redko@epam.com>
2023-10-31 19:53:38 +02:00
Björn Rabenstein 96179fe06a
Merge pull request #13055 from prometheus/beorn7/storage
storage: Fix mixed samples handling in sampleRing
2023-10-31 17:10:24 +01:00
beorn7 4696b46dd5 storage: Fix mixed samples handling in sampleRing
Two issues are fixed here, that lead to the same problem:

1. If `newSampleRing` is called with an unknown ValueType including
   ValueNone, we have initialized the interface buffer (`iBuf`).
   However, we would still use a specialized buffer for the first
   sample, opportunistically assuming that we might still not
   encounter mixed samples and we should go down the more efficient
   road.

2. If the `sampleRing` is `reset`, we leave all buffers alone,
   including `iBuf`, which is generally fine, but not for `iBuf`, see
   below.

In both cases, `iBuf` already contains values, but we will fill one of
the specialized buffers first. Once we then actually encounter mixed
samples, the content of the specialized buffer is copied into `iBuf`
using `append`. That's by itself the right idea because `iBuf` might
be `nil`, and even if not, it might or might not have the right
capacity. However, this approach assumes that `iBuf` is empty, or more
precisely has a length of zero.

This commit makes sure that `iBuf` does not get needlessly initialized
in `newSampleRing` and that it is emptied upon `reset`.

A test case is added to demonstrate both issues above.

Signed-off-by: beorn7 <beorn@grafana.com>
2023-10-31 16:18:09 +01:00
dependabot[bot] 16c8d445fd
build(deps): bump github/codeql-action from 1.0.26 to 2.21.9 (#12915)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1.0.26 to 2.21.9.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v1.0.26...ddccb873888234080b77e9bc2d4764d5ccaaccf9)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-31 12:49:04 +01:00
dependabot[bot] 99a9602a87
build(deps): bump actions/checkout from 3.0.0 to 4.1.0 (#12917)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.0.0 to 4.1.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...8ade135a41bc03ea155e62e844d188df1ea18608)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-31 12:48:17 +01:00
Matthieu MOREL 68e6b4dd34
ci(lint): enable errorlint on discovery (#12918)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-10-31 12:46:55 +01:00
Oleksandr Redko 8e5f0387a2
ci(lint): enable nolintlint and remove redundant comments (#12926)
Signed-off-by: Oleksandr Redko <Oleksandr_Redko@epam.com>
2023-10-31 12:35:13 +01:00
Matthieu MOREL 1ec6e407d0
ci(lint): enable errorlint on storage (#12935)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-10-31 12:15:30 +01:00
Matthias Loibl de836737ad
Assign new code owners for prometheus-mixin
Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>
2023-10-31 12:05:31 +01:00
Charles Korn 9a8dbf06bc
Address PR feedback
Co-authored-by: Julien Pivotto <roidelapluie@o11y.eu>
Signed-off-by: Charles Korn <charleskorn@users.noreply.github.com>
2023-10-31 09:56:05 +11:00
Bryan Boreham 6722a5bb86
Merge pull request #13043 from bboreham/remove-h
PromQL: reduce garbage in range-query evaluation
2023-10-30 16:40:20 +00:00
Julien Pivotto 0c1e447d68
Exclude alerts: improve documentation (#13046)
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-10-30 15:08:11 +00:00
Julien Pivotto 156a23d06d
Merge pull request #12999 from rajagopalanand/filter-alerts
Adding a query parameter to filter out active alerts
2023-10-30 13:10:24 +01:00
Bryan Boreham 49c5e7afe1 PromQL: reduce garbage in range-query evaluation
The temporary variable was allocated on the heap, and it is unnecessary.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-10-29 19:45:06 +00:00
Björn Rabenstein e9b94515ca
Merge pull request #13039 from zenador/make-anno-err-visible
Make it possible to unwrap annotation error
2023-10-27 23:31:04 +02:00
Levi Harrison 8db8ad1bae
bump version (#13032)
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2023-10-27 23:25:56 +02:00