Commit Graph

18 Commits

Author SHA1 Message Date
Kyle Brandt
674144c8e8
Prometheus: Update FrameType and make __name__ the field name (#62694)
These changes would make the response more in line with the dataplane contract, changes are under the feature toggle prometheusDataplane
2023-03-29 11:26:32 -04:00
Arve Knudsen
f7ee42d871
Prometheus: Reduce memory allocations in QueryData.processExemplars (#63373)
* tsdb/prometheus/querydata: Reduce memory allocations in QueryData.processExemplars

---------

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2023-03-22 10:59:39 +01:00
Sofia Papagiannaki
e643437ee6
Prometheus: Fix panic-ing when closing response body (#63895)
Prometheus: Fix panicing when closing response body
2023-02-28 13:08:01 -05:00
Emil Tullstedt
3abaf32cf2
Chore: Upgrade golangci-lint to v1.51.2 (#63630)
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2023-02-23 15:10:03 +01:00
ismail simsek
49258b135a
Prometheus: Refactor error handling logic (#62254)
* Refactor error handling logic
- Enable query inspector to show error information
- Update naming

* Change fetch method return signature

* update the snapshot

* Revert "update the snapshot"

This reverts commit 28b26ce426.
2023-01-31 19:26:45 +01:00
ismail simsek
29c8ce12a0
Prometheus: Fix handling errors in streaming client (#61643)
* Return errors from data parsing

* Better error handling

* Fix the tests

* When there is no frame add empty frame to get metadata attached to it

* Fix tests

* Update testdata
2023-01-18 22:30:15 +01:00
KonH
4421b31b66
Loki/Prometheus: Change signature - return non-reference from ReadPrometheusStyleResult (#57209)
* Change signature - return non-reference from ReadPrometheusStyleResult

Related to https://github.com/grafana/grafana/issues/52430

* Fix invalid reference usage

* Potential fix for test data

* Remove additional ref usage

* Revert "Potential fix for test data"

This reverts commit 94ed588ab3.

* Commit changed test data

* Revert unwanted conflict resolution

* Add additional condition to track empty responses

* Setup valid empty response

* Re-introduce changes reverted by merge
2023-01-13 09:00:39 +01:00
Todd Treece
19ca93d5ce
Prometheus: Fix concurrency issue with exemplar sampler initialization (#61281) 2023-01-11 08:27:47 -05:00
Todd Treece
73d5aa4878
Prometheus: Refactor exemplar sampler (#60278) 2022-12-30 13:04:35 -05:00
Marcus Efraimsson
c35c689a96
Plugins: Automatically forward plugin request HTTP headers in outgoing HTTP requests (#60417)
Automatically forward core plugin request HTTP headers in outgoing HTTP requests. 
Core datasource plugin authors don't have to specifically handle forwarding of HTTP 
headers, e.g. do not have to "hardcode" the header-names in the datasource plugin, 
if not having custom needs.

Fixes #57065
2022-12-21 13:25:58 +01:00
Ludovic Viaud
f67b8fe0dc
Prometheus: Create feature flag to disable exemplar sampling (#60105)
:Fix rebase
2022-12-19 16:00:15 +01:00
Giuseppe Guerra
92c01e416e
Prometheus: Fix X-Id-Token and X-ID-Token sent to Prometheus in query requests (#60342)
* Prometheus: Use Set rather than map assignment in sdkHeaderToHttpHeader
Fixes #59940

* Prometheus: Add TestPrometheusCanonicalHeaders
2022-12-15 17:18:38 +01:00
Denis Limarev
4d8287b319
Performance: add preallocation for some slice/map (#57860)
This change preallocates slices and maps where the size of the data is known before the object is created.

Co-authored-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-11-22 20:24:36 +08:00
Kyle Brandt
6126f56ef0
Prometheus: Do not drop errors in streaming parser (#57698)
- Fixes #57692
- and also takes care of #42776 when using the streaming parser, not an ideal fix for #42776 but makes explore work better I think. https://github.com/grafana/grafana/issues/57365 might be a better longer term solution
2022-10-28 10:11:06 -04:00
Yuriy Tseretyan
facf2b1ee8
Chore: Update prometheus, loki, graphite and influx plugins to support contextual logs. (#57708) 2022-10-27 12:05:06 -04: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
Todd Treece
94b9c524a8
Prometheus: Streaming JSON parser performance improvements (#48792) 2022-05-24 16:17:11 -04:00
Todd Treece
87e8521591
Prometheus: Implement Streaming JSON Parser (#48477)
use `prometheusStreamingJSONParser` feature toggle to enable
2022-05-13 20:28:54 +02:00