Bryan Boreham
92a3eeac55
Create less garbage when parsing metrics ( #9299 )
...
* Refactor: extract function to make scrapeLoop for testing
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
* Add benchmarks for ScrapeLoopAppend
For Prometheus and OpenMetrics
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
* Create less garbage when parsing metrics
Exemplar escapes to heap due to being passed through text-parser
interface, but we can reduce the impact by hoisting it out of the loop
and resetting it after every use.
(Note the cost was paid on every line even when exemplars were disabled)
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
* Create less garbage when parsing OpenMetrics
After calling parseLVals() we always append the return value, so pass in
what we want to append it to and save garbage.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2021-09-08 13:39:21 +05:30
Julien Pivotto
ad642a85c0
Merge pull request #9304 from LeviHarrison/backfill-fix-date
...
Rules backfill: fix new rule importer message
2021-09-07 18:01:03 +02:00
Julien Pivotto
bd24e2fb92
Merge pull request #9303 from LeviHarrison/backfill-return-1
...
Rules backfill: return 1 if unsuccessful
2021-09-07 18:00:42 +02:00
Ganesh Vernekar
1a5b21b78b
Update dependencies for v2.30.0 ( #9308 )
...
* Update Go dependencies
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
* Update React dependencies
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2021-09-07 20:17:21 +05:30
Julien Pivotto
d7d5d8ac02
Merge pull request #9307 from prometheus/superq/bump_pkg
...
Update various react-app dependencies
2021-09-07 12:28:36 +02:00
SuperQ
6281d26002
Update various react-app dependencies
...
Update several dependencies to cleanup `npm outdated`.
Signed-off-by: SuperQ <superq@gmail.com>
2021-09-07 11:34:37 +02:00
Julien Pivotto
218ea2eb16
Merge pull request #9300 from prometheus/feature/upgrade-ts
...
upgrade react-app to typescript 4
2021-09-07 11:09:26 +02:00
Augustin Husson
405198f430
upgrade react-app to typescript 4
...
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
2021-09-07 10:51:59 +02:00
Julien Pivotto
143fce73cd
Merge pull request #9296 from prometheus/feature/smooth-upgrade
...
upgrade react-script to v4
2021-09-07 10:49:44 +02:00
David Leadbeater
c244fe27a3
Merge pull request #9306 from dgl/zecke/fasta
...
promtool: Speed up checking for duplicate rules
Running promtool check config on large rule files is rather slow. Improve this by adding a testcase, benchmark and changing the algorithm used to find duplicates.
2021-09-07 14:55:18 +10:00
Levi Harrison
ded95ff434
Fix new rule importer message
...
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-09-06 22:19:29 -04:00
Levi Harrison
34e1b47968
Fixed error handling
...
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-09-06 21:55:57 -04:00
Holger Hans Peter Freyther
5edec40d60
promtool: Speed up checking for duplicate rules
...
Trade space for speed. Convert all rules into our temporary struct, sort
and then iterate. This is a significant when having many rules.
Signed-off-by: Holger Hans Peter Freyther <holger@moiji-mobile.com>
2021-09-06 23:10:26 +08:00
Holger Hans Peter Freyther
3a309c1ae5
promtool: Add simple benchmark checkDuplicates benchmark
...
Add a simple benchmark with a large number of rules.
Signed-off-by: Holger Hans Peter Freyther <holger@moiji-mobile.com>
2021-09-06 23:10:26 +08:00
Holger Hans Peter Freyther
794937b3d6
promtool: Add testcase for detecting duplicates
...
Introduce a basic test for checking for duplicate rules.
Signed-off-by: Holger Hans Peter Freyther <holger@moiji-mobile.com>
2021-09-06 23:10:26 +08:00
Augustin Husson
5bcf2e6511
upgrade react-script to v4
...
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
2021-09-04 15:56:36 +02:00
Julien Pivotto
dc586b2495
Merge pull request #9295 from prymitive/scrape_sample_limit
...
Add scrape_sample_limit metric
2021-09-04 13:30:08 +02:00
Łukasz Mierzwa
f0a26266c0
Add scrape_sample_limit metric
...
This adds a new metric exposing per target scrape sample_limit value. Metrics are only exposed if extra-scrape-metrics feature flag is enabled.
scrape_sample_limit will make it easy to monitor and alert on targets getting close to configured sample_limit, which is important given than exceeding sample_limit results in the entire scrape results being rejected.
Signed-off-by: Łukasz Mierzwa <l.mierzwa@gmail.com>
2021-09-03 15:42:41 +01:00
Julien Pivotto
9de62707b3
Merge pull request #9247 from prometheus/superq/scrape_timeout_feature
...
Add scrape_timeout_seconds metric (behind feature flag)
2021-09-03 00:56:41 +02:00
Callum Styan
93886d8417
Fix div by 0 panic is resize function. ( #9286 )
...
Signed-off-by: Callum Styan <callumstyan@gmail.com>
2021-09-02 11:08:05 -07:00
Björn Rabenstein
2a5dde2f87
Merge pull request #9289 from gerobinson/require-error-message-in-template-tests
...
Fix template_test.go to check that error messages match the expected error message
2021-09-02 17:52:23 +02:00
George Robinson
9397402bd3
Fix template_test.go to check that error messages match the expected error message
...
Signed-off-by: George Robinson <george.robinson@grafana.com>
2021-09-02 15:52:07 +01:00
SuperQ
31f4108758
Add scrape_timeout_seconds metric
...
Add a new built-in metric `scrape_timeout_seconds` to allow monitoring
of the ratio of scrape duration to the scrape timeout. Hide behind a
feature flag to avoid additional cardinality by default.
Signed-off-by: SuperQ <superq@gmail.com>
2021-09-02 12:15:35 +02:00
Oleg Zaytsev
0a43e788af
Allow VectorSelector.String() without matchers ( #9282 )
...
* Allow VectorSelector.String() without matchers
Previously this method was panicking because it was trying to allocate a
slice with capacity -1. There's nothing saying that VectorSelector
should have matchers, and it's actually prepared to have zero matcher
strings, so it's worth checking instead of panicking.
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
2021-09-01 09:48:18 +02:00
DrAuYueng
e8be1d0a5c
Check relabel action at yaml unmarshal stage ( #9224 )
...
Signed-off-by: DrAuYueng <ouyang1204@gmail.com>
2021-08-31 17:52:57 +02:00
Levi Harrison
70f597b033
Configure Scrape Interval and Timeout Via Relabeling ( #8911 )
...
* Configure scrape interval and timeout with labels
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-08-31 17:37:32 +02:00
Julien Pivotto
6a31b28ca9
Merge pull request #9280 from roidelapluie/ingressc
...
kubernetes ingress: adjust comment style
2021-08-31 01:58:22 +02:00
Julien Pivotto
b1bdde46c3
kubernetes ingress: adjust comment style
...
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-08-30 22:34:24 +02:00
Julien Pivotto
50d506ef48
Merge pull request #9276 from roidelapluie/merge2292
...
Merge release 2.29
2021-08-30 22:25:11 +02:00
Julien Pivotto
0d0fd22bc1
Merge remote-tracking branch 'origin/release-2.29'
2021-08-30 17:48:54 +02:00
Ganesh Vernekar
35b1a82594
Exemplars in snapshot ( #9255 )
...
* Exemplars in snapshot
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
* Fix lint
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
* Add docs
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
* Fix lint
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
* Fix comments
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2021-08-30 19:34:38 +05:30
Julius Volz
dff78eb508
Switch from Reach Router to React Router ( #9273 )
...
We want to upgrade to React 17, but Reach Router does not work with React 17:
https://github.com/reach/router/issues/429
Also, the Reach + React Router projects announced an intention to join forces
and just continue as React Router:
https://reacttraining.com/blog/reach-react-router-future/
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2021-08-30 14:05:49 +02:00
Augustin Husson
b8da617798
Update CODEOWNERS ( #9272 )
...
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
2021-08-30 14:02:46 +02:00
Augustin Husson
a2665a9f73
add lezer-promql module ( #9229 )
...
* add lezer-promql module
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
* integrate lezer-promql in codemirror-promql
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
2021-08-29 15:16:25 +02:00
Julien Pivotto
a96bd28d3c
Merge pull request #9268 from LeviHarrison/ignore-func
...
Also ignore `func1` goleak in TSDB test
2021-08-29 09:18:30 +02:00
Levi Harrison
06afe6162c
Also ignore func1
...
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-08-28 22:42:22 -04:00
Julien Pivotto
d5676fb9e0
Merge pull request #9254 from prometheus/superq/go1.17
...
Build with Go 1.17 / npm 7 / node 16
2021-08-28 18:36:42 +02:00
Frederic Hemberger
16b8911b1a
docs: Replace go get
with go install
for command installation ( #9098 )
...
`go get` is deprecated for installation of commands as of go v1.17
Ref: https://go.googlesource.com/go/+/ced0fdbad0655d63d535390b1a7126fd1fef8348
Signed-off-by: Frederic Hemberger <mail@frederic-hemberger.de>
2021-08-27 11:08:21 +02:00
Frederic Branczyk
752c4f11ae
Merge pull request #9264 from brancz/cut-2.29.2
...
Cut 2.29.2
2021-08-27 10:24:40 +02:00
SuperQ
e167a45c65
Add new Go build tags.
...
Add new go:build comments based on 1.17 formatting[0].
[0]: https://golang.org/doc/go1.17#gofmt
Signed-off-by: SuperQ <superq@gmail.com>
2021-08-27 10:24:14 +02:00
Frederic Branczyk
571629628e
*: Cut v2.29.2
...
Signed-off-by: Frederic Branczyk <fbranczyk@gmail.com>
2021-08-27 09:31:54 +02:00
Takashi Kusumi
90c7dcf9f6
Kubernetes SD: Fix golint issue
...
Signed-off-by: Takashi Kusumi <tkusumi@zlab.co.jp>
2021-08-27 09:30:26 +02:00
Takashi Kusumi
d6583134d2
Kubernetes SD: Introduce ingressAdaptor
...
Signed-off-by: Takashi Kusumi <tkusumi@zlab.co.jp>
2021-08-27 09:30:25 +02:00
Takashi Kusumi
cb04fe8386
Kubernetes SD: Support networking.k8s.io/v1 Ingress
...
Signed-off-by: Takashi Kusumi <tkusumi@zlab.co.jp>
2021-08-27 09:30:24 +02:00
Ganesh Vernekar
f4c63b9008
Fix a data race in the loadWAL function caused by reusing the same error var in multiple goroutines ( #9259 ) ( #9263 )
...
Signed-off-by: Callum Styan <callumstyan@gmail.com>
Co-authored-by: Callum Styan <callumstyan@gmail.com>
2021-08-27 12:56:09 +05:30
Callum Styan
cc55e57c1b
Fix a data race in the loadWAL function caused by reusing the same error var in multiple goroutines ( #9259 )
...
Signed-off-by: Callum Styan <callumstyan@gmail.com>
2021-08-27 11:49:34 +05:30
SuperQ
a1401c26b1
Build with Go 1.17
...
Update build to use Go 1.17.
* Use golang-builder images for testing.
* Update CircleCI go orb.
* Use tools from golang-builder image.
Signed-off-by: SuperQ <superq@gmail.com>
2021-08-27 00:32:49 +02:00
Frederic Branczyk
1276aaaa9f
Merge pull request #9118 from PhilipGough/fixes-8902
...
discovery:kube: Support wildcard matching for ingress rules
2021-08-26 16:48:25 +02:00
Julien Pivotto
e582e907f8
Merge pull request #9257 from LeviHarrison/sigv4-common
...
Switch to common/sigv4
2021-08-26 16:43:07 +02:00
Levi Harrison
bd57cd395e
Switch to common/sigv4
...
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-08-26 09:37:19 -04:00