Commit graph

12781 commits

Author SHA1 Message Date
Björn Rabenstein a9a4fbafb0
Merge pull request #13795 from prometheus/beorn7/maintainers
Tweak MAINTAINERS.md
2024-03-20 13:19:10 +01:00
Arve Knudsen af694dc295 Merge TestDB_BeyondTimeRetention into TestTimeRetention
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2024-03-20 09:07:16 +01:00
dongjiang 11fc7b1d83
chores: bump to golangci-lint v1.56.2 (#13753)
bump to golangci-lint to v1.56.2

---------

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
2024-03-19 19:24:37 +01:00
Björn Rabenstein 7ba218fbd0
Merge pull request #13791 from bboreham/merge-2.51.0
Merge 2.51.0 into main
2024-03-19 19:15:25 +01:00
Björn Rabenstein 70c7be647b
Merge pull request #13781 from gouthamve/add-arve-as-codeowner-for-otlp
Add Arve as OTLP ingest maintainer
2024-03-19 18:41:02 +01:00
Erlan Zholdubai uulu 742196b6c4
add context cancellation check at get series result iteration (#13766)
* add context cancellation check at get series iteration
* add warnings and closer on error
* add test

---------

Signed-off-by: Erlan Zholdubai uulu <erlanz@amazon.com>
2024-03-19 18:37:43 +01:00
Björn Rabenstein 16164226e5
Merge pull request #13782 from colega/improve-stringlabels-compare
Improve `Labels.Compare()` performance with `stringlabels`
2024-03-19 18:29:32 +01:00
beorn7 e14af52e48 Tweak MAINTAINERS.md
After #13771, the list for specific parts of the codebase looks like
it is part of the "general maintainers" list. This commit makes things
clearer.

Signed-off-by: beorn7 <beorn@grafana.com>
2024-03-19 18:23:55 +01:00
Ben Kochie ac257aa071
Merge pull request #13789 from prometheus/superq/common_repo
Fixup make target in container description
2024-03-19 12:00:17 +01:00
Bryan Boreham 0630e49c0d
Merge branch 'main' into merge-2.51.0
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-03-19 11:56:14 +01:00
Bryan Boreham c05c15512a
Cut v2.51.0 (#13787)
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-03-19 10:49:40 +00:00
SuperQ 45c2b11187
Fixup make target in container description
Use `docker-repo-name` as the make target so that a repo Makfile can
override the common target implementation.

Signed-off-by: SuperQ <superq@gmail.com>
2024-03-19 11:29:39 +01:00
Arve Knudsen 9c7a734063 tsdb.BeyondTimeRetention: Fix comment and test at retention duration
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2024-03-19 09:10:21 +01:00
Julien d0ecf9b8fc
Merge pull request #13783 from prometheus/superq/sync_fixup
Add container_description.yml to force sync list
2024-03-18 11:58:15 +01:00
Oleg Zaytsev d12e785075
Improve readability
As suggested by @bboreham

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
2024-03-18 11:16:09 +01:00
SuperQ 161354e861
Add container_description.yml to force sync list
Since we skip repos that don't have a Dockerfile, we can force sync the
`.github/workflows/container_description.yml` config.

Signed-off-by: SuperQ <superq@gmail.com>
2024-03-18 08:20:42 +01:00
Ben Kochie 2c267389f6
Merge pull request #13768 from charleskorn/readme-publish-workflow
Signed-off-by: Ben Kochie <superq@gmail.com>
2024-03-18 08:17:40 +01:00
Charles Korn b641715363
Support copying workflow as-is to other Prometheus repositories.
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2024-03-18 10:33:56 +11:00
Oleg Zaytsev 9699598952
Improve Labels.Compare performance w/stringlabels
I was bored on a train and I spent some amount of time trying to scratch
some nanoseconds off the Labels.Compare when running with stringlabels.

I would be ashamed to admit the real amount of time I spent on it.

The worst thing is, I can't really explain why this is performing so
much better, and someone should re-run the benchmarks on their machine
to confirm that it's not something related to general relativity because
the train is moving. I also added some extra real-life benchmark cases
with longer labelsets (these aren't the longest we have in production,
but kubernetes labelsets are fairly common in Prometheus so I thought it
would be nice to have them).

My benchmarks show this diff:

goos: darwin
goarch: arm64
pkg: github.com/prometheus/prometheus/model/labels
                                       │     old     │                 new                 │
                                       │   sec/op    │   sec/op     vs base                │
Labels_Compare/equal                     5.898n ± 0%   5.875n ± 1%   -0.40% (p=0.037 n=10)
Labels_Compare/not_equal                 11.78n ± 2%   11.01n ± 1%   -6.54% (p=0.000 n=10)
Labels_Compare/different_sizes           4.959n ± 1%   4.906n ± 2%   -1.05% (p=0.050 n=10)
Labels_Compare/lots                      21.32n ± 0%   17.54n ± 5%  -17.75% (p=0.000 n=10)
Labels_Compare/real_long_equal           15.06n ± 1%   14.92n ± 0%   -0.93% (p=0.000 n=10)
Labels_Compare/real_long_different_end   25.20n ± 0%   24.43n ± 0%   -3.04% (p=0.000 n=10)
geomean                                  11.86n        11.25n        -5.16%

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
2024-03-17 17:08:06 +01:00
Goutham ed9deb1f90
Add Arve as OTLP ingest maintainer
Also remove myself :)

Arve has been doing a lot of maintainance on the upstream component
and also reviewing PRs on Prometheus for this otlp ingest. I continue
to have less and less time for this, so I'd like make Arve a maintainer
for OTLP Ingestion.

Signed-off-by: Goutham <gouthamve@gmail.com>
2024-03-17 12:27:20 +01:00
Bryan Boreham a0e93e403e
Merge pull request #13764 from bboreham/remove-deprecated-wal
[Cleanup] TSDB: Remove old deprecated WAL implementation

Deprecated since 2018.
2024-03-17 09:34:57 +00:00
Jan-Otto Kröpke 302e151de8
{discovery,remote_write}/azure: Support default SDK authentication (#13099)
* discovery/azure: Offer default SDK authentication

Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
2024-03-16 11:06:57 +00:00
Bryan Boreham 5ed21c0d76
Merge pull request #12933 from prymitive/duplicated_samples
When Prometheus scrapes a target and it sees the same time series repeated multiple times it currently silently ignores that. This change adds a test for that and fixes the scrape loop so that:

* Only first sample for each unique time series is appended
* Duplicated samples increment the prometheus_target_scrapes_sample_duplicate_timestamp_total metric
This allows one to identify such scrape jobs and targets.

Also fix some tests and benchmark.
2024-03-16 09:18:46 +00:00
Darshan Chaudhary b7047f7fcb
Fix retention boundary so 2h retention deletes blocks right at the 2h boundary (#9633)
Signed-off-by: darshanime <deathbullet@gmail.com>
2024-03-15 19:35:16 +01:00
Bryan Boreham c8c1ab36dc
MAINTAINERS: Add Bryan Boreham, Ayoub Mrini (#13771)
Also simplify structure. Ordering of 'general' maintainers is alphabetical by 2nd name.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-03-15 16:47:14 +00:00
Julien d1abc3f255
Merge pull request #13777 from roidelapluie/remoteread2
Chunked remote read: close the querier earlier
2024-03-15 14:42:30 +01:00
Julien Pivotto 53091126c2 Chunked remote read: close the querier earlier
I have seen prometheis instances misebehaving because of broken chinked remote
read requests.

In order to avoid OOM's when this happens, I propose to close the
queries used by the streamed remote read requests earlier.

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2024-03-15 14:03:16 +01:00
Arve Knudsen cef1025ea8 tsdb/wlog.Checkpoint: Fix counting of histogram samples
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2024-03-15 10:23:59 +01:00
Bryan Boreham d45b5deb75 TSDB: move function only used in tests
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-03-15 08:54:47 +00:00
Bryan Boreham 3274cac0d3 TSDB: remove unused function
Was only used in old WAL implementation.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-03-15 08:51:57 +00:00
Goutham Veeramachaneni 15809223c7
Merge pull request #13759 from jcajka/main
otlptranslator: fix up import paths
2024-03-15 09:40:26 +01:00
Charles Korn dca47ce2c9
Only run on prometheus/prometheus repo
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2024-03-15 11:44:35 +11:00
Björn Rabenstein 0f70fc7687
Merge pull request #13772 from machine424/signals
adjust signal termination warning log
2024-03-14 19:34:37 +01:00
machine424 3eed6c760a
adjust signal termination warning log
Signed-off-by: machine424 <ayoubmrini424@gmail.com>
2024-03-14 18:45:45 +01:00
Ben Kochie 537ce87d6b
Merge pull request #13770 from prometheus/superq/sync_description
Add container_description.yml to repo sync
2024-03-14 12:11:42 +01:00
Arve Knudsen 1de49d5b69
Remove unused function tsdb/chunks.PopulatedChunk (#13763)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2024-03-14 11:15:17 +01:00
SuperQ a0fbc75f34
Add container_description.yml to repo sync
Add the container_description.yml workflow to the repo file sync script.
* Skip sync if there is no Dockerfile.
* Fixup minor typo in container_description.yml.

Signed-off-by: SuperQ <superq@gmail.com>
2024-03-14 09:20:40 +01:00
Ben Kochie f252d8a9d1
Merge pull request #13761 from prometheus/superq/fixup_workflow
Fix container_description workflow
2024-03-14 08:42:15 +01:00
Bryan Boreham 87edf1f960 [Cleanup] TSDB: Remove old deprecated WAL implementation
Deprecated since 2018.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-03-13 15:57:23 +00:00
SuperQ 46401b988e
Normalize and fixup step names.
Signed-off-by: SuperQ <superq@gmail.com>
2024-03-13 15:56:37 +01:00
Jakub Čajka 505fd638be
otlptranslator: fix up import paths
Signed-off-by: Jakub Čajka <jcajka@redhat.com>
2024-03-13 15:56:14 +01:00
Bartlomiej Plotka 312e3fd728
Merge pull request #13713 from charleskorn/query-engine-interface
rules: allow using alternative PromQL engines for rule evaluation by callers using Prometheus as a lib.
2024-03-13 14:45:42 +01:00
SuperQ 3bff79451d
Fix container_description workflow
Fix yaml indentation. 🤦

Signed-off-by: SuperQ <superq@gmail.com>
2024-03-13 14:28:05 +01:00
Björn Rabenstein f1e9ec29f8
Merge pull request #13752 from prometheus/superq/publish_docker_readme
Add GitHub action to publish container README
2024-03-13 12:57:22 +01:00
dependabot[bot] cd3e0078f0
build(deps): bump github.com/prometheus/common (#13728)
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.49.0 to 0.50.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.49.0...v0.50.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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-12 20:07:03 +01:00
Björn Rabenstein af3618fd35
Merge pull request #13667 from prometheus/beorn7/promql
Improve TestQueryStatistics and fix bugs exposed by it
2024-03-12 16:17:11 +01:00
Bryan Boreham ab9c544ec7 Azure Discovery tests: Add test for VMToLabelSet
Test fails due to bug in code on main.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-03-12 15:04:09 +00:00
Bryan Boreham 5f2c0c5283 Azure Discovery tests: mock the azure client interface
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-03-12 15:04:09 +00:00
Bryan Boreham 4e24e5b1d1 Refactor: Azure Discovery: introduce an interface for the client
So we can mock it.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-03-12 15:04:09 +00:00
Bryan Boreham b8d428b753 Refactor: Azure Discovery: extract function to generate labelSet
This should make it easier to test.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-03-12 15:04:04 +00:00