Commit graph

12771 commits

Author SHA1 Message Date
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
SuperQ 2061eb0a6a
Add GitHub action to publish container README
Add a GitHub action to publish the README.md to Docker Hub and Quay.io.

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

Signed-off-by: SuperQ <superq@gmail.com>
2024-03-12 14:18:52 +01:00
Bryan Boreham 0bb5588386
labels: optimize String method (#13673)
Use a stack buffer to reduce memory allocations.

`Write(AppendQuote(AvailableBuffer` does not allocate or copy when
the buffer has sufficient space.

Also add a benchmark, with some refactoring.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-03-12 11:34:03 +00:00
Bryan Boreham d08f054950
[ENHANCEMENT] TSDB: Check CRC without allocating (#13742)
Use the existing utility function which does this.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-03-12 12:24:27 +01:00
Charles Korn 26262a1eb7
Remove unnecessary SetQueryLogger method on QueryEngine interface
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2024-03-12 22:01:01 +11:00
Julien ca57bd6352
Merge pull request #13743 from carrychair/main
fix function and struct names in comments
2024-03-12 11:50:25 +01:00
Julien 106d98b986
Merge pull request #13751 from testwill/http_statuscode
chore: use constant instead of numeric literal
2024-03-12 11:41:34 +01:00
guoguangwu 1cccdbaedb chore: use constant instead of numeric literal
Signed-off-by: guoguangwu <guoguangwug@gmail.com>
2024-03-12 17:19:50 +08:00
Bryan Boreham 8d53e7ba90
Cut v2.51.0-rc.0 (#13729)
* Cherry-pick [BUGFIX] Azure SD: Fix 'error: parameter virtualMachineScaleSetName cannot be empty' (#13702)

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-03-11 13:35:44 +00:00
Julien b4d4dcd9f6
Merge pull request #13739 from bboreham/no-race-prev-go
CI: don't run race-detector on tests with previous Go version
2024-03-11 13:55:19 +01:00
carrychair 856f6e49c8 fix function and struct name
Signed-off-by: carrychair <linghuchong404@gmail.com>
2024-03-09 17:53:17 +08:00