In stacked / flex layouts like on the service discovery page, elements get a
100% width unless you tell them to only be as wide as their contents.
Signed-off-by: Julius Volz <julius.volz@gmail.com>
Technically, we are not filtering by the state of a single rule, but by the
whole rule group state (if even a single alert is firing within a group,
filtering for "Pending" won't show the group, even if it has pending
alerts).
Signed-off-by: Julius Volz <julius.volz@gmail.com>
As discussed in https://github.com/prometheus/prometheus/issues/15717, this
should help show more information on one screen, to be more similar to the
old UI in this regard.
Signed-off-by: Julius Volz <julius.volz@gmail.com>
Improve readability of "WAL segment loaded" by logging the duration
of each load. This helps make it easier to spot slow WAL file load
times.
Signed-off-by: SuperQ <superq@gmail.com>
* Implement simpler custom badges for label displays
Should help a little bit with https://github.com/prometheus/prometheus/issues/16308
Signed-off-by: Julius Volz <julius.volz@gmail.com>
* Don't wrap text inside custom labels
Signed-off-by: Julius Volz <julius.volz@gmail.com>
---------
Signed-off-by: Julius Volz <julius.volz@gmail.com>
Also change the SD page setting for this to be in localStorage, as on the
other pages.
Should help a tiny bit with https://github.com/prometheus/prometheus/issues/16308
Signed-off-by: Julius Volz <julius.volz@gmail.com>
* Fix storage/remote.pool interned refs count and flaky test
I saw TestIntern_MultiRef_Concurrent failing on a different PR saying 'expected refs to be 1 but it was 2'.
I took a look, and it definitely can be racy, especially with a time.Sleep() of just 1ms.
I'm fixing that by explicitly waiting until it has been released, and by repeating that 1000 times, otherwise it's just a recipe for a future flaky test.
OTOH, I also took a look at the implementation and saw that we were not holding the RLock() when increasing the references count, so when releasing there was a race condition for the cleanup, I fixed that by holding RLock() while increasing the references count.
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
* s/Equalf/Equal/
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
---------
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
* refactor: simplify error handling and remove redundant checks
Signed-off-by: Ryan Wu <rongjun0821@gmail.com>
* Add the comment for return of reloading blocks failure
Co-authored-by: Ayoub Mrini <ayoubmrini424@gmail.com>
Signed-off-by: Ryan Wu <rongjun0821@gmail.com>
* Add the comment for return of reloading blocks failure
Signed-off-by: Ryan Wu <rongjun0821@gmail.com>
---------
Signed-off-by: Ryan Wu <rongjun0821@gmail.com>
Co-authored-by: Ayoub Mrini <ayoubmrini424@gmail.com>
This test consistently fails missing ~10 series.
If it doesn't fail on your machine, just increase totalSeries, that's
how race conditions work.
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
The new metric_name_escaping_scheme config option works in parallel with metric_name_validation_scheme and controls which escaping scheme is requested when scraping. When not specified, the scheme will request underscores if the validation scheme is set to legacy, and will request allow-utf-8 when the validation scheme is set to utf8. This setting allows users to allow utf8 names if they like, but explicitly request an escaping scheme rather than UTF-8.
Fixes https://github.com/prometheus/prometheus/issues/16034
Built on https://github.com/prometheus/prometheus/pull/16080
Signed-off-by: Owen Williams <owen.williams@grafana.com>
The `:=` causes new variables to be created, which means the outer
slice stays at nil, and new memory is allocated every time round the
loop.
Extracted from https://github.com/prometheus/prometheus/pull/16182
Credit to @bwplotka.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
promql: return NaN from `irate()` if either of last two samples is NaN
Signed-off-by: Charles Korn <charles.korn@grafana.com>
---------
Signed-off-by: Charles Korn <charles.korn@grafana.com>
No need to validate, track, add sample, add exemplar if series isn't
going to be ingested. Basically this is the same as if this series was
dropped by relabelling.
Fixes#16217
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
[BUILD] Remove Go toolchain line
It doesn't reflect the version we use for CI builds, which is controlled by .promu.yml.
As such, I cannot see any justification to keep this line: it isn't necessary and it could confuse people.