Commit graph

7487 commits

Author SHA1 Message Date
Callum Styan b90be6f32a
Release 2.16.0 (#6817)
Signed-off-by: Callum Styan <callumstyan@gmail.com>
2020-02-13 15:33:53 -08:00
Bartlomiej Plotka 56eaaadb54
Merge pull request #6800 from prometheus/cut-v2.16.0-rc.1
Cutting v2.16.0-rc.1
2020-02-10 16:08:49 +00:00
Bartlomiej Plotka f94faafbda Cutting v2.16.0-rc.1
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
2020-02-10 12:58:35 +00:00
Bartlomiej Plotka 32c9670b7e
Merge pull request #6793 from roidelapluie/stepinterval
promql: fix promql query log step unit
2020-02-10 12:55:20 +00:00
Julien Pivotto d799078c88 also test start and end
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-02-08 16:42:50 +01:00
Julien Pivotto cbd0eec9fc Avoid /1000
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-02-08 16:30:09 +01:00
Julien Pivotto 881dde505a promql: fix promql query log step unit
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-02-08 16:26:56 +01:00
Julien Pivotto 40b66d29ff
OpenMetrics parse: avoid setting prev token (#6781)
We can avoid setting a prev token in the OM parser. The previous
coundition that checked for prev was unreacheable.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-02-07 07:33:26 +00:00
Callum Styan 22a04239c9
cut V2.16.0 rc.0 against the right branch (#6736)
* Cut v2.16.0-rc.0 pre release

Signed-off-by: Callum Styan <callumstyan@gmail.com>
2020-01-31 14:38:56 -08:00
Julien Pivotto 3c4c01eae2
Fix race in Query Log Test (#6727)
A data race can happen if we run t.Log after the test t is done -- which
in this case is highly possible because of the use of subtests and the
fact that we call t.Log in a goroutine.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-01-30 13:51:18 -08:00
Callum Styan 83601202d9
Add missing param to NewHead call in test. (#6725)
Signed-off-by: Callum Styan <callumstyan@gmail.com>
2020-01-30 11:45:14 -08:00
Peter Štibraný 08c5549055
Document that NewMergeSeriesSet expects individual sets to be sorted. (#6718)
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
2020-01-30 19:30:32 +05:30
Thor 17d8c49919
made stripe size configurable (#6644)
Signed-off-by: Thor <thansen@digitalocean.com>
2020-01-30 12:42:43 +05:30
Julien Pivotto 9c67fce6e0
Scrape: test samples_post_metric_relabeling when metrics are dropped (#6720)
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-01-29 17:47:36 +00:00
Bartlomiej Plotka ad1518c629
Merge pull request #6683 from roidelapluie/issue
Update issue templates
2020-01-29 13:35:46 +00:00
Hrishikesh Barman 03b4f58f33
Updated contexts for GitHub actions Status updates. (#6709)
Signed-off-by: Hrishikesh Barman <plain.hrishikeshbman@gmail.com>
2020-01-29 14:51:35 +02:00
Julien Pivotto f82d55e79f
Refactor and simplify rule_group_interval_seconds (#6711)
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-01-29 11:26:08 +00:00
gotjosh 8b49c9285d
scrape: Add metrics to track bytes and entries in the metadata cache (#6675)
Signed-off-by: gotjosh <josue@grafana.com>
2020-01-29 11:13:18 +00:00
Julien Pivotto 9adad8ad30 Remove MaxConcurrent from the PromQL engine opts (#6712)
Since we use ActiveQueryTracker to check for concurrency in
d992c36b3a it does not make sense to keep
the MaxConcurrent value as an option of the PromQL engine.

This pull request removes it from the PromQL engine options, sets the
max concurrent metric to -1 if there is no active query tracker, and use
the value of the active query tracker otherwise.

It removes dead code and also will inform people who import the promql
package that we made that change, as it breaks the EngineOpts struct.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-01-28 20:38:49 +00:00
Brian Brazil 540dc7dfb0
Merge pull request #6651 from prometheus/sort-block
Don't sort postings if we only have one block.
2020-01-28 14:52:07 +00:00
Brian Brazil 61262159c4 Simplify benchmark given the new API
Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
2020-01-28 14:38:09 +00:00
Boyko 41071278b6 Change old UI link to React App to point to graph page (#6697)
* change the link to React App to point to graph page

Signed-off-by: blalov <boiskila@gmail.com>

* add search params to classic UI link

Signed-off-by: blalov <boiskila@gmail.com>

* lint fix

Signed-off-by: blalov <boiskila@gmail.com>

* remove navLink onclick

Signed-off-by: blalov <boiskila@gmail.com>

* remove left-over

Signed-off-by: blalov <boiskila@gmail.com>

* remove pkg files

Signed-off-by: blalov <boiskila@gmail.com>

* delete .vscode

Signed-off-by: Boyko Lalov <boiskila@gmail.com>
2020-01-28 14:04:56 +01:00
Brian Brazil 38d32e0686 Don't sort postings if we only have one block.
Sorting the heads postings can be quite slow.
We only need sorted series when merging with another
querier, so only sort then.
This will make big queries that only touch the head faster,
though queries that touch both the head and a block will still
be the same speed. This probably won't help much with graphing
unless the range is under an hour, however it should make most
recording rules faster.

Add gaurantee that remote read streaming produces sorted series.

PromQL benchmarks for histograms show only 2-3% improvement, but
they're only over 1k series.

benchmark                                                old ns/op      new ns/op      delta
BenchmarkQuerierSelect/Head/1of1000000-4                 1375486282     507657736      -63.09%
BenchmarkQuerierSelect/Head/10of1000000-4                1387859004     507769850      -63.41%
BenchmarkQuerierSelect/Head/100of1000000-4               1387087935     506029110      -63.52%
BenchmarkQuerierSelect/Head/1000of1000000-4              1386869064     504521986      -63.62%
BenchmarkQuerierSelect/Head/10000of1000000-4             1386213685     505210422      -63.55%
BenchmarkQuerierSelect/Head/100000of1000000-4            1392754988     529842406      -61.96%
BenchmarkQuerierSelect/Head/1000000of1000000-4           1569414722     725059506      -53.80%
BenchmarkQuerierSelect/SortedHead/1of1000000-4           1381019902     1370495863     -0.76%
BenchmarkQuerierSelect/SortedHead/10of1000000-4          1375696209     1366789468     -0.65%
BenchmarkQuerierSelect/SortedHead/100of1000000-4         1386009422     1364519297     -1.55%
BenchmarkQuerierSelect/SortedHead/1000of1000000-4        1377700532     1364486191     -0.96%
BenchmarkQuerierSelect/SortedHead/10000of1000000-4       1383539536     1369545314     -1.01%
BenchmarkQuerierSelect/SortedHead/100000of1000000-4      1410089163     1394731339     -1.09%
BenchmarkQuerierSelect/SortedHead/1000000of1000000-4     1634744148     1581554956     -3.25%
BenchmarkQuerierSelect/Block/1of1000000-4                881741242      879839470      -0.22%
BenchmarkQuerierSelect/Block/10of1000000-4               880381562      882846038      +0.28%
BenchmarkQuerierSelect/Block/100of1000000-4              887519357      881016916      -0.73%
BenchmarkQuerierSelect/Block/1000of1000000-4             902194205      883433524      -2.08%
BenchmarkQuerierSelect/Block/10000of1000000-4            892321964      885130170      -0.81%
BenchmarkQuerierSelect/Block/100000of1000000-4           938604466      933527150      -0.54%
BenchmarkQuerierSelect/Block/1000000of1000000-4          1313510845     1295881124     -1.34%

benchmark                                                old allocs     new allocs     delta
BenchmarkQuerierSelect/Head/1of1000000-4                 4000056        4000018        -0.00%
BenchmarkQuerierSelect/Head/10of1000000-4                4000074        4000036        -0.00%
BenchmarkQuerierSelect/Head/100of1000000-4               4000254        4000216        -0.00%
BenchmarkQuerierSelect/Head/1000of1000000-4              4002054        4002016        -0.00%
BenchmarkQuerierSelect/Head/10000of1000000-4             4020054        4020016        -0.00%
BenchmarkQuerierSelect/Head/100000of1000000-4            4200054        4200016        -0.00%
BenchmarkQuerierSelect/Head/1000000of1000000-4           6000054        6000016        -0.00%
BenchmarkQuerierSelect/SortedHead/1of1000000-4           4000071        4000071        +0.00%
BenchmarkQuerierSelect/SortedHead/10of1000000-4          4000089        4000089        +0.00%
BenchmarkQuerierSelect/SortedHead/100of1000000-4         4000269        4000269        +0.00%
BenchmarkQuerierSelect/SortedHead/1000of1000000-4        4002069        4002069        +0.00%
BenchmarkQuerierSelect/SortedHead/10000of1000000-4       4020069        4020069        +0.00%
BenchmarkQuerierSelect/SortedHead/100000of1000000-4      4200069        4200069        +0.00%
BenchmarkQuerierSelect/SortedHead/1000000of1000000-4     6000069        6000069        +0.00%
BenchmarkQuerierSelect/Block/1of1000000-4                6000023        6000022        -0.00%
BenchmarkQuerierSelect/Block/10of1000000-4               6000059        6000058        -0.00%
BenchmarkQuerierSelect/Block/100of1000000-4              6000419        6000418        -0.00%
BenchmarkQuerierSelect/Block/1000of1000000-4             6004019        6004018        -0.00%
BenchmarkQuerierSelect/Block/10000of1000000-4            6040019        6040018        -0.00%
BenchmarkQuerierSelect/Block/100000of1000000-4           6400019        6400018        -0.00%
BenchmarkQuerierSelect/Block/1000000of1000000-4          10000020       10000019       -0.00%

benchmark                                                old bytes     new bytes     delta
BenchmarkQuerierSelect/Head/1of1000000-4                 229192200     176001176     -23.21%
BenchmarkQuerierSelect/Head/10of1000000-4                229193352     176002328     -23.21%
BenchmarkQuerierSelect/Head/100of1000000-4               229204872     176013848     -23.21%
BenchmarkQuerierSelect/Head/1000of1000000-4              229320072     176129048     -23.20%
BenchmarkQuerierSelect/Head/10000of1000000-4             230472072     177281048     -23.08%
BenchmarkQuerierSelect/Head/100000of1000000-4            241992072     188801048     -21.98%
BenchmarkQuerierSelect/Head/1000000of1000000-4           357192072     304001048     -14.89%
BenchmarkQuerierSelect/SortedHead/1of1000000-4           229193928     229193928     +0.00%
BenchmarkQuerierSelect/SortedHead/10of1000000-4          229195080     229195080     +0.00%
BenchmarkQuerierSelect/SortedHead/100of1000000-4         229206600     229206600     +0.00%
BenchmarkQuerierSelect/SortedHead/1000of1000000-4        229321800     229321800     +0.00%
BenchmarkQuerierSelect/SortedHead/10000of1000000-4       230473800     230473800     +0.00%
BenchmarkQuerierSelect/SortedHead/100000of1000000-4      241993800     241993800     +0.00%
BenchmarkQuerierSelect/SortedHead/1000000of1000000-4     357193800     357193800     +0.00%
BenchmarkQuerierSelect/Block/1of1000000-4                227201516     227201500     -0.00%
BenchmarkQuerierSelect/Block/10of1000000-4               227202924     227202908     -0.00%
BenchmarkQuerierSelect/Block/100of1000000-4              227217036     227217020     -0.00%
BenchmarkQuerierSelect/Block/1000of1000000-4             227358156     227358140     -0.00%
BenchmarkQuerierSelect/Block/10000of1000000-4            228769356     228769340     -0.00%
BenchmarkQuerierSelect/Block/100000of1000000-4           242881356     242881340     -0.00%
BenchmarkQuerierSelect/Block/1000000of1000000-4          384001616     384001600     -0.00%

Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
2020-01-28 09:14:56 +00:00
Brian Brazil d682731efc Extend BenchmarkQuerierSelect to use multiple blocks.
Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
2020-01-28 09:14:56 +00:00
Julien Pivotto d992c36b3a promql: make active query tracker context-aware (#6701)
* promql: make query logger context-aware
* Remove gate
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-01-27 22:29:44 +00:00
Krasimir Georgiev ddd49b743c
Update README.md 2020-01-27 18:10:08 +02:00
Krasimir Georgiev cf6144a98f
Update README.md 2020-01-27 18:09:00 +02:00
Hrishikesh Barman 3476555d31 Add Github Actions workflow to run Prombench (#6703)
* Adding prombench github actions workflow.

Signed-off-by: Hrishikesh Barman <plain.hrishikeshbman@gmail.com>
2020-01-27 18:06:28 +02:00
Anand Singh Kunwar aa61e392b2 Make remote client Store use passed context (#6673)
* Remote store client's `Store` API currently doesn't use passed
context, but instead just constructs a new `context.Background()`

Signed-off-by: Anand Singh Kunwar <anandkunwar95@gmail.com>
2020-01-27 07:43:20 -07:00
Julien Pivotto 56ebd5afde Delete prometheus_rule_group metrics when groups are removed (#6693)
* Delete prometheus_rule_group metrics when groups are removed

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-01-27 12:41:32 +00:00
Julien Pivotto cf42888e4d Fix order of testutil.Equals (#6695)
Equals takes the expected value as first parameter, and the actual value
as second parameter.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-01-27 12:21:59 +00:00
Julien Pivotto 5f27ac3583 Refactor query log fields (#6694)
* Refactor query log fields

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-01-27 09:53:10 +00:00
Harkishen Singh c1e49d50c5 Adds support for rules screen in react-ui (#6503)
* base

Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>

* base of rules page

Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>

* initial version

Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>

* removed unused function

Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>

* version 1

Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>

* implemented suggestions

Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>

* implemented suggestions

Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>

* implemented suggestions.

Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>

* new fetching pattern

Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>

* implemented suggestions

Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>
2020-01-27 10:27:43 +01:00
Julius Volz d996ba20ec
React UI: Support local timezone on /graph (#6692)
* React UI: Support local timezone on /graph

This partially implements
https://github.com/prometheus/prometheus/issues/500 in the sense that it
only addresses the /graph page, and only allows toggling between UTC and
local (browser) time, but no arbitrary timezone selection yet.

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Fixup: Also display TZ offset in tooltip

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Just show offset, not timezone name abbreviation

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2020-01-24 23:44:18 +01:00
Julien Pivotto 67cf21f9a1 remove extra line
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-01-23 01:18:31 +01:00
Julien Pivotto 4832f148ff fix nit
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-01-23 01:17:43 +01:00
Julien Pivotto ac30d54e89 Update issue templates
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-01-22 23:40:34 +01:00
Julien Pivotto fafb7940b1 Pass over scrape cache to the next scrape (#6670)
* Pass over scrape cache to the next scrape

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-01-22 12:13:47 +00:00
Julien Pivotto 3fbeee07fa Fix flaky windows test (#6677)
The windows clock is sometime off by 25ms, and as precise as 15ms.

Let's give it more time to avoid flaky tests.

Fix #6672

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-01-22 10:09:31 +00:00
johncming 17683d074c discovery: fix bug that use rlock for read. (#5928)
Signed-off-by: johncming <johncming@yahoo.com>
2020-01-22 09:57:37 +00:00
Björn Rabenstein 7d159b2f01
Merge pull request #6666 from roidelapluie/deps2
Add a note about updating deps
2020-01-21 11:47:42 +01:00
Julien Pivotto 372039530b Add a note about updating deps
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-01-20 22:29:12 +01:00
Julius Volz a677622184
React UI: Send cookies on fetch() on older browsers (#6553)
* React UI: Send cookies on fetch() on older browsers

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

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Fix fetch() tests to expect new options

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2020-01-20 16:50:32 +01:00
Ganesh Vernekar 21a5cf5d1d
Bring back tombstones to Head block (#6542)
* Bring back tombstones to Head block

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>

* Add test cases

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>

* Cleanup

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2020-01-20 21:08:00 +05:30
Julien Pivotto 2b2eb79e8b Add windows tests for query logger (#6653)
* Add windows tests
* Do not rely on time.Time in timer

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-01-20 13:17:11 +00:00
Julien Pivotto 46d18112a3 tsdb: error on series with duplicate labels (#6664)
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-01-20 11:05:27 +00:00
Ganesh Vernekar 08d6ddc7f2
Merge pull request #6667 from codesome/expose-compact
Expose DB.compact() method
2020-01-20 15:22:48 +05:30
Ganesh Vernekar e0733a99e3
Expose DB.Compact()
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2020-01-20 12:59:49 +05:30
Julien Pivotto 0eb34299da End-to-end Query Log test (#6600)
* End-to-end Query Log test

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-01-19 21:56:13 +00:00
Joaquín Fernández Campo 088614a17f Added the version to tsdb stats api methods (#6656)
* Added the version to tsdb stats api methods
* Updated changelog.md with references to the status page PRs

Signed-off-by: Joaquin Fernandez Campo <jfcampo@gmail.com>
2020-01-19 09:54:39 +00:00