Storing the scrape cache and the target (which also contains that cache)
is apparently causing hige memory increase. I think me might not control
the lifespan of the context enough, therefore old objects keep living in
memory for longer than needed.
Let's unblock the release and look for an alternative so that downstream
consumers can get access to that data.
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
* tsdb/agent: port grafana/agent#676grafana/agent#676 fixed an issue where a loading a WAL with multiple
segments may result in ref ID collision. The starting ref ID for new
series should be set to the highest ref ID across all series records
from all WAL segments.
This fixes an issue where the starting ref ID was incorrectly set to the
highest ref ID found in the newest segment, which may not have any ref
IDs at all if no series records have been appended to it yet.
Signed-off-by: Robert Fratto <robertfratto@gmail.com>
* tsdb/agent: update terminology (s/ref ID/nextRef)
Signed-off-by: Robert Fratto <robertfratto@gmail.com>
This will make UI static files part of the release artefacts, for
consumption by downstream distributions.
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
* Proper support for go modules.
This pull requests makes Prometheus go-mod compatible.
The general idea is to release the Prometheus libraries as v0.x
releases, next to the v2.x tags used by end users.
This is done by mirroring Prometheus 2.x tags with Prometheus 0.x tags.
When v2.X.0 is released, we would release v0.X.0.
Pre-go mod versions are retracted from go.mod. This is not nice but
should work.
Only v2.x tags will be built and released by CI. v0.x.x tags would just
be normal tags in the repo, not promoted as releases.
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
The tarball should be compressed and only use uncompressed assets. In
that way, uit can be used by downstream distros easily. they can either
download the assets and serve it as is or use the compress script to
have it in the binary.
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
Some downstream distros fail to compile Prometheus UI (Debian, NixOS).
This is an attempt to store compiled UI in circleci for them to consume
it. Currently we do not expose this outside of circleci.
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
Co-authored-by: Julien Pivotto <roidelapluie@o11y.eu>
* Add a --lint flag to the promtool check rules and check config commands
Checking rules with promtool emits warnings in the case of duplicate rules.
These warnings do not result in a non-zero exit code and are difficult to
spot in CI environments. Additionally, checking for duplicates is closer
to a lint check rather than a syntax check.
This commit adds a --lint flag to commands which include checking rules.
The flag can be used to enable or disable certain linting options
and cause the execution to return a non-zero exit code in case
those options are not met.
Signed-off-by: fpetkovski <filip.petkovsky@gmail.com>
* Exit with status 3 on lint error
Signed-off-by: fpetkovski <filip.petkovsky@gmail.com>
* create lezer-promql module + move codemirror to a pure esm module + unified dependencies
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
* ignore test utils file and remove the type "module" in package.json
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
* use jest to run the lezer-promql test
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
* give an automatic way to update the ui dependencies
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
* update all dependencies using make update-npm-deps
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
* fix react-app test
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
* remove generated file
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
* remove unnecessary backslash in script
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
* fix reviews
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
* rewording
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
* use npx to run lezer-generator
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
* tsdb: avoid slice-to-interface allocation in EnsureOrder
This is pulling the `seriesRefSlice` out of the loop, so the compiler
doesn't allocate a new one on the heap every time.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
* tsdb: use pointer type in Pool for EnsureOrder
As noted by staticcheck, Pool prefers the objects in the pool to have
pointer type. This is a little more fiddly to code, but avoids
allocation of a wrapper object every time a slice is put into the pool.
Removed a comment that said fixing this has a performance penalty: not
borne out by benchmarks.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
This commit adds an alert in the prometheus mixin which triggers when
Prometheus has failed scrapes that have exceeded the configured
sample_limit for that job.
Signed-off-by: fpetkovski <filip.petkovsky@gmail.com>
This commit ensures 64-bit integers are used in various tests that other wise
fail in 32-bit architectures.
It also adds support for int64 and uint64 types in the template.convertToFloat
function to support the test changes.
Closes: 10481
Signed-off-by: Martina Ferrari <tina@debian.org>
* discovery: expose HTTP client options to discoverers
Signed-off-by: Robert Fratto <robertfratto@gmail.com>
* discovery/http: use HTTP client options for created client
Signed-off-by: Robert Fratto <robertfratto@gmail.com>
* scrape: use a list of HTTP client options instead of just dial context
Signed-off-by: Robert Fratto <robertfratto@gmail.com>
* discovery: rephrase comment
Signed-off-by: Robert Fratto <robertfratto@gmail.com>
Per Julien's feedback on #10369, we're choosing to be consistent with
data types inside the stats structure (ints) rather than with the points
format that is part of the normal query responses (strings). We have
this option because this data cannot be NaN/Inf.
Signed-off-by: Andrew Bloomgarden <blmgrdn@amazon.com>