Carl Bergquist
c7b6822a5e
Loki: Apply scopes to expression if feature toggle is enabled. ( #95917 )
...
Signed-off-by: bergquist <carl.bergquist@gmail.com>
Co-authored-by: Kyle Brandt <kyle@grafana.com>
2024-11-11 12:53:24 +01:00
Matias Chomicki
2573cbec08
Loki: Added support to split queries by stream shard ( #94245 )
...
* Add shard query splitting implementation
* Shard query splitting: reuse function from query splitting
* Shard query splitting: remove max line limit
* Shard query splitting: update test
* Shard query splitting: fix types and non-sharded queries
* Merge responses: fix log merging
* Merge responses: remove legacy code
* Query splitting: add support to retry failed requests
* Query splitting: unit test request retrying
* Query splitting: add unsubscriptions
* Shard query splitting: fix retrying
* Shard query splitting: switch to dynamic grouping
* Shard query splitting: update group size thresholds and fix -1 query
* Shard query splitting: update initial group size + don't retry parse errors
* Shard query splitting: update unit test
* chore: update mock value
* Shard query splitting: add support for multiple targets
* chore: update description
* Shard query splitting: use group targets
* chore: filter hidden queries
* Shard query splitting: issue initial log query without sharding
* Splitting: fix retrying in both methods
* Merge responses: keep execution time
* Shard query splitting: remove no-shard attempt
* Shard query splitting: adjust groups based on rate of change
* chore: clean up experiments
* Shard query splittng: remove log query restrictions
* Shard query splitting: remove fallback to time splitting
* Loki: add new query direction
* Missing generated file
* LokiOptionField: integrate new query direction
* Shard query splitting: delegate non-scan queries to time splitting
* Query splitting: do not retry queries with parse errors
* Loki datasource: add placeholder for feature flag
* Shard query splitting: add function with support criteria
* Shard query splitting: refactor query modification and shard logs volume
* Shard query splitting: update unit tests
* chore: Update scan direction tooltip
* chore: formatting
* LogsVolumePanel: fix missing state in logs volume panel data
* Merge responses: better handle missing nanoseconds
* LokiQueryOptionFields: display query direction for log queries
* loki: process scan direction as backward
* Loki datasource: restrict sharding to Explore
* Retrying: invert criteria and move to response utils
* Formatting
* Use log volume refId constant
* Fix import order
* Create feature flag
* Use feature toggle
* LogsVolumePanel: prevent flashing no data while streaming
2024-10-23 14:21:03 +03:00
Sven Grossmann
9a8ae3c932
Loki: Support custom X-Query-Tags
header ( #85123 )
...
* Loki: Support custom `X-Query-Tags` header
* add comment
2024-03-26 13:08:09 +02:00
Selene
473898e47c
Core: Remove thema and kindsys dependencies ( #84499 )
...
* Move some thema code inside grafana
* Use new codegen instead of thema for core kinds
* Replace TS generator
* Use new generator for go types
* Remove thema from oapi generator
* Remove thema from generators
* Don't use kindsys/thema for core kinds
* Remove kindsys/thema from plugins
* Remove last thema related
* Remove most of cuectx and move utils_ts into codegen. It also deletes wire dependency
* Merge plugins generators
* Delete thema dependency 🎉
* Fix CODEOWNERS
* Fix package name
* Fix TS output names
* More path fixes
* Fix mod codeowners
* Use original plugin's name
* Remove kindsys dependency 🎉
* Modify oapi schema and create an apply function to fix elasticsearch errors
* cue.mod was deleted by mistake
* Fix TS panels
* sort imports
* Fixing elasticsearch output
* Downgrade oapi-codegen library
* Update output ts files
* More fixes
* Restore old elasticsearch generated file and skip its generation. Remove core imports into plugins
* More lint fixes
* Add codeowners
* restore embed.go file
* Fix embed.go
2024-03-21 11:11:29 +01:00
ismail simsek
b0dfeb1911
Chore: Clean up intervalv2 functions ( #82074 )
...
* clean up intervalv2 functions
* use roundInterval from grafana-plugin-sdk-go
* use from grafana-plugin-sdk-go
* have intervalv2 in publicdashboards and remove tsdb/intervalv2
* legacydata cleanup
* remove unused variables
* Update pkg/tsdb/legacydata/interval/interval.go
Co-authored-by: Arati R. <33031346+suntala@users.noreply.github.com>
---------
Co-authored-by: Arati R. <33031346+suntala@users.noreply.github.com>
2024-02-09 11:39:21 +01:00
Matias Chomicki
5486a111e6
parseSupportingQueryType: add missing case for infinite scroll ( #81492 )
2024-01-29 18:12:03 +02:00
Ivana Huckova
7bb0ff7055
Loki: Introduce $__auto
range variable for metric queries ( #72690 )
...
* Loki: Add interpolation to backend
* Loki: Replace default variable with in frontend
* Loki: Update docs in query builder fro __auto
* Loki: Update test for change default __auto
* Loki: Remove and from suggestions as should be used
* Update docs
* Update pkg/tsdb/loki/parse_query.go
* Fix backend lint
* Fix lint and test
* Update
* Update docs/sources/datasources/loki/template-variables/index.md
Co-authored-by: lwandz13 <126723338+lwandz13@users.noreply.github.com>
* Update public/app/plugins/datasource/loki/querybuilder/operationUtils.ts
Co-authored-by: Matias Chomicki <matyax@gmail.com>
---------
Co-authored-by: lwandz13 <126723338+lwandz13@users.noreply.github.com>
Co-authored-by: Matias Chomicki <matyax@gmail.com>
2023-08-03 16:27:23 +02:00
Ivana Huckova
82c125d450
Loki: Implement step editor ( #69648 )
...
* Loki: Implement step editor
* Update to keep value
* Remove console.log
* Remove white space
* Update public/app/plugins/datasource/loki/querybuilder/components/LokiQueryBuilderOptions.tsx
Co-authored-by: Matias Chomicki <matyax@gmail.com>
* Import trim
* Update using of step in split queries
* Add tests
* Add tests
* Remove step interpolation
---------
Co-authored-by: Matias Chomicki <matyax@gmail.com>
2023-06-16 19:08:29 +03:00
Gábor Farkas
48a374f50b
loki: implement schema for loki query ( #62114 )
...
* loki: implement schema for loki query
* removed forgotten code
* better types
* adjust cue-maturity-level
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* sync docs to schema change
* removed forgotten go code
* updated schema docs
Co-authored-by: J Stickler <julie.stickler@grafana.com>
* updated schema docs
Co-authored-by: J Stickler <julie.stickler@grafana.com>
* update schema docs
Co-authored-by: J Stickler <julie.stickler@grafana.com>
* update schema docs
Co-authored-by: J Stickler <julie.stickler@grafana.com>
* updated schema docs
Co-authored-by: J Stickler <julie.stickler@grafana.com>
* updated schema docs
* add documentation to the resolution field
* move direction-field to schema
* loki: cue: moved deprecated fields to the bottom
---------
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
Co-authored-by: J Stickler <julie.stickler@grafana.com>
2023-02-02 16:18:30 +00:00
Serge Zaitsev
0bf4093005
Chore: Fix goimports grouping ( #62428 )
...
* fix goimports order
* fix goimports order
2023-01-30 08:50:27 +00:00
Ivana Huckova
d0e95f8c95
Loki: Add X-Query-Tags header for logs sample and data sample ( #62333 )
2023-01-27 16:41:40 +01: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
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
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