Commit Graph

68 Commits

Author SHA1 Message Date
Yuriy Tseretyan
facf2b1ee8
Chore: Update prometheus, loki, graphite and influx plugins to support contextual logs. (#57708) 2022-10-27 12:05:06 -04:00
Alexander Weaver
145b970557
Propagate all headers on main QueryData (#56896) 2022-10-13 14:18:53 -05:00
Emil Tullstedt
b287047052
Chore: Upgrade Go to 1.19.1 (#54902)
* WIP

* Set public_suffix to a pre Ruby 2.6 version

* we don't need to install python

* Stretch->Buster

* Bump versions in lib.star

* Manually update linter

Sort of messy, but the .mod-file need to contain all dependencies that
use 1.16+ features, otherwise they're assumed to be compiled with
-lang=go1.16 and cannot access generics et al.

Bingo doesn't seem to understand that, but it's possible to manually
update things to get Bingo happy.

* undo reformatting

* Various lint improvements

* More from the linter

* goimports -w ./pkg/

* Disable gocritic

* Add/modify linter exceptions

* lint + flatten nested list

Go 1.19 doesn't support nested lists, and there wasn't an obvious workaround.
https://go.dev/doc/comment#lists
2022-09-12 12:03:49 +02:00
Gábor Farkas
395e443932
loki: Fix adding refId to rowId (#53932) 2022-08-22 13:09:33 +02:00
Gábor Farkas
46eec85b1a
loki: better handle an empty-response (#52397) 2022-07-19 08:13:38 +02:00
Gábor Farkas
fd63ed540f
loki: fix bug in labels framing (#51015) 2022-06-17 12:50:10 +02:00
Gábor Farkas
109bc7e940
loki: add type=instant tests (#51007) 2022-06-17 09:47:49 +02:00
Gábor Farkas
ccc587dc0f
Loki: Handle data source configs with path in the url (#50971)
* loki: fixed param-name

* loki: handle datasource configs with path in the url

* lint fix
2022-06-17 07:47:31 +02:00
Serge Zaitsev
ae9491c3a7
Chore: Make test tracer noop and return no errors (#50797) 2022-06-15 12:40:41 +02:00
Gábor Farkas
8fd9cb4854
loki: add feature-toggle check to live-mode (#49012) 2022-06-13 08:33:46 +02:00
Todd Treece
64d93498de
Chore: Update grafana-plugin-sdk-go to v0.136.0 (#50127) 2022-06-03 08:25:52 -04:00
Gábor Farkas
46d6573968
loki: add cookie-handling functionality (#49978) 2022-06-02 11:52:27 +02:00
Todd Treece
94b9c524a8
Prometheus: Streaming JSON parser performance improvements (#48792) 2022-05-24 16:17:11 -04:00
Gábor Farkas
78e22aac59
loki: backend: better error-handling-tests (#49213) 2022-05-19 14:26:40 +02:00
Gábor Farkas
683c1c0f40
logs: use explicit frame-type-check (#48940) 2022-05-16 13:38:05 +02:00
Gábor Farkas
7b9929fffe
loki: framing_test: more infinity/nan test cases (#48855) 2022-05-09 11:47:50 +00:00
Gábor Farkas
da74dba7c8
Loki: backend: use streaming JSON parser, try2 (#48752)
* converter: remove __name__ customization because Loki does not do that

Loki does not handle __name__ in a special way.
for Prometheus, the caller can implement the formatting
by themselves

* converter: change labels-formatting

the labels.String() method does not handle strange values well

* loki: backend: use streaming-json parser

* more idiomatic code

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>

* simpler row-length check

* simpler code

* fixed converter/prom tests

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2022-05-05 13:09:01 +02:00
Gábor Farkas
02aa1cd1c5
loki backend mode forward-oauth (#48401)
* loki: backend: add forward oauth credentials functionality

* removed obsolete comment
2022-05-05 12:42:50 +02:00
Gábor Farkas
3cade2f669
Revert "Loki: backend: use streaming JSON parser (#47656)" (#48747)
This reverts commit 46b40b6e82.
2022-05-05 12:02:53 +02:00
Gábor Farkas
46b40b6e82
Loki: backend: use streaming JSON parser (#47656)
* converter: remove __name__ customization because Loki does not do that

Loki does not handle __name__ in a special way.
for Prometheus, the caller can implement the formatting
by themselves

* converter: change labels-formatting

the labels.String() method does not handle strange values well

* loki: backend: use streaming-json parser

* more idiomatic code

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>

* simpler row-length check

* simpler code

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2022-05-05 08:47:40 +02:00
Gábor Farkas
7d369a1dea
Loki: backend: use json-field (#48486)
* fixed strings

* loki: backend: use json-field
2022-05-03 08:03:25 +02:00
Gábor Farkas
62cd722726
Loki: minor backend-dataframe-format changes (#48320)
* loki: backend: better dataframe field names

* loki: backend: add dataframe-type to metric dataframes

* loki: backend: only add stats to the first metric dataframe
2022-04-29 09:04:37 +02:00
Gábor Farkas
ae926c2144
loki: better resource-call urls (#48250) 2022-04-28 14:28:57 +02:00
Gábor Farkas
c73b9d1818
Loki: do not use the old labels-api (#48185)
* loki: do not use old labels-api

* adjust allowed-url-list

* fixed tests
2022-04-26 11:51:26 +02:00
Gábor Farkas
d8a754c4a0
loki: send metadata requests through backend (#48063) 2022-04-25 13:16:14 +02:00
Gábor Farkas
79c06fdddc
Loki: add backend-forward mode to queries, update log-row-context (#47726)
* loki: add helper function to sort dataframe by time

* loki: add direction-attribute to queries

* loki: make log-row-context code backward-compatible

* better comment

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

* fixed test

* simplified code

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-04-20 13:52:15 +02:00
ying-jeanne
7ddae870e7
fix status code 200 (#47818) 2022-04-15 08:01:58 -04:00
Gábor Farkas
d95468a4bb
Loki: use millisecond-steps (#47572)
* loki: use millisecond-steps

* better comment

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

* better comment

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-04-12 12:30:39 +02:00
Gábor Farkas
68511e7712
loki: use single-dataframe format on the backend (#47069) 2022-04-12 11:58:48 +02:00
Gábor Farkas
96987ac182
loki: add test to handle __name__ (#47298) 2022-04-05 11:56:54 +02:00
Gábor Farkas
a246381879
loki: backend-mode: add stats support (#46526)
* loki: backend-mode: add stats support

* refactor: rename variable
2022-03-31 17:50:27 +02:00
Gábor Farkas
c4404982dc
loki: backend-mode: add nanosecond-timestamps (#45963) 2022-03-04 09:42:18 +01:00
Ryan McKinley
796bc27f75
Loki: support live streaming (#42804) 2022-03-01 14:46:52 -08:00
Gábor Farkas
1cad35ea67
loki: backend mode: support all query types (#45619)
* loki: backend mode: support all query types

* loki: backend: adjust vector-parsing field-names

* loki: backend: no interval for streams-dataframes

* loki: backend: enable more query types

* better variable name

* removed unnecessary code

* improve frame-processing

* more unit tests

* improved code

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

* remove unused code

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

* simplify code

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

* lint fix

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-02-25 09:14:17 +01:00
Gábor Farkas
5d704fd46e
Loki: backend: use custom http code (#44643)
* Loki: backend: use custom http code

* simplfied comment

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-02-18 14:35:39 +01:00
Torkel Ödegaard
a757a57c6e
Prometheus: Show executed query in inspector (#45362)
* Prometheus: Show executed query in inspector

* Loki: Improving test
2022-02-15 15:02:03 +01:00
Gábor Farkas
96ae44ee2c
loki: alerting: do not round timestamps to seconds (#45057) 2022-02-10 12:53:46 +01:00
Gábor Farkas
d9d1f8520e
loki: backend-queries: set interval-value in dataframe (#44965)
* loki: backend-queries: set interval-value in dataframe

* fixed unit test

* added interval-specific unit test
2022-02-07 13:02:04 +01:00
Gábor Farkas
3873c5e7b5
loki: alerting: better error-handling (#44700) 2022-02-01 13:34:03 +01:00
Gábor Farkas
6e071d030f
loki: added benchmark for metric-response processing (#44539) 2022-01-28 09:44:57 +01:00
Gábor Farkas
b42161a713
Loki: add from JSON to dataframes tests (#44375)
* Loki: add from JSON to dataframes tests

* fixed wrong content-type

* added -Inf test-case
2022-01-27 12:43:44 +01:00
Will Browne
7fbc7d019a
Plugins: Core plugins register via backend factory provider (#43171)
* refactoring store interface and init flow

* fix import

* fix linter

* refactor resource calling

* load with class

* re-order args

* fix tests

* fix linter

* remove old creator

* add custom config struct

* fix some tests

* cleanup

* fix

* tackle plugins

* fix linter

* refactor and fix test

* add connect failure error

* add fix for azure, cloud monitoring and test data

* restructure

* remove unused err

* add fake tracer for test

* fix grafana ds plugin
2022-01-20 18:16:22 +01:00
idafurjes
30aa24a183
Chore: Implement OpenTelemtry in Grafana (#42674)
* Separate Tracer interface to TracerService and Tracer

* Fix lint

* Fix:Make it possible to start spans for both opentracing and opentelemetry in ds proxy

* Add span methods, use span interface for rest of tracing

* Fix logs in tracing

* Fix tests that are related to tracing

* Fix resourcepermissions test

* Fix some tests

* Fix more tests

* Add TracingService to wire cli runner

* Remove GlobalTracer from bus

* Renaming test function

* Remove GlobalTracer from TSDB

* Replace GlobalTracer in api

* Adjust tests to the InitializeForTests func

* Remove GlobalTracer from services

* Remove GlobalTracer

* Remove bus.NewTest

* Remove Tracer interface

* Add InitializeForBus

* Simplify tests

* Clean up tests

* Rename TracerService to Tracer

* Update pkg/middleware/request_tracing.go

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* Initialize tracer before passing it to SQLStore initialization in commands

* Remove tests for opentracing

* Set span attributes correctly, remove unnecessary trace initiliazation form test

* Add tracer instance to newSQLStore

* Fix changes due to rebase

* Add modified tracing middleware test

* Fix opentracing implementation tags

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-01-20 11:10:12 +01:00
Ryan McKinley
546818819b
Loki: use queryType rather than range|instant flags (#43727) 2022-01-07 10:00:11 -08:00
Will Browne
e4ba5f17dd
add core plugins thru store (#43085) 2021-12-14 15:22:40 +01:00
Gábor Farkas
a4cc1f6b39
loki: alerting: handle curly-braces-style variables (#42933) 2021-12-09 15:16:01 +01:00
Gábor Farkas
3232ae08c0
loki: removed unused variable (#42909) 2021-12-09 13:16:52 +01:00
Gábor Farkas
6686f8c345
loki: rename ResponseModel to QueryModel (#42794) 2021-12-07 07:57:52 +01:00
Gábor Farkas
24d4c8a9d1
Loki: alerting: handle variables like __interval and __range (#42126) 2021-11-24 16:56:53 +01:00
Gábor Farkas
fe84454bb0
loki: alerting: simplified config (#42147)
* loki: alerting: simplified config

* adjusted config handling
2021-11-24 11:52:33 +01:00