28 Commits

Author SHA1 Message Date
dd5c545df9 Loki: Remove lokiStructuredMetadata feature toggle (#107292)
Loki: Remove lokiStructuredMetadata feature toggle
2025-06-30 16:09:44 +02:00
b544b8afff Loki: Fix a bug when reading frames without values but warnings (#97197)
* Loki: Fix a bug when reading frames without values but warnings

* Loki: Better bail if fields are less than 2
2024-11-29 15:34:59 +01:00
d2b6960593 Feature toggles: remove lokiMetricDataplane (#97024)
* Feature toggles: remove lokiMetricDataplane

* Framing: remove test cases expecting metricDataplane to be false

* Remove test code

* Chore: rename test cases
2024-11-26 18:32:17 +02:00
288b06b64c Loki: Replace imports of infra/log with SDK (#84336) 2024-03-20 11:25:35 +02:00
e1aa8a95d9 Loki: Fix bug duplicating parsed labels across multiple log lines (#80292) 2024-01-11 15:09:13 +01:00
3dc7cfdc18 Loki: Implement error source (#80143) 2024-01-08 18:32:16 +01:00
a01f8c5b42 Loki: Add backend functionality to parse structured metadata from Loki (#77361)
* prepare backend for structured metadata

* add `lokiStructuredMetadata` feature toggle

* use `lokiStructuredMetadata` feature flag

* add field type check to `labelTypesField`

* remove fixme

* fix feature toggle

* add field in dataplane mode

* use `data.Labels` where possible

* adjust framing tests

* improve verbiage

* improve naming

* update tests to "attributes"
2023-11-16 17:06:14 +01:00
8cd8eb7882 Revert "Loki: Add error source to DataQuery (#77876)" (#78006)
This reverts commit 934456dc1cf6a108765508138fcd9e36334ecbba.
2023-11-10 17:03:59 +01:00
934456dc1c Loki: Add error source to DataQuery (#77876)
* Loki: Add error source to DataQuery

* Create middlewares to fix healtcheck test

* Add comment for errors from ReadPrometheusStyleResult
2023-11-10 10:26:56 +01:00
727c83d562 Loki: Improve error logging in case statusCode is not 200 (#75075)
* improve loki logging

* fix error log

* fix logger arg
2023-09-19 11:11:27 +02:00
e045860fbf loki: generate dataplane-compliant logs dataframes (behind feature flag) (#69909)
* add feature flag

* prepare tests

* enable dataplane-format in loki-backend
2023-07-13 09:58:00 +02:00
531caec602 Loki: Add feature flag to enable dataplane-compliant metric frames (#66017)
* loki: add feature flag to enable dataplane-compatible metric frames

* linter fix
2023-04-13 15:07:08 +02:00
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
395e443932 loki: Fix adding refId to rowId (#53932) 2022-08-22 13:09:33 +02:00
46eec85b1a loki: better handle an empty-response (#52397) 2022-07-19 08:13:38 +02:00
fd63ed540f loki: fix bug in labels framing (#51015) 2022-06-17 12:50:10 +02:00
64d93498de Chore: Update grafana-plugin-sdk-go to v0.136.0 (#50127) 2022-06-03 08:25:52 -04:00
78e22aac59 loki: backend: better error-handling-tests (#49213) 2022-05-19 14:26:40 +02:00
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
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
7ddae870e7 fix status code 200 (#47818) 2022-04-15 08:01:58 -04:00
96987ac182 loki: add test to handle __name__ (#47298) 2022-04-05 11:56:54 +02:00
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
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
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
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
96ae44ee2c loki: alerting: do not round timestamps to seconds (#45057) 2022-02-10 12:53:46 +01:00
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