Commit graph

11572 commits

Author SHA1 Message Date
Arianna Vespri ce3a8da5ad Add limits to global config (#12126)
* Add limits to global config

Signed-off-by: Arianna Vespri <arianna.vespri@yahoo.it>

* Move changes into Validate func

Signed-off-by: Arianna Vespri <arianna.vespri@yahoo.it>

* Make comments consistent wrt 0 meaning no limit

Signed-off-by: Arianna Vespri <arianna.vespri@yahoo.it>

* Document global limits

Signed-off-by: Arianna Vespri <arianna.vespri@yahoo.it>

---------

Signed-off-by: Arianna Vespri <arianna.vespri@yahoo.it>
2023-07-04 13:38:31 +00:00
SuperQ a40f397d00 Update exporter-toolkit
Adds web config option `client_allowed_sans`. This enables Prometheus to
limit the Subject Alternate Name (SAN) allowed to connect.

Signed-off-by: SuperQ <superq@gmail.com>
2023-07-04 13:38:31 +00:00
Bryan Boreham cb952d3aa1 Alerts: more efficient relabel on Send
Re-use `labels.Builder` and use `relabel.ProcessBuilder` to skip a
conversion step.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-07-04 13:38:31 +00:00
Bryan Boreham 8395cdcdb0 Alerts: more efficient generation of target labels
Use a label builder instead of a slice when creating labels for the
target alertmanagers. This can be passed directly to
`relabel.ProcessBuilder`, skipping a copy.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-07-04 13:38:31 +00:00
Matthieu MOREL 98dfe2364d yamllint: don’t check keys and add file extension to config file
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-07-04 13:38:31 +00:00
cui fliter a6454ccbca fix problematic link (#12405)
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-07-04 13:38:31 +00:00
Julien Pivotto 06836bcd57 Update OpenTelemetry dependencies
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-07-04 13:38:31 +00:00
Julien Pivotto 90344ebe77 Mark 2.45 as LTS
As the 2.37 LTS is going EOL in July 2023, let's mark 2.45 as LTS. I
have synced with Jesus about this. He will bootstrap the release and
after a few week I will do the maintenance for the lifetime of the LTS.

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-07-04 13:38:31 +00:00
Patryk Prus ad5d680a15 Render background in images to play nicely with dark mode
Signed-off-by: Patryk Prus <p@trykpr.us>
2023-07-04 13:38:31 +00:00
znley 6f6af5a59b fix: RLIM_INFINITY type is uint64 on loong64
Signed-off-by: znley <shanjiantao@loongson.cn>
2023-07-04 13:38:31 +00:00
Matthieu MOREL 584966f1c4 ci(lint): enable predeclared linter
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-07-04 13:38:31 +00:00
marcoderama 64b2a379db Update functions.md
Fix small typo

Signed-off-by: marcoderama <marcoderamagit@gmail.com>
2023-07-04 13:38:31 +00:00
Julius Volz 199cfc1324 Fix wording from "jitterSeed" -> "offsetSeed" for server-wide scrape offsets
In digital communication, "jitter" usually refers to how much a signal deviates
from true periodicity, see https://en.wikipedia.org/wiki/Jitter. The way we are
using the "jitterSeed" in Prometheus does not affect the true periodicity at
all, but just introduces a constant phase shift (or offset) within the period.
So it would be more correct and less confusing to call the "jitterSeed" an
"offsetSeed" instead.

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2023-07-04 13:38:31 +00:00
Justin Lei d0fea47a9c Remove samplesPerChunk from memSeries (#12390)
Signed-off-by: Justin Lei <justin.lei@grafana.com>
2023-07-04 13:38:31 +00:00
Bryan Boreham 31164a7373
Merge pull request #509 from grafana/remove-dup-github
Remove duplicated .github directory
2023-07-04 12:08:08 +01:00
Bryan Boreham 3a61decb3d
Merge pull request #510 from grafana/cherrypick-stringlabels
Cherrypick stringlabels optimisations
2023-07-04 11:38:15 +01:00
Bryan Boreham 1e16c60bae labels: improve Get method for stringlabels build (#12485)
Inline one call to `decodeString`, and skip decoding the value string
until we find a match for the name.
Do a quick check on the first character in each string,
and exit early if we've gone past - labels are sorted in order.

Also improve tests and benchmark:
* labels: test Get with varying lengths - it's not typical for Prometheus labels to all be the same length.
* extend benchmark with label not found

---------

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-07-03 20:34:35 +01:00
Bryan Boreham 19c9db3c07 labels: faster Compare function when using -tags stringlabels (#12451)
Instead of unpacking every individual string, we skip to the point
where there is a difference, going 8 bytes at a time where possible.

Add benchmark for Compare; extend tests too.

---------

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
Co-authored-by: Oleg Zaytsev <mail@olegzaytsev.com>
2023-07-03 20:34:29 +01:00
Bryan Boreham 8a0c58dda5 Remove duplicated .github directory
Seems to have been an accident 8 months ago.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-06-30 17:15:44 +00:00
Charles Korn 5c270e23ea
Merge pull request #506 from grafana/charleskorn/streaming-timestamp
Don't recreate iterator for each series on each timestep when evaluating a query with `timestamp()`
2023-06-29 14:17:23 +10:00
Charles Korn ad25a5c65f
Add test to confirm timestamp() behaves correctly when evaluating a range query. 2023-06-29 13:34:26 +10:00
Charles Korn 30507ef298
Create per-series iterators only once per selector, rather than recreating it for each time step.
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2023-06-28 15:41:19 +10:00
Charles Korn ab5d9e3be1
Don't create a new iterator for every time step.
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2023-06-28 15:41:19 +10:00
Charles Korn f5bbe2ef9e
Simplify loop
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2023-06-28 15:41:17 +10:00
Charles Korn 90ac889e1f
Expand series set just once
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2023-06-28 15:41:15 +10:00
Charles Korn 17b1486964
Inline method
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2023-06-28 15:41:14 +10:00
Charles Korn 28097c9476
Extract timestamp special case to its own method.
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2023-06-28 15:41:12 +10:00
Charles Korn 8bdcad30a4
Add benchmark for query using timestamp()
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2023-06-28 15:41:10 +10:00
zenador 8d6690e86a
Merge pull request #505 from grafana/zenador/sync-upstream-22-may-2023
Sync upstream 24 may 2023
2023-05-24 19:58:41 +08:00
Jeanette Tan dd172440e5 Merge remote-tracking branch 'mine/fix-default-samples-per-chunk' into zenador/sync-upstream-22-may-2023 2023-05-24 19:32:04 +08:00
Jeanette Tan 02e113d03f Use DefaultSamplesPerChunk in tsdb
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-05-24 16:44:53 +08:00
Jeanette Tan 9f1baaaa38 Fix errors from merge 2023-05-23 01:10:09 +08:00
Jeanette Tan 1be0816b46 Merge remote-tracking branch 'upstream/main' 2023-05-23 00:20:36 +08:00
Baskar Shanmugam 905a0bd63a
Added 'limit' query parameter support to /api/v1/status/tsdb endpoint (#12336)
* Added 'topN' query parameter support to /api/v1/status/tsdb endpoint

Signed-off-by: Baskar Shanmugam <baskar.shanmugam.career@gmail.com>

* Updated query parameter for tsdb status to 'limit'

Signed-off-by: Baskar Shanmugam <baskar.shanmugam.career@gmail.com>

* Corrected Stats() parameter name from topN to limit

Signed-off-by: Baskar Shanmugam <baskar.shanmugam.career@gmail.com>

* Fixed p.Stats CI failure

Signed-off-by: Baskar Shanmugam <baskar.shanmugam.career@gmail.com>

---------

Signed-off-by: Baskar Shanmugam <baskar.shanmugam.career@gmail.com>
2023-05-22 14:37:07 +02:00
Alan Protasio 8c5d4b4add
Opmize MatchNotEqual (#12377)
Signed-off-by: Alan Protasio <alanprot@gmail.com>
2023-05-21 10:41:30 +02:00
George Krajcsovits 92d6980360
Fix populateWithDelChunkSeriesIterator and gauge histograms (#12330)
Use AppendableGauge to detect corrupt chunk with gauge histograms.
Detect if first sample is a gauge but the chunk is not set up to contain
gauge histograms.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: George Krajcsovits <krajorama@users.noreply.github.com>
2023-05-19 10:24:06 +02:00
Baskar Shanmugam f731a90a7f
Fix LabelValueStats in posting stats (#12342)
Problem:
LabelValueStats - This will provide a list of the label names and memory used in bytes.
It is calculated by adding the length of all values for a given label name.
But internally Prometheus stores the name and the value independently for each series.

Solution:
MemPostings struct maintains the values to seriesRef map which is used
to get the number of series which contains the label values.
Using that LabelValueStats is calculated as: seriesCnt * len(value
name)

Signed-off-by: Baskar Shanmugam <baskar.shanmugam.career@gmail.com>
2023-05-19 09:36:30 +02:00
Julien Pivotto e53478a08d
Merge pull request #12372 from roidelapluie/consul_path_prefix
Add support for consul path_prefix
2023-05-18 20:16:55 +02:00
Xiaochao Dong 80b7f73d26
Copy tombstone intervals to avoid race (#12245)
Signed-off-by: Xiaochao Dong (@damnever) <the.xcdong@gmail.com>
2023-05-17 15:15:12 +02:00
Julien Pivotto c66fdc19f9
Merge pull request #12373 from prometheus/dependabot/go_modules/github.com/hetznercloud/hcloud-go-1.45.1
build(deps): bump github.com/hetznercloud/hcloud-go from 1.43.0 to 1.45.1
2023-05-17 12:11:24 +02:00
Julien Pivotto 9613d66805
Merge pull request #12369 from roidelapluie/reb243
Merge release 2.43
2023-05-17 10:36:14 +02:00
Julien Pivotto 2657e3a6ac
Merge pull request #12307 from prometheus/dependabot/github_actions/bufbuild/buf-setup-action-1.17.0
build(deps): bump bufbuild/buf-setup-action from 1.16.0 to 1.17.0
2023-05-17 00:49:41 +02:00
dependabot[bot] f26760cf32
build(deps): bump github.com/hetznercloud/hcloud-go
Bumps [github.com/hetznercloud/hcloud-go](https://github.com/hetznercloud/hcloud-go) from 1.43.0 to 1.45.1.
- [Release notes](https://github.com/hetznercloud/hcloud-go/releases)
- [Changelog](https://github.com/hetznercloud/hcloud-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hetznercloud/hcloud-go/compare/v1.43.0...v1.45.1)

---
updated-dependencies:
- dependency-name: github.com/hetznercloud/hcloud-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-16 22:30:22 +00:00
Julien Pivotto 807c1fa146
Merge pull request #12315 from prometheus/dependabot/go_modules/documentation/examples/remote_storage/github.com/prometheus/client_golang-1.15.0
build(deps): bump github.com/prometheus/client_golang from 1.14.0 to 1.15.0 in /documentation/examples/remote_storage
2023-05-17 00:28:57 +02:00
Julien Pivotto 5eb88260da
Merge pull request #12311 from prometheus/dependabot/go_modules/github.com/hetznercloud/hcloud-go-1.43.0
build(deps): bump github.com/hetznercloud/hcloud-go from 1.42.0 to 1.43.0
2023-05-17 00:28:41 +02:00
Julien Pivotto 65c321a250
Merge pull request #12310 from prometheus/dependabot/go_modules/github.com/digitalocean/godo-1.99.0
build(deps): bump github.com/digitalocean/godo from 1.98.0 to 1.99.0
2023-05-17 00:28:32 +02:00
Julien Pivotto 0dc31ade41 Add support for consul path_prefix
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-05-17 00:14:58 +02:00
Julien Pivotto 1991bfb552 Merge remote-tracking branch 'origin/release-2.43'
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-05-16 22:29:52 +02:00
Julien Pivotto 41b3db198c
Merge pull request #12367 from AkshaySiwal/main
Updating signal for graceful shutdown in docs/getting_started.md
2023-05-16 22:25:26 +02:00
zenador 191bf9055b
Handle more arithmetic operators for native histograms (#12262)
Handle more arithmetic operators and aggregators for native histograms

This includes operators for multiplication (formerly known as scaling), division, and subtraction. Plus aggregations for average and the avg_over_time function.

Stdvar and stddev will (for now) ignore histograms properly (rather than counting them but adding a 0 for them).

Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-05-16 21:15:20 +02:00