Commit Graph

7 Commits

Author SHA1 Message Date
Andrej Ocenas
bf334ab777
Prometheus: Small improvements to the custom client (#51709)
* Add suggestions

* Fix tests
2022-07-04 22:55:07 +02:00
Andrej Ocenas
3df34fe064
Prometheus: Remove cache, pass headers in request, simplify client creation for resource calls and custom client (#51436)
* Remove cache, pass headers in request, simplify client creation

* Add test for http options creation
2022-07-04 11:18:45 +02:00
Andrej Ocenas
677b2a43b5
Prometheus: Add test for resource call header handling (#51036)
* Add test

* Remove unused test
2022-06-17 16:48:32 +02:00
Andrej Ocenas
07be95a001
Prometheus: Fix body not being included in resource calls if they are POST (#50833)
* Pass on request body

* Fix GETs and add tests

* Fix err handling

* Add comments

* Close response body

* Fix lint maybe

* Fix test
2022-06-15 16:46:21 +02:00
Stephanie Closson
49dc9da9c1
Prometheus: Templating queries should pass on custom headers (#50344)
* pass on all headers except for accept headers

* touch up and testing

* add custom header values to resource queries

* remove my picture. oops

* handle gzip responses as well

* fix linting issues

* add my space

* no lint

* removed cookies from being proxied

* clean up and handle errors from io.reader.Close() calls
2022-06-08 08:25:53 -03:00
Todd Treece
4aa5e7e69e
Prometheus: Fix resource call panic (#50216) 2022-06-05 14:18:26 -04:00
Stephanie Closson
53ee72d15d
Prometheus: Migrate metadata queries to use resource calls (#49921)
* Sent resource calls for metadata to the backend

* moved resource calls to the backend

* code review feedback

* fixed post with body

* statuscode >= 300

* cleanup

* fixed tests

* fixed datasource tests

* code review feedback

* force some other endpoints to only GET

* fix linting errors

* fixed tests

* was able to remove section of redundant code

* cleanup and code review feedback

* moved query_exemplars to get request

* fixed return on error

* went back to resource calls, but using the backendsrv directly

* moved to a resource call with fallback

* fixed tests

* check for proper messages

* proper check for invalid calls

* code review changes
2022-06-03 15:56:13 -03:00