Currently hashmod hashes all the labels, even if there is a newline. To
ensure it still works in the future, let's add a test.
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
This PR introduces support for follow_redirect, to enable users to
disable following HTTP redirects.
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
* Move remote read handler to remote package.
This follows the pattern I started with the remote write handler. The api/v1 package is getting pretty cluttered. Moving code to other packages helps reduce this size and also makes it reusable - eg Cortex doesn't do streaming remote writes yet, and will very soon.
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
* Deal with a nil remoteReadHandler for tests.
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
* Remove the global metrics.
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
* Fix test.
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
* Review feedback.
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
* Add expression explorer
Signed-off-by: Lucas Hild <git@lucas-hild.de>
* Add final new line to all files
Signed-off-by: Lucas Hild <git@lucas-hild.de>
* Rename expression to metric
Signed-off-by: Lucas Hild <git@lucas-hild.de>
* Pass dedicated metrics array to metrics explorer
Signed-off-by: Lucas Hild <git@lucas-hild.de>
* Fix styling of button
Signed-off-by: Lucas Hild <git@lucas-hild.de>
* Use append instead of prepend
Signed-off-by: Lucas Hild <git@lucas-hild.de>
* Update max width of modal
Signed-off-by: Lucas Hild <git@lucas-hild.de>
* Fix code style
Signed-off-by: Lucas Hild <git@lucas-hild.de>
* Fix inconsistent variable naming
Signed-off-by: Lucas Hild <git@lucas-hild.de>
* Fix modal title
Signed-off-by: Lucas Hild <git@lucas-hild.de>
* Fix tests
Signed-off-by: Lucas Hild <git@lucas-hild.de>
* Prevent request from being cached
Signed-off-by: Lucas Hild <git@lucas-hild.de>
* Remove timestamp from request
Signed-off-by: Lucas Hild <git@lucas-hild.de>
* Update button selector in test
Signed-off-by: Lucas Hild <git@lucas-hild.de>
* Refactor passing down metric names and query history
Signed-off-by: Lucas Hild <git@lucas-hild.de>
* Fix code style
Signed-off-by: Lucas Hild <git@lucas-hild.de>
The main branch tests are not passing due to the fact that #8489 was not
rebased on top of #8007.
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
This moves the label lookup into TSDB, whilst still keeping the cached-ref optimisation for repeated Appends.
This makes the API easier to consume and implement. In particular this change is motivated by the scrape-time-aggregation work, which I don't think is possible to implement without it as it needs access to label values.
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>