Commit Graph

2185 Commits

Author SHA1 Message Date
Marcus Efraimsson
0128d0403f
Tracing: Use tracing.InitializeTracerForTest (#75479) 2023-09-27 09:51:57 +02:00
Andres Martinez Gotor
c129c0cd39
Chore: Allow to compile testdata backend as a plugin (#75360) 2023-09-26 15:30:25 +02:00
Sijmen
60922e5f77
Cloudwatch: Add missing AWS regions (#75392) 2023-09-25 17:13:46 -04:00
Sarah Zinger
ef441f02d0
Cloudwatch: Fix Unexpected error (#74420)
Fix unexpected error when creating a new cloudwatch datasource.

Involves a fair amount of refactoring, so if this causes unexpected issues related to region fetching we can turn this off with the cloudwatchNewRegionsHandler feature toggle, although we do not predict it will so we are enabling it to default to true and hope to remove it shortly.
2023-09-25 14:19:12 -04:00
ismail simsek
a64bfdfb94
InfluxDB SQL: Provide raw query preview for query history (#75030)
* log the sql query

* render the raw sql

* Update rawQuery

* unit tests
2023-09-22 17:40:18 +02:00
Andres Martinez Gotor
c70623fb85
Chore: Rename testdata plugin with a fully qualified name (#75104) 2023-09-22 15:00:40 +03:00
Will Browne
7fca1bde54
Plugins: Set grafana config, plugin version and user agent on plugin requests (#75171)
* first pass

* fixup

* remove test line

* fix tests

* use new fields

* fix imports + formatting

* fix tests

* rollback changes

* undo whitespace

* apply pr feedback
2023-09-21 11:33:31 +02:00
Andres Martinez Gotor
dd8f88b194
Chore: Remove lint exceptions from testdata backend (#75148) 2023-09-21 10:39:28 +02:00
Andrej Ocenas
15e54df9f2
Pyroscope: Remove "phlare" from variable, types, strings etc (#75140) 2023-09-20 16:31:22 +02:00
Deepali Gupta
b54e4c0ddb
Chore: Update metrics for AWS/MediaConnect (#74946) 2023-09-19 13:35:16 -04:00
Travis Patterson
98aa7db64a
Loki: Run queries in parallel behind lokiRunQueriesInParallel feature toggle (#74064)
* issue loki queries in parallel so total query time is only the slowest query rather than the sum of all query times.

* Fix lint

* Add running of queries in parallel behind feature toggle to test the functonality before release

* Add span end

* Move shared logic to separate function

* Add logging and tracing around running of all queries

---------

Co-authored-by: Ivana Huckova <ivana.huckova@gmail.com>
2023-09-19 12:34:01 +03:00
Sven Grossmann
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
Andrej Ocenas
f7aab06e23
Pyroscope: Remove support for old pyroscope (#74683) 2023-09-19 10:09:28 +02:00
Andreas Christou
b779ce5687
AzureMonitor: Improve Log Analytics query efficiency (#74675)
* Promisify loading schema

- Move schema loading to LogsQueryEditor
- Improve typing
- Switch callbacks to promises

* Update types

* Refactor backend for new props

- Rename intersectTime
- Support setting timeColumn
- Add additional properties to logs request body

* Update applyTemplateVariables

* Update set functions

* Add new TimeManagement component

* Update LogsQueryEditor

* Hardcode timestamp column for traces queries

* Ensure timeColumn is always set for log queries

* Update tests

* Update frontend tests

* Readd type to make migration easier

* Add migration

* Add fake schema

* Use predefined type

* Update checks and defaults

* Add tests

* README updates

* README update

* Type update

* Lint

* More linting and type fixing

* Error silently

* More linting and typing

* Update betterer

* Update test

* Simplify default column setting

* Fix default column setting

* Add tracking

* Review

- Fix typo on comment
- Destructure and remove type assertion
- Break out await into two variables
- Remove lets and rename variable for clarity
2023-09-18 18:38:39 +01:00
Ivana Huckova
4f0b31d21b
Elasticsearch: Add tracing to data source (#74750)
* Elasticsearch: Add tracing do data source

* Fix tests

* Address feedback

* Update pkg/tsdb/elasticsearch/response_parser.go

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>

* Update pkg/tsdb/elasticsearch/response_parser.go

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>

* Track error across both spans

* Add span for decoding of response

* Fix test

* Update setting of errors + fix test

---------

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
2023-09-18 10:49:12 +02:00
Torkel Ödegaard
401ec3c4b0
DashboardScene: Meta data tab (#74810)
* DashboardScene: Inspect meta tab

* DashboardScene: Inspect meta tab

* fix casing

* Added meta data inspector to testdata data source
2023-09-18 09:00:59 +02:00
Sven Grossmann
aaef8d3b40
Loki: Add query expression to backend logging (#74927)
add query expression to loki log
2023-09-14 17:23:02 +02:00
Andre Pereira
dc44ac7b78
Tempo: Added spss config - spans per span set (#74832)
* Added spss config - spans per span set

* Set default spss when calling Tempo
2023-09-14 10:49:18 +01:00
Isabella Siu
4b7b323061
CloudWatch Logs: Fix log query display name when used with expressions (#74497) 2023-09-13 15:04:50 -04:00
Stephanie Hingtgen
bb2f5fce07
Secure socks proxy: Allow overriding socks username (#74762) 2023-09-12 13:07:41 -06:00
Andrew Hackmann
c8a0ebe0e8
Azure Monitor/body close logs an error bug (#74632)
on body close causes logs an error even if no error. also changed to warning similar to the rest of grafana
2023-09-11 09:02:44 -05:00
Will Browne
e855efb13d
Plugins: Move store and plugin dto to pluginsintegration (#74655)
move store and plugin dto
2023-09-11 13:59:24 +02:00
ismail simsek
3107459e57
Prometheus: Handle the response with different field key order (#74567)
* Handle the response with different field key order

* More unit tests to cover edge cases

* Cover more edge cases

* make it simpler

* Better test inputs
2023-09-08 19:58:05 +02:00
Ivana Huckova
49bd93aa2b
Elasticsearch: Adjust logging to follow convention (#74554)
* Elasticsearch: Adjust naming in logging according to convention

* Log response parsing per response

* Update

* Fix logging of errors when no response

* Add path to error loggigng

* Update pkg/tsdb/elasticsearch/response_parser.go
2023-09-07 18:15:24 +02:00
Sven Grossmann
d14851c877
Loki: Adjust to logging convention (#74531)
* adjust Loki to logging convention

* Fix call resource logging

* Update dataquery

* Update

* Remove redundant logging

* Fix TODO

* Rename action to stage and use variables

* `resp` might be `nil`

* `resp` might be `nil` here as well

* change to `statusCode`

* use correct logger

* also here

* add query information to logging

---------

Co-authored-by: Ivana Huckova <ivana.huckova@gmail.com>
2023-09-07 17:09:24 +02:00
Ivana Huckova
408d0265ce
Elasticsearch: Improve backend instrumentation of CallResource calls (#74530)
Elasticsearch: Improve backend instrumentation of  calls
2023-09-07 13:54:31 +02:00
Ivana Huckova
51391a762b
Elasticsearch: Improve backend instrumentation of QueryData calls (#74172)
* Elasticsearch: Improve backend instrumentation of QueryData calls

* Add fromAlert

* Fix tests, move logger and context to struct

* Add instrumentation for processing response

* Move log for sending request closer to sending request

* Update

* Fix logging, improved messages, fix printing of queries

* Update log text

* Fix tests

* Fix lint

* Update logging to follow our guidelines

* Remove key-value pairs from logs that are going to be passed from instrumentation

* Update pkg/tsdb/elasticsearch/elasticsearch.go
2023-09-07 13:54:16 +02:00
jordanefillatre
b8b5d2fed8
CloudWatch: Add AWS/S3 replication metrics (#74416) (#74418)
Co-authored-by: Isabella Siu <sakurablossom@blueblueworld.com>
2023-09-06 15:10:17 -04:00
Oscar Kilhed
579709c7a6
MSSQL: Add support for MI authentication to MSSQL (#73597)
* Add support for MI authentication to MSSQL

This adds support for managed identity authentication for MSSQL managed
instances running in Azure.

Co-authored-by: baldm0mma <jev.forsberg@grafana.com>
2023-09-06 18:27:19 +02:00
Andrew Hackmann
41ca13418b
AzureMonitor: Remove infra client (#74113)
remove infra client from azure monitor
2023-09-05 09:00:21 -05:00
Sven Grossmann
a403027608
Loki: Add backend healthcheck (#74330)
* add loki healthcheck

* remove `testDatasource` call

* remove unused error check

* change success message

* improve error messages
2023-09-05 08:59:13 +02:00
Serge Zaitsev
93cdc94a94
Chore: capitalise logs in other backend packages (#74344)
* capitalise logs in observability logs

* capitalise oss-bit-tent packages

* capitalise logs in aws-datasources

* capitalise logs for traces and profiling

* capitalise logs for partner datasources

* capitalise logs in plugins platform

* capitalise logs for observability metrics
2023-09-04 22:25:43 +02:00
Sven Grossmann
056c83c788
Loki: Improve backend instrumentation of CallResource calls (#73899)
* instrument call resource

* capitalize log messages
2023-09-01 15:26:25 +02:00
Tristan
b0897d7b36
CloudWatch: Add additional AWS/Firehose metrics for DynamicPartitioning support (#74237) 2023-09-01 09:21:14 -04:00
Sven Grossmann
124f445db0
Loki: Improve backend instrumentation of QueryData calls (#73807)
* improve loki `queryData` instrumentation

* fix lint

* use correct logger in "queryData"

* capitalize log messages

* distinguish between requests from alerting
2023-09-01 11:44:18 +02:00
Sarah Zinger
34a831c83e
Cloudwatch: Add back support for old Log Group picker (#73524)
Cloudwatch: Add back support for old Log Group picker behind feature toggle. 

Fixes issue for aws gov cloud users
2023-08-31 10:13:24 -04:00
Ryan McKinley
025b2f3011
Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
Andrew Hackmann
2a835301c3
Azure Monitor: Remove infra logger (#73652)
* removed infra logs

* improve health check

* remove debug and error logs

* feedback

* Update pkg/tsdb/azuremonitor/azuremonitor-resource-handler.go

* Update pkg/tsdb/azuremonitor/loganalytics/azure-log-analytics-datasource.go

* fix close body error

* update test

* resource request should return errors

* go linter

* go linter
2023-08-30 08:39:31 -05:00
ismail simsek
29ea0886e3
InfluxDB: Fix sending retention policy with the backend request (#72763)
* Add retention policy to the request

* refactor

* refactor influxql query flow

* fix healthcheck

* organize imports

* handle queries separately

* fix tests

* update bench test
2023-08-30 12:42:02 +02:00
Gelldur
9e1eab3d70
CloudWatch: Add missing region Middle East (UAE) me-central-1 (#73560)
Add missing region Middle East (UAE) me-central-1
2023-08-29 14:41:57 +02:00
ismail simsek
cfe3d6346f
Chore: Fix the command in comments (#73872)
Fix the command in comments
2023-08-28 17:47:54 +02:00
Ivana Huckova
a80fd02f95
Elasticsearch: Unify default value for geo hash grid precision across the code to 3 (#73922)
* Unify default value

* Use variable to keep default precisions in sync

* Use default precision variable

* Update precision description

* Update defaultPrecisionString and move

* Be more specific in naming of variabkle

* Revert "Merge remote-tracking branch 'origin' into ivana/es-precision-default-value"

This reverts commit 599f236a77, reversing
changes made to 6742be0c6d.

* Revert wrong merge

* Revert wrong merge with turned off lefthook
2023-08-28 16:38:44 +02:00
Joey
59e4c257bb
Tempo: Metrics summary (#73201)
* Metrics summary

* Update query

* Remove colors

* Update states

* Add group by into its own component

* Add group by to search and traceql tabs

* Add spacing for group by

* Update span kind values

* Update span status code values

* Update query based on target + group by

* Cleanup

* Only add targetQuery if not empty

* Add kind=server to table

* Update groupBy query logic

* Add feature toggle

* Use feature toggle

* Self review

* Update target query

* Make gen-cue

* Tweak query

* Update states

* useRef for onChange

* Fix for steaming in search tab

* Add loading state tests

* metricsSummary tests

* Datasource tests

* Review updates

* Update aria-label

* Update test

* Simplify response state

* More manual testing and feedback from sync call

* Prettier and fix test

* Remove group by component from traceql tab

* Cleanup, tests, error messages

* Add feature tracking
2023-08-28 15:02:12 +01:00
Ivana Huckova
6742be0c6d
Elasticsearch: Fix respecting of precision in geo hash grid (#73917)
* Elasticsearch: Fix ignoring precision when running queries trough backend

* Unify default value

* Revert "Unify default value"

This reverts commit d8e1d207a2.

* Update test
2023-08-28 15:28:28 +02:00
Kyle Brandt
38603b1a9e
Prometheus: Check for errors on json response parsing (#73788)
- The util/converter Prometheus response json parse was not checking for errors while parsing. It now does. In particular, if `[dataproxy]/response_limit` is set in Grafana's config, it will now recognize the limit error.
- Fixes #73747
- Adds `jsonitere` package, which wraps json-iterator/go's Iterator's Methods with methods that return errors, so errcheck linting can be relied upon
- Impact:
  - If something was sending malformed JSON to the prometheus or loki datasources, the previous code might have accepted that and partially processed the data
  - Before there may have been partial data with no error, where as no there may be errors but they will have no partial results, just the error.
2023-08-28 15:53:50 +03:00
Andres Martinez Gotor
aa0d4b3e45
Chore: Fix Random Walk scenario for Grafana DS (#73889) 2023-08-28 10:53:30 +02:00
Owen Williams
7b347fd12a
Prometheus: Add $__rate_interval_ms to go along with $__interval_ms (#69582)
* Add $__rate_interval_ms to go along with $__interval_ms

Fixes https://github.com/grafana/grafana/issues/69581

* update doc

* PoC add rate_interval_ms as rate range in prometheus

* Revert "PoC add rate_interval_ms as rate range in prometheus"

This reverts commit 7d4ec700d7.

* Update docs/sources/dashboards/variables/add-template-variables/index.md

grammar nit

Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>

* Update docs/sources/dashboards/variables/add-template-variables/index.md

---------

Co-authored-by: Galen <galen.kistler@grafana.com>
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
2023-08-27 16:44:58 +02:00
Kyle Brandt
6d8fc42cdd
Prometheus: (Chore) Remove experimental unshipped prometheusWideSerie… (#73751) 2023-08-24 17:47:19 +03:00
Kyle Brandt
fe774415b5
Prometheus: Add ExecutedQueryString to first frame only (#73678) 2023-08-23 11:56:19 -04:00
Marcus Efraimsson
040b7d2571
Chore: Add errutils helpers (#73577)
Add helpers for the errutil package in favor of errutil.NewBase.
2023-08-22 12:52:24 +02:00
Andrew Hackmann
42f4306251
Google Cloud Monitor: Prom query editor (#73503)
* revert

* works but needs clean up and tests

* clean up

* remove any

* change confusing query var to expr

* oops

* add test

* lint

* cleanup

* update docs

* Update public/app/plugins/datasource/cloud-monitoring/components/PromQLEditor.tsx

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>

* nit

* lint fix?

* remove comment from cue

* go linter

* removing parsing stuff parseresponse func

---------

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2023-08-18 11:14:43 -05:00
Andrej Ocenas
3aae7b089e
Tempo: Fix [object Object] shown as an Event message in Trace view (#73473)
Remove the wrapper json value
2023-08-18 14:26:35 +02:00
Sven Grossmann
4c9469fc9e
Elastic: Add id field to Elastic responses to allow permalinking (#73382)
* add `id` field to elasticsearch

* add comment

* slightly better perf

* only add `id` to logs frames

* only add `id` for logs responses

* concat `index` and `id`

* change snapshot generation to false

* use better loop

* fix tests

* moved up
2023-08-18 11:39:58 +02:00
Isabella Siu
870ef7b058
CloudWatch Logs: Wrap sync error from executeGetQueryResults (#73252) 2023-08-15 17:31:55 -04:00
Cian
9c51eaf88d
CloudWatch: Add missing AppFlow metrics (#73149) 2023-08-15 09:45:05 -04:00
Sarah Zinger
09d5483c6c
Cloudwatch: Upgrade aws-sdk and display external ids for temporary credentials (#72821)
(under a feature toggle, not yet ready for public testing)
2023-08-14 13:42:30 -04:00
Andreas Christou
95546551bc
AzureMonitor: Allow serviceTags and tags to be empty for trace results (#73145)
Allow serviceTags and tags to be empty
2023-08-11 13:13:19 +01:00
ismail simsek
1ac9e7eaab
InfluxDB: Fix handling flux response with no time and value column (#72833)
* Upgrade the influxdb-client-go version

* Handle flux response with no time and value column
2023-08-08 15:00:52 +02:00
Sven Grossmann
703f4be15d
Loki: Fix wrong context being passed to HTTP client (#72991)
use new context containing tracing information
2023-08-08 10:24:07 +02:00
Andrew Hackmann
a31d05980c
AzureMonitor: Check to see if response is nil to prevent panic (#72705)
* check to see if response is nil to prevent panic

* make function more go

* logging error and moving on

* lint
2023-08-03 16:48:56 -05:00
Ida Štambuk
abff6e20e9
Cloudwatch Logs: Set Alerting timeout to datasource config's logsTimeout (#72611) 2023-08-03 19:35:30 +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
ismail simsek
d333c09418
InfluxDB: SQL Query Editor (#72168)
* Add influxdbSqlSupport feature toggle

* Add SQL option to the config page

* Add SQL backend

* Add metadata support in config page

* Implement unified querying

* Fix healthcheck query

* fsql tests

* secure grpc by default

* code cleanup

* Query handing for sql mode

* Implement a placeholder sql editor

* Fix query language dropdown

* drop in SQL editor

* switch to use rawSql, get sql editor working

* fix healthcheck

* WIP

* memoize component to stop unwanted rerender onQuery

* dont reinit datasource on each render of the editor

* remove useless memo

* clean up

* Fix the link

* Alpha state warning

* Remove console.logs

* update model for fsql

* remove unused

---------

Co-authored-by: Galen <galen.kistler@grafana.com>
2023-08-02 19:04:16 +02:00
ismail simsek
77e7ae2a1b
InfluxDB: SQL Support (#72167)
* Add influxdbSqlSupport feature toggle

* Add SQL option to the config page

* Add SQL backend

* Add metadata support in config page

* Implement unified querying

* Fix healthcheck query

* fsql tests

* secure grpc by default

* code cleanup

* Query handing for sql mode

* Implement a placeholder sql editor

* Fix query language dropdown

* go mod updates

* make lint-go

* more make lint-go

* remove unused runQuery

* switch statements with default case

* linting again
2023-08-02 18:27:43 +02:00
Andrej Ocenas
91c7096eda
Flamegraph: Diff profile support (#72383) 2023-08-01 16:08:46 +02:00
Alyssa Bull
adc3735122
Google Cloud Monitor: Use generated type from schema in backend (#67879) 2023-07-31 11:14:27 -06:00
Andre Pereira
89092a1e69
Tempo: Use feature toggle to control TraceQL streaming (#72288)
Rename traceql streaming feature toggle. Remove the manual toggle from Options component and use the feature toggle
2023-07-26 13:33:16 +00:00
Andre Pereira
bd59a27b99
Tempo: Remove traceqlSearch feature toggle (#72029)
* Remove feature flag from registry.go

* Remove usages of toggle

* Refactor and cleanup Tempo's query field components

* Added deprecation alert

* Mark nativeSearch fields as deprecated

* Also show deprecated search tab if queryType is nativeSearch

* Update deprecation message to list grafana version

* Fix merge conflict

* Remove mention of toggle from docs
2023-07-24 16:26:10 +01:00
Kyle Brandt
ee60d8c82d
Azure: AzureMonitorMetrics - change response to be dataplane compliant (#69308)
* Azure: AzureMonitorMetrics - change response to be dataplane compliant
can be disabled via toggle azureMonitorDataplane
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2023-07-24 16:50:49 +03:00
Andrej Ocenas
689d9ed430
Pyroscope: Fix panic on query when symbol names are repeating (#72188)
Use EnumItemIndex type in values map
2023-07-24 13:06:38 +02:00
Andreas Christou
c4d6509145
CloudMonitoring: Correctly set title and text fields for annotations (#71888)
Correctly set title and text fields
2023-07-21 20:42:42 +00:00
Nathan Marrs
8c86a46440
Phlare: Set enum field type to enum instead of integer (#72078)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2023-07-21 13:08:23 -05:00
Andreas Christou
116e971af3
AzureMonitor: Set timespan in Logs Portal URL link (#71841)
Set timespan in Logs Portal URL link
2023-07-19 09:15:14 +01:00
Stephanie Hingtgen
4ece133fce
Secure socks proxy: use Grafana Plugin SDK (#71616) 2023-07-18 15:23:02 -06:00
Charandas
614f1af190
Tempo: remove deprecated model package usage (remove replace) (#71687)
* Tempo: remove deprecated model package usage (remove replace)

* fix root test
2023-07-18 19:30:29 +03:00
Andres Martinez Gotor
5b2721b4f1
Chore: Add linter rule to avoid imports from Grafana core in test datasource (#71779) 2023-07-18 15:57:31 +02:00
Domas
1347d85b50
Tempo Service Map: Optionally group nodes also by service.namespace (#70803)
* tempo service map: optionally handle namespace

* undo escape attempt

* regen cue
2023-07-18 13:11:12 +03:00
Andre Pereira
72118e372c
Tempo: TraceQL streaming improvements (#71736)
* Remove unneeded log

* Add elapsed time to streaming progress table

* Use disableTraceQLStreaming toggle to determine default status of streaming
2023-07-18 12:45:35 +03:00
Andres Martinez Gotor
24eef7a3d2
Chore: Use SDK logger for test data source (#71579) 2023-07-17 16:34:08 +02:00
Andreas Christou
480ccf6e8f
AzureMonitor: Add switch to control time-range for Logs queries (#71278)
* Update types

* Update migration

- Default intersectTime property to false

* Update frontend components

- Add intersectTime field
- Update tests
- Update mocks
- Add onChange function

* Update backend

- Appropriately set intersectTime for logs queries
- intersectTime is always true for Traces queries
- Update tests

* Update docs

* Fix test and lint
2023-07-17 12:02:16 +01:00
Will Browne
a8577c21ba
Plugins: Migrate PluginStore mock to pre-existing fakes package (#71664)
* migrate to existing fakes package

* fix imports
2023-07-17 10:21:44 +00:00
Todd Treece
52121b7165
Chore: Add grafana-apiserver (#70721)
* add grafana-apiserver
* remove watchset & move provisioning and http server to background
services
* remove scheme
* otel fixes (#70874)
* remove module ProvideRegistry test
* use certgenerator from apiserver package
* Control collector/pdata from going to v1.0.0-rc8 (as Tempo 1.5.1 would have it)
2023-07-14 12:22:10 -07:00
Andre Pereira
c1709c9301
Tempo: TraceQL query response streaming (#69212)
* Refactor Tempo datasource backend to support multiple queryData types.
Added traceId query type that is set when performing the request but doesn't map to a tab.

* WIP data is reaching the frontend

* WIP

* Use channels and goroutines

* Some fixes

* Simplify backend code.
Return traces, metrics, state and error in a dataframe.
Shared state type between FE and BE.
Use getStream() instead of getQueryData()

* Handle errors in frontend

* Update Tempo and use same URL for RPC and HTTP

* Cleanup backend code

* Merge main

* Create grpc client only with host and authenticate

* Create grpc client only with host and authenticate

* Cleanup

* Add streaming to TraceQL Search tab

* Fix merge conflicts

* Added tests for processStream

* make gen-cue

* make gen-cue

* goimports

* lint

* Cleanup go.mod

* Comments

* Addressing PR comments

* Fix streaming for tracel search tab

* Added streaming kill switch as the disableTraceQLStreaming feature toggle

* Small comment

* Fix conflicts

* Correctly capture and send all errors as a DF to client

* Fix infinite error loop

* Fix merge conflicts

* Fix test

* Update deprecated import

* Fix feature toggles gen

* Fix merge conflicts
2023-07-14 15:10:46 +01:00
Kyle Brandt
fb2a57d3a3
TestData: CSV Metric Values - fix NoData (#71656)
return a valid NoData response when the input is empty
2023-07-14 15:54:11 +02:00
Shirley
c1f6b91ea9
Elasticsearch: Fix multiple max depth flatten of multi-level objects (#70302) 2023-07-14 11:48:00 +02:00
Gábor Farkas
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
Andres Martinez Gotor
9990d5025d
Chore: Embed CSV files with the test data source (#71435) 2023-07-13 09:34:40 +02:00
Andres Martinez Gotor
3dc0187b74
Chore: Remove simplejson usage from the test data source (#71332) 2023-07-11 15:13:09 +02:00
Gábor Farkas
e17540bdcd
Elasticsearch: Fix using multiple indexes with comma separated string (#71284)
* Revert "Elasticsearch: Use array of strings as index in backend queries (#67276)"

This reverts commit d0ced39847.

* updated tests
2023-07-11 09:47:16 +02:00
Galen Kistler
7dc071f46b
Prometheus: Version detect bug (#71198)
* remove redundant request copy in backend, add more versions to semver lists
2023-07-07 09:39:20 -05:00
ismail simsek
61a77b4f6b
InfluxDB: Return better error messages from backend (#70066)
Co-authored-by: ludovio <ludovic.viaud@gmail.com>
2023-07-04 13:55:08 +02:00
Andreas Christou
20b6ae96a3
AzureMonitor: Correctly build multi-resource queries for Application Insights components (#70344)
Correctly build multi-resource queries for AI components

- Add additional query property
- Validate resource URI matches correct namespace
- Set applications property if needed
- Update tests
2023-07-04 10:45:31 +01:00
ismail simsek
80c432e524
InfluxDB: Fix backend mode table result with aliases (#69943)
Co-authored-by: ludovio <ludovic.viaud@gmail.com>
2023-07-03 14:50:08 +02:00
ismail simsek
903af7e29c
InfluxDB: Backend parser compatibility with frontend parser (#69865)
* Reformatting and restructuring

* Update unit test

* Always send the default retention policy as first element

* Fix typo

* Update test

* Update test once more

* Field names start with capital letters

* Simplify the condition

* Case-insensitive checks

* Fix typo

* Update response_parser test

* Update imports
2023-06-26 14:03:02 +02:00
Andrew Hackmann
5e2ee56597
AzureMonitor: Remove subscriptions map (#70620)
remove subscription map
2023-06-23 15:38:46 -05:00
Andreas Deininger
95b1f3c875
Fixing typos (#70487) 2023-06-22 09:43:38 +01:00
Ryan McKinley
ae688adabc
TestData: Drop some percentage of CSV values from a request (#70404) 2023-06-21 13:17:10 -05:00
Joey
00ec9fceb9
Tempo: Represent OTLP Span Intrinsics correctly (#69394)
* Span intrinsics

* Update intrinsics and add to span details

* Remove intrinsics section

* Update tests

* Update status code text

* Self review

* Move previously intrinsic values to span

* Remove few methods
2023-06-21 11:39:12 +01:00
Ivana Huckova
55d18361dc
Loki: Deprecate resolution (#70326)
* Loki: Deprecate resolution and only show it if it was selected before

* Deprecate

* Fix merge, add missing brackets
2023-06-21 12:21:29 +02:00
ismail simsek
e3ea5422ea
InfluxDB: Return default retention policy from backend as first element (#69818)
* Reformatting and restructuring

* Update unit test

* Always send the default retention policy as first element

* Fix typo

* Update test

* Update test once more
2023-06-17 14:20:54 +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
Michael Mandrus
66d2214c3b
Config: Add configuration option to define custom user-facing general error message for certain error types (#70023)
---------

Co-authored-by: Summer Wollin <summer.wollin@grafana.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Arati R. <33031346+suntala@users.noreply.github.com>
2023-06-16 10:46:47 -05:00
Ross
5f4d1d4872
CloudWatch: Add missing EventBridge Pipe metrics (#69994) 2023-06-16 12:04:47 +02:00
Tania
0316350d16
Codegen: Generate any instead of interface{} (#70201)
* Chore: Update thema to latest

* Regenerate
2023-06-16 10:54:56 +02:00
Andrew Hackmann
8d37d8f60b
Azuremonitor schematize backend (#69822)
* metrics schematize

* metrics now use schemas

* logs schema

* remove unused code

* fix tests
2023-06-10 23:30:49 +03:00
Kevin Yu
387cf7ec60
CloudWatch: Add missing AWS/FSx metrics (#69816) 2023-06-08 21:44:28 +00:00
Andreas Christou
9fc1de62d5
CloudMonitoring: Improve parsing of GCM labels (#69800)
Update parsing of GCM labels

- Include parsing of metadata labels
2023-06-08 17:30:22 +01:00
Will Browne
624777258b
Plugins: Refactor creation of plugin context to dedicated service (#66451)
* first pass

* fix tests

* return errs

* change signature

* tidy

* delete unnecessary fields from test

* tidy

* fix tests

* simplify

* separate error check in API

* apply nits
2023-06-08 13:59:51 +02:00
Ludovic Viaud
bb7acf9e47
Add prometheus querydata instrumentation (#69447) 2023-06-07 13:36:03 +02:00
Andreas Christou
f7dd7c5ad8
CloudMonitoring: Remove excess logs (#69576)
Remove excess logs
2023-06-07 09:58:35 +01:00
Ryan McKinley
e17ef5e504
Pyroscope: Rename phlare to grafana-pyroscope-datasource (#68859) 2023-06-07 06:09:29 +03:00
Ivana Huckova
49c940de23
Loki: Add step parameter to Loki query (#69558) 2023-06-06 13:20:27 +02:00
George Robinson
f80463a8a9
Alerting: Add heuristics back to datasource healthchecks (#69329)
This commit adds heuristics back to datasource healthchecks as
it was removed in #66198. The healthcheck for Prometheus datasources
also returns the kind (Prometheus or Mimir) and a boolean if the
ruler is enabled or disabled.
2023-06-05 10:35:18 +01:00
Marcus Efraimsson
dcc1169ab2
Chore: Remove unused code/dependencies in testdata datasource (#69386) 2023-06-05 11:34:02 +02:00
Ryan McKinley
effe21fb65
TestData: Support labels in CSV content name (#61337)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2023-05-26 19:36:43 +03:00
enginecan
6758fd4888
MySQL: Add option to allow cleartext passwords (#63232)
* Add "Allow Cleartext Passwords" checkbox to MySQL connection settings

* Fix lint issues

* Add docs

* Add line break and bold text

---------

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2023-05-26 12:33:55 +02:00
Eng Zer Jun
7f7b03d794
Chore: Avoid unnecessary byte/string conversions (#69001)
Avoid unnecessary byte/string conversion

We can use alternative functions/methods to avoid unnecessary
byte/string conversion calls.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2023-05-26 10:08:50 +00:00
Selene
bd622a5381
Chore: Unify references for dataquery (#68963)
* Unify references for dataquery

* Fix ResultFormat in azure types

* Update azure-log with new schema

* Fix cloudwatch query

* Update thema

* Fix test

* More fixes

* More fixes

* Fix lint
2023-05-26 10:16:01 +02:00
sam boyer
323cbe1997
kindsys: Adapt to new flattened lineage syntax in Thema (#68034)
* Update all core kinds to flattened lineages

* Regen Go types, without any

* Regen Go types, s/interface{}/any/

* Update generated core typescript

* Update generate docs

* Fix defaults gen in veneer index jenny

* Flatten plugindef lineage

* Convert all plugin kinds to flattened form

* Switch back to interface{} for now

* Switch to fs.Sub in plugin DeclParser

* Mostly undesirable codegen changes, to be fixed

* Update mod and sum

* Update pfs tests to flattened lineages

* Update thema to latest, regen docs
2023-05-24 10:47:25 +02:00
Will Browne
286b9e08e9
Plugins: Bump Plugin SDK version and address instance management breaking changes (#68900)
* bump sdk and propagate ctx

* fix tests
2023-05-24 10:19:34 +02:00
ZakharE
5e8bd48c3c
AzureMonitor: Remove simplejson
* tsdb: azuremonitor: Remove usage of simplejson

* Review fixes

* Fix lint errors; review fix
2023-05-23 12:01:49 +01:00
Andreas Christou
108acee08e
CloudMonitoring: Initial GCM Schema (#67739)
* Initial GCM schema work

- Split types for convenience
- Update conditionals where needed
- Update type references

* Add additional supporting types

* Add some more accessory and legacy types

* Add missing type

* Rename backend folder

* Add missing generated file

* Review
2023-05-22 17:19:54 +01:00
ismail simsek
670c987409
Prometheus: Update schema with legendFormat and intervalFactor (#68687)
add legendFormat and intervalFactor to the schema
2023-05-22 16:20:15 +02:00
Andreas Christou
bca8428f63
AzureMonitor: Support multi-resource aliases and subscription aliases (#68648)
Update legend aliases

- Add subscription response type
- Update AzureMonitorQuery type
- Update docs
- Update tests
- Add function to retrieve subscription display name if not present
2023-05-22 11:03:43 +01:00
Alyssa Bull
dfc2ac284b
Azure Monitor: Fix bug with top value so more than 10 resources can be shown (#68333) 2023-05-18 10:50:48 -06:00
Ivana Huckova
ee9620e4e0
Logs: Fix unresponsive log lines if duplicate ids in Elasticsearch (#68569)
* Logs: Fix duplicate uids by appending series refIds

* Fix id generation in loki live streams to be consistent

* Update public/app/core/logsModel.ts

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>

* Fix test

---------

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
2023-05-17 16:28:25 +03:00
Gábor Farkas
fcef387151
Elasticsearch: Handle no-index case in backend mode (#68534)
* elastic: backend migration: fix no-index case

* improved code
2023-05-17 15:24:46 +02:00
Ivana Huckova
dbbbc46351
Elasticsearch: Fix passing of limit and datalinks to logs data frame (#68554)
* Elasticsearch: Fix passing of limit and datalinks to logs data frame

* Update public/app/core/logsModel.ts

Co-authored-by: François Massot <francois.massot@gmail.com>

---------

Co-authored-by: François Massot <francois.massot@gmail.com>
2023-05-17 14:28:32 +02:00
Andreas Christou
bf75969794
AzureMonitor: Traces updates (#68462)
* Use fully qualified resource identifiers

* Add additional data link to explore parent span

* Correctly order links to not break trace logs functionality
2023-05-16 18:30:09 +01:00
Gábor Farkas
6189f48be7
elastic: more tests (#68533)
* elastic: more tests

* fix lint error
2023-05-16 17:09:09 +02:00
Isabella Siu
0612f1f87a
Cloudwatch Logs: Ignore non-time grouping fields in expressions and alerts (#67608) 2023-05-16 08:58:04 -04:00
Yuri Tseretyan
d3ae8df357
Chore: Test datasource to support template $seriesIndex in label values (#68497)
* update test datasource to support template $seriesIndex in label values

* prettier

---------

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2023-05-15 17:47:40 -04:00
Andrej Ocenas
8da90f624d
Pyroscope: Add authentication when calling backendType resource API (#67667) 2023-05-11 16:07:49 +02:00
Adam Simpson
6008296fb7
Google Cloud Monitor: send ServerTiming and metricDescriptors (#67873)
* CloudMonitor: send ServerTiming and metricDescriptors

* fix lint
2023-05-10 19:08:46 +00:00
Emil Tullstedt
b0e681c339
Chore: Update target in go.mod to 1.20 and golangci-lint to v1.52.2 (#67102) 2023-05-10 13:47:35 +02:00
Andreas Christou
e059ce9c8a
AzureMonitor: Correctly set resource parameter for Logs queries (#68133)
* Update to ensure the resources parameter is passed through for logs queries only

* Use string slices for resources to ensure order remains the same

* Fix lint

* clarify test
2023-05-10 13:27:02 +03:00
Andreas Christou
10109eaf00
AzureMonitor: Fix tests (#68127)
Fix tests
2023-05-09 19:39:27 +03:00
Andreas Christou
5ddc37ee21
AzureMonitor: Appropriately handle trace correlation resources (#67934)
* Appropriately handle correlation resources

- Retrieve resources in buildQueries step
- Build updated queries based off of correlation results
- Update tests

* Fix query building and tests

* Fix lint

* Ensure multiple resource queries will work

- Correctly set resources to ensure there is no overlapping between multiple resource selection and correlated resources
- Add tests for these specific cases
- Remove unnecessary pointers
- Build queries correctly
2023-05-09 15:29:36 +01:00
Jev Forsberg
86228ba1a0
Datasource: Fix missing raw SQL query in Query Inspector when query returns zero rows (#67844)
* baldm0mma/issue5799/ add empty frame with all meta data

* baldm0mma/issue5799/ add null test

* write an integration test around query results with empty rows

* baldm0mma/issue5799/ add tests to mssql and postgres

* remove use of apparently reserved keyword in mysql8

* baldm0mma/issue5799

* baldm0mma/issue5799/ update tests

* baldm0mma/issue5799/ update test structs

* baldm0mma/issue5799/ update annotation

---------

Co-authored-by: Michael Mandrus <michael.mandrus@grafana.com>
2023-05-09 08:29:02 -06:00
Andreas Christou
65c1505415
AzureMonitor: Ensure trace exceptions are correctly displayed (#68079)
Ensure trace exceptions are correctly displayed
2023-05-09 15:24:20 +01:00
Ivana Huckova
3145660f5a
Elasticsearch: Run getTerms trough resource call if enableElasticsearchBackendQuerying enabled (#67848)
* Elasticsearch: Run getTerms torugh backend if toggle enabled

* Add template variables to devenv dashboard for easier testing

* Add TODO

* Run feature toggle gen to fix build
2023-05-06 10:00:43 +02:00
Andreas Christou
9d16718acc
AzureMonitor: Fix logs query multi-resource and timespan values (#67914)
* Update TimeGrain interface methods

- Make them util functions because it's simpler

* Update logs ds to appropiately set resources and timespan

* Set timespan using RCF times

* Update tests
2023-05-05 16:47:31 +01:00
Kyle Brandt
4abc56c583
Prometheus: (Chore/Instrumentation) add trace spans for result proces… (#67858)
Prometheus: (Chore/Instrumentation) add trace spans for result processing
2023-05-05 09:07:39 -04:00
Ivana Huckova
f5ac099907
Elasticsearch: Run requestAllIndices trough resource call if enableElasticsearchBackendQuerying enabled (#67825)
* Elasticsearch: Run requestAllIndices trough resource call if enabled

* Unlock resource call path

* Fix lint
2023-05-05 11:35:30 +02:00
Ivana Huckova
95cf598423
Elasticsearch: Fix processing of logs with not-recognized time format (#67767)
* Elasticsearch: Fix parsing of invalid time

* Fix lint

* Add more test data to data.js

* Add tests

* Fix lint

* Update pkg/tsdb/elasticsearch/client/search_request.go
2023-05-04 19:33:00 +02:00
Ivana Huckova
4d7c0904ef
Elasticsearch: Run version check thorugh backend if enableElasticsearchBackendQuerying enabled (#67679)
* Elasticsearch: Run getDBversion trough resource calls

* Update

* Update

* Fix lint

* Close response body

* Fix lint

* Refactor
2023-05-03 18:09:18 +02:00
Andrej Ocenas
92d47a8d8f
Pyroscope: Fix autodetection in case of using Phlare backend (#67536) 2023-04-28 19:53:46 +02:00
Brendan O'Handley
d4a22cff0a
Prometheus: Fix regression for $__rate_interval comparison (#67460)
* fix ,  comparison regression

* intervalMs was not pressent before the regression and this value changes the adjusted interval calculating giving a false positive in favor of the regression
2023-04-28 08:40:17 -04:00
Brendan O'Handley
f70efed2cb
Prometheus: Update healthcheck text message (#67401)
* the healthcheck is used outside the config save&test so change text message

* fix e2e test
2023-04-27 15:54:12 -04:00
Andreas Christou
63383ef545
AzureMonitor: Application Insights Traces (#64859)
* Build out barebones Traces editor

- Add Traces query type and operation ID prop to query type
- Add necessary header types
- Update resource picker to appropriately work with traces query type
- Build out TracesQueryEditor component
- Include logic to retrieve operationId's for AI Workspaces
- Add backend route mapping
- Update macro to use timestamp as default time field for traces

* AzureMonitor: Traces - Response parsing (#65442)

* Update FormatAsField component

- Add trace ResultFormat type
- Generalise FormatAsField component
- Add component to TracesQueryEditor
- Remove duplicate code in setQueryValue

* Add custom filter function to improve performance

* Add basic conversion for logs to trace

- Add serviceTags converter
- Pass through required parameters (queryType and resultFormat)
- Appropriately set visualisation

* Update parsing to also fill trace tags

- Add constant values for each table schema (include legacy mapping for now if needed)
- Add constant for list of table tags
- Set the foundation for dynamic query building
- Update query to build tags value
- Appropriately set operationName
- Update tagsConverter to filter empty values

* Fix lint and test issues

* AzureMonitor: Traces - Data links (#65566)

* Add portal link for traces

- Pull out necessary values (itemId and itemType)
- Appropriately construct
- Fix ordering

* Set default format as value

- Also set default visualisation

* Fix event schema

* Set default formatAsField value

* Include logs link on traces results

- Adapt config links to allow custom title to be set

* Correctly set operationId for query

* Update backend types

- Include OperationID in query
- Pass forward datasource name and UID

* Ensure setTime doesn't consistently get called if operationID is defined

* Add explore link

- Update util functions to allow setting custom datalinks

* Fix tests

* AzureMonitor: Traces - Query and Editor updates (#66076)

* Add initial query

- Will query the resource as soon as a resource has been selected
- Updates the data links for the query without operationId
- Remove initial operationId query and timeRange dependency
- Update query building

* Add entirely separate traces query property

- Update shared types (also including future types for Azure traces)
- Update backend log analytics datasource to accept both azureLogAnalytics and azureTraces queries
- Update backend specific types
- Update frontend datasource for new properties
- Update mock query

* Update FormatAsField to be entirely generic

* Update query building to be done in backend

- Add required mappings in backend
- Update frontend querying

* Fix query and explore data link

* Add trace type selection

* Better method for setting explore link

* Fix operationId updating

* Run go mod tidy

* Unnecessary changes

* Fix tests

* AzureMonitor: Traces - Add correlation API support (#65855)

Add correlation API support

- Add necessary types
- Add correlation API request when conditions are met
- Update query

* Fix property from merge

* AzureMonitor: Traces - Filtering (#66303)

* Add initial query

- Will query the resource as soon as a resource has been selected
- Updates the data links for the query without operationId
- Remove initial operationId query and timeRange dependency
- Update query building

* Add entirely separate traces query property

- Update shared types (also including future types for Azure traces)
- Update backend log analytics datasource to accept both azureLogAnalytics and azureTraces queries
- Update backend specific types
- Update frontend datasource for new properties
- Update mock query

* Update FormatAsField to be entirely generic

* Update query building to be done in backend

- Add required mappings in backend
- Update frontend querying

* Fix query and explore data link

* Add trace type selection

* Better method for setting explore link

* Fix operationId updating

* Run go mod tidy

* Unnecessary changes

* Fix tests

* Start building out Filters component

- Configure component to query for Filter property values when a filter property is set
- Add setFilters function
- Add typing to tablesSchema
- Use component in TracesQueryEditor

* Update Filters

- Asynchronously pull property options
- Setup list of Filter components

* Update filters component

- Remove unused imports
- Have local filters state and query filters
- Correctly set filters values
- Don't update query every time a filter property changes (not performant)

* Update properties query

- Use current timeRange
- Get count to provide informative labels

* Reset map when time changes

* Add operation selection

* Reset filters when property changes

* Appropriate label name for empty values

* Add filtering to query

* Update filter components

- Fix rendering issue
- Correctly compare and update timeRange
- Split out files for simplicity

* Add checkbox option to multiselect

- Add custom option component
- Correctly call onChange
- Add variableOptionGroup for template variable selection

* Fix adding template vars

* Improve labels and refresh labels on query prop changes

* AzureMonitor: Traces - Testing (#66474)

* Select ds for template variable interpolation

* Update az logs ds tests

- Add templateVariables test
- Add filter test
- Update mock
- Remove anys

* Update QueryEditor test

- Update mocks with timeSrv for log analytics datasource
- Fix query mock
- Use appropriate and consistent selectors

* Add TracesQueryEditor test

- Update resourcePickerRows mock to include app insights resources
- Remove comments and extra new line

* Add FormatAsField test

- Remove unneeded condition

* Update resourcePicker utils test

* Don't hide selected options in filters

* Fix multi-selection on filters

* Add TraceTypeField test

- Add test file
- Update selectors (remove copy/paste mistake)
- Update placeholder text for select and add label

* Add basic filters test

* Begin filters test

* Update filters test

* Add final tests and simplify/generalise addFilter helper

* Minor update to datasource test

* Update macros test

* Update selectors in tests

* Add response-table-frame tests

* Add datasource tests

- Use sorting where JSON models are inconsistent
- Update filters clause
- Dedupe tags
- Correct operationId conditions

* Don't set a default value for blurInputOnSelect

* Simplify datasource test

* Update to use CheckGoldenJSON utils

- Update with generated frame files
- Remove redundant expected frame code
- Update all usages

* Fix lint

* AzureMonitor: Traces feedback (#67292)

* Filter traces if the visualisation is set to trace

- Update build query logic
- Added additional test cases
- Return an error if the traces type is set by itself with the trace visualisation
- Add descriptions to event types
- Update tests

* Fix bug for error displaying traces

* Update mappings and add error field

- Update tests
- Remove unnecessary comments

* Switch location of Operation ID field

* Re-order fields

* Update link title

* Update label for event type selection

* Update correct link title

* Update logs datalink to link to Azure Logs in explore

* Fix lint
2023-04-27 20:24:11 +01:00
Danila Shiman
2cd98eae24
Cloudwatch: Add FraudDetector namespace with metrics and dimensions (#67318) 2023-04-27 13:29:35 -04:00
Brendan O'Handley
0a9240aeba
Prometheus: Configuration page overhaul (#66198)
* organize layout, make design uniform, add doc link

* fix e2e test

* move overhauled config parts into prometheus code

* update tooltips with doc links

* clean component styles for section padding, top and bottom 32px

* make additional settings subsection headers h6

* use secondary gray for section descriptions

* fix merge issues

* change inlineswitch to switch only in prom settings because the other components are shared

* remove legacy formfield and input, replace with inlinefield and input from grafana-ui

* find more formfield and UI design fixes like changing inlineformlabel to inlinefield

* remove unused inline form label

* replace legacy duration validations with <FieldValidationMessage>

* fix styles secondary gray from theme

* change language, headings and datasource -> data source

* update alert setting styles with new component

* update prom url heading and tooltip

* update default editor tooltip and set builder as default editor

* update interval tooltip

* update prom type tooltip

* update custom query params tooltip

* update exemplar internal link tooltip

* fix inline form styling inconsistency

* allow for using the DataSourceHTTPSettings component without the connection string

* remove overhaul component, re-use dshtttps comp, and use connection input in config editor

* make tooltips interactive to click links

* consistent label width across the elements we can control for now, fix exemplar switch

* make connection url a component

* refactor onBlur validation

* remove unused component

* add tests for config validations

* add more meaningful health check

* fix e2e test

* fix e2e test

* fix e2e test

* add error handling for more url errors

* remove unnecessary conversion

* health check tests

* Clean up the health check

* health check unit tests

* health check unit tests improved

* make pretty for drone

* lint check go

* lint check go

* add required attr to connection component

* Update public/app/plugins/datasource/prometheus/configuration/Connection.tsx

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>

* fix read only issue for provisioned datasources

* validate multiple durations for incremental query setting

* use sentence case for headers

* use className consistently for styles

* add tests for url regex

* remove console logs

* only use query as healthcheck as the healthy api is not supported by Mimir

* fix exemplar e2e test

* remove overhaul prop from custom headers setting component

* remove connection section and use DatasourceHttpSettings connection with custom label and interactive tooltip

* add spaces back

* spaces

---------

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2023-04-27 09:43:54 -04:00
Shirley
e17496d79a
CloudWatch: Deprecate dynamic labels feature toggle, remove support for Alias in backend (#66494) 2023-04-27 11:19:45 +02:00
Dmitry Filimonov
69a14b9a5e
Phlare: ability to set maxNodes parameter (#67017) 2023-04-27 10:50:11 +02:00
Ivana Huckova
c308118fc0
Elasticsearch: Move response parsing tests to 1 file (#67288)
* Organize tests

* Organize

* Fix lint

* Fix lint
2023-04-26 18:21:04 +02:00
Ivana Huckova
d0ced39847
Elasticsearch: Use array of strings as index in backend queries (#67276)
Elasticsearch: Use array of strings as indice in backend queries
2023-04-26 16:07:15 +02:00
Andrej Ocenas
63777ea368
Phlare: Support both Phlare and Pyroscope backends (#66989) 2023-04-25 16:08:18 +02:00
Kevin Yu
68a277b53b
CloudWatch: Add field level comments to schema (#66900)
* CloudWatch: Add field level comments to schema

* update comments

* pr comments

* remove unneeded test
2023-04-24 08:57:39 -07:00
Ivana Huckova
e2e243d1b6
Elasticsearch: Fix processing of duplicated metric types and field (#66973)
* Elasticsearch: Fix processing of duplicated metric types and field

* Fix lint

* Fix linting
2023-04-24 17:26:04 +02:00
Andreas Christou
a2b97547a6
AzureMonitor: Correct series name accounting for dimensions (#67050)
Correct displayName accounting for dimensions
2023-04-21 19:24:23 +01:00
Alex Khomenko
2e55f26e53
Cloudwatch: Fix nested recursive type (#66950)
* Cloudwatch: Fix nested recursive type

* Cloudwatch: Update exports
2023-04-20 19:39:02 +03:00
Gareth Dawson
82a6c8a647
Elastic: Store index in jsonData (#62808)
* feat(typescript): read and write index to jsonData

* feat(go): read index from jsonData

* clear database column when index-name is updated

* Update public/app/plugins/datasource/elasticsearch/datasource.ts

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>

* Update public/app/plugins/datasource/elasticsearch/configuration/ElasticDetails.tsx

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>

* add indexChangeHandler function

* fix

* fix failing tests

* fix

* fix

---------

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2023-04-19 09:30:09 +01:00
Kevin Yu
a21fdd9c81
CloudWatch: Use generated type from schema in backend (#66420)
* CloudWatch: Use generated type from schema in backend

* address comments

* don't explicity set default metric query type
2023-04-18 11:56:00 -07:00
Stephanie Hingtgen
255d8f3326
Plugins: Remove secure socks proxy feature toggle (#66611) 2023-04-18 11:11:23 -06:00
Alex Khomenko
49eb9db698
Cloudwatch: Fix some schema todos (#66664)
* Cloudwatch: fix todos

* Cloudwatch: Run make-gen
2023-04-18 08:46:51 +03:00
Kyle Cunningham
92d92187d9
SQL Datasources: Update Max Connection and Max Idle Connection Defaults to 100 and add auto mode (#65834)
* Update connection configuration for SQL datasources

* Working auto state for connection numbers

* Add migration

* Use defaults from constants file

* Remove dead code

* Add tests and restructure useMigrateDatabaseField

* Update function names

* Update docs

* Make sure we don't continually issue updates

* Update docs

* Use onOptionsChnage in ConnectionLimits

* Update docs

* Clean up docs

* Update migration

* Fix default values in docs

* Fix spacing issue

* Fix test

* Update default values for SQL connections

* Include consts

* Allow override for default SQL datasource connection parameters

* Fix linter errors

* Remove extra @ts-ignore

* Centralize logic for default values

* Remove debugging

* Remove unecessary function

* Update configuration docs

* minor suggested change

* Fix comment misspelling

* Remove unecessary default setting code

* Update docs to indicate that code was included for backport version

* Remove dead code

---------

Co-authored-by: lwandz13 <larissa.wandzura@grafana.com>
2023-04-17 11:44:05 +03:00
Adam Simpson
02951e8a26
Google Cloud Monitoring: Fix project variable (#66524)
Google Cloud Monitoring: fix project variable

Also fix typo found while debugging
2023-04-14 15:11:25 +00:00
Selene
9665b3afe7
Chore: Update Cuetsy to v0.1.8 version (#66456)
* Update cuetsy version

* Fix defaults

* Update cuetsy

* Update cuelang version in bingo

* Remove TODO comments
2023-04-14 16:45:54 +02:00
Sven Grossmann
8567ec92b0
Cloudwatch: Change type of ts field in log responses to time (#66525)
* make timestamp field time type

* Add test for type on handleLogEvents data frame field response

---------

Co-authored-by: Shirley Leu <4163034+fridgepoet@users.noreply.github.com>
2023-04-14 16:21:16 +02:00
Gábor Farkas
b928fce070
Loki: Remove alpha feature toggle lokiDataframeApi (#65918)
loki: remove experimental feature-flag
2023-04-13 15:22:09 +02:00
Gábor Farkas
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
Ida Štambuk
6309d3fae6
Cloudwatch: Pass refId from query for expression queries (#66147)
Co-authored-by: Shirley <4163034+fridgepoet@users.noreply.github.com>
Co-authored-by: Isabella Siu <Isabella.siu@grafana.com>
2023-04-13 10:07:06 +02:00
Gábor Farkas
d830591cdc
Revert "Prometheus: Reduce allocations parsing exemplars" (#66367)
Revert "Prometheus: Reduce allocations parsing exemplars (#58959)"

This reverts commit a1f2d0e205.
2023-04-12 14:45:21 +02:00
Shirley
ae23ef5b41
CloudWatch: Refactor around handleGetRegions (#65713)
* Create minimal EC2 interface

* convert regions variable to a function returning a copy

* Add test for multiple calls to regions to check regionsCache

* Add returns to handler after error

* Refactor handleGetRegions
2023-04-11 19:55:57 +02:00
Ivana Huckova
3e4eb9c93e
Elasticsearch: Fix legend generated on backend (#66039)
* Elasticsearch: Fix legend

* Remove comments

* fix adding name to config

* Fix lint
2023-04-11 13:29:38 +02:00
Gábor Farkas
05f7ae6c69
prometheus: slightly different approach for dataplane compatibility (#65993) 2023-04-11 12:58:55 +02:00
Ida Štambuk
2648fcb833
Cloudwatch: Add missing AWS/IVS namespace metrics (#65985) 2023-04-06 09:52:26 +02:00
Kyle Brandt
6c6427e63f
Chore: Use latest go-sdk (v0.158.0) (#66054)
SDK release notes:
* Logs contract: ignore remaining fields by @gabor in #659
* Logs contract: more robust field finding, explicit approach by @gabor in #660
* Tracing: Support multiple OTel propagators by @xnyo in #663
* Tracing: Add more details to HTTP Outgoing Request by @xnyo in #664
* Data: Encode Nanosecond into JSON by @kylebrandt in #647
* Data: cmp tests using FrameTestCompareOptions() will no longer ignore time differences beyond millisecond resolution
2023-04-05 21:00:31 +03:00
Ivana Huckova
abc11d1dcf
Elasticsearch: Run log context queries through backend (#65805)
* Elasticsearch: Run context queries trough backend

* Fix typing

* Update

* Add possibility to run context query torugh backend and frontend

* Correctly sort
2023-04-05 18:32:02 +02:00
Galen Kistler
96e9e80739
Prometheus: Browser resource caching (#60711)
Add cache control headers and range snapping to Prometheus resource API calls.
2023-04-03 09:07:17 -05:00
Stephanie Hingtgen
211beae736
MSSQL: Update forked go-mssqldb dependency (#65658) 2023-03-31 10:07:37 -06:00
Andrej Ocenas
977a7e9a55
Phlare: Rollback pprof code (#65689) 2023-03-31 15:27:14 +02:00
Ivana Huckova
b09aa7d5f7
Elasticsearch: Add benchmarks for processing of requests and responses (#65354)
* Elasticsearch: Add benchmarks for processing of requests and responses

* Update, use package variable to elimitnate possible optimization

* Update, require no error
2023-03-31 11:59:11 +02:00
Andre Pereira
541a03f33b
Tempo: TraceQL Configurable static fields (#65284)
* TraceQL - configurable static fields for new UI

* TraceQL - filter out static fields from Tags section. Added tooltip to static fields

* Add more units to duration validation. Improve duration field tooltip with accepted units

* Better control of delete button on SearchField

* Move new config behind feature toggle

* Special title for intrinsic "name"

* Fix tests

* Move static fields not in the datasource to the Tags section

* Start using the useAsync hook in the Tempo TraceQL configuration page to retrieve the tags and datasource

* Fix tests

* Fix test. Use useAsync to retrieve options in SearchField

* Remove ability to set a default value in filter configuration.
Removed type from filter, dynamic filters are now any filters not present in the datasource config

* Updated the static filters tooltip

* Replace useState + useEffect with useMemo for scopedTag
2023-03-31 10:35:37 +01:00
Isabella Siu
92965578b3
CloudWatch Logs: Fix running logs queries with expressions (#65306) 2023-03-30 17:40:01 -04:00
Andrej Ocenas
abec183e37
Phlare: Fix error when there are no profileTypes to send from backend (#65455)
Send empty array if no types
2023-03-30 11:33:23 +02:00
ismail simsek
959349d191
Prometheus: Fix fallback http method when no http method specified in jsonData (#65229)
Use POST as default if no http method specified in jsonData
2023-03-30 00:50:25 +02:00
Sergey Kostrukov
746b70bb86
Prometheus: Update audiences for Azure auth (#65498)
* Update US Gov audience for Azure auth in Prometheus

* Update China audience for Azure auth in Prometheus
2023-03-29 20:49:37 +02:00
Andreas Christou
e27cb67776
AzureMonitor: Fix Log Analytics portal links (#65482)
* Fix and update Log Analytics portal links

- Build portal URL in backend
- Correctly set multiple resource value
- Move AddConfigLinks util function
- Add necessary types
- Remove unused functions

* Fix lint issue

* Remove unused cache variable
2023-03-29 19:01:18 +03:00
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
Zoltán Bedi
562d8dba5d
CloudMonitoring: Update sdks to latest (#65252)
* Upgrade grafana-google-sdk-go to v0.1.0

* Upgrade @grafana/google-sdk to 0.1.1

* Update doc with provisioning example

* Remove unused types

* Use config types from the sdk

* Add metrics
2023-03-29 12:16:28 +02:00
Kyle Cunningham
d8ac2e97a0
SQL Engine: Revert session changes (#64594)
Revert session changes
2023-03-29 15:04:28 +07:00
Gábor Farkas
0cff917f2a
Elasticsearch: Removed reference to obsolete esVersion value (#65415)
* elastic: removed reference to obsolete esVersion value

* removed unused code

* cleaned up tests
2023-03-28 17:04:56 +03:00
Andrew Hackmann
f0ddf900c0
cloud monitor is returning floats and we are trying to parse as strings (#65407) 2023-03-28 13:47:28 +00:00
Stephanie Hingtgen
fb5a7acc73
Plugins: Add cloudwatch support with the secure socks proxy (#65303)
* Plugins: enable secure socks proxy on cloudwatch with workaround
2023-03-27 10:00:37 -06:00
Piotr Erdanowski
d5dacf5cd5
Cloudwatch: Add MeteredIOBytes metric for EFS (#64793) 2023-03-23 12:14:32 -04:00
Ivana Huckova
66e4b12032
Elasticsearch: Fix using of interval value in histogram (#65201)
* Elasticsearch: Remove GetMinInterval method that is not used anymore

* Elasticsearch: Fix using of interval value in histogram

* Revert "Elasticsearch: Remove GetMinInterval method that is not used anymore"

This reverts commit a157003902.
2023-03-23 09:36:50 +01:00
Ivana Huckova
e8bb894a02
Elasticsearch: Remove GetMinInterval method that is not used anymore (#65203) 2023-03-23 09:36:37 +01:00
Ryan McKinley
f96637b5fc
Live: Remove (alpha) ability to configure live pipelines (#65138) 2023-03-22 20:09:44 +02:00
Ivana Huckova
ae0f9fc44f
Elasticsearch: Fix processing of response with multiple group by for alerting (#65165)
* Elasticsearch: Fix processing of response with multiple group by on backend

* Remove unused param from createFields

* Switch comments
2023-03-22 18:53:09 +02: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
Gábor Farkas
6d5242e54c
elasticsearch: backend: better timestamp parsing (#64681)
* elasticsearch: backend: better timestamp parsing

* refactor
2023-03-22 09:52:55 +01:00
Ivana Huckova
0740d4e911
Elasticsearch: Fix top metrics with terms in backend (#65063)
* Elasticsearch: Fix top metrics with terms in backend

* Refactor to remove cyclomatic complexity
2023-03-22 09:36:43 +01:00
Andre Pereira
bfb0dde4a8
Tempo: Search using TraceQL improvements (#64616)
* Added scope to filter

* Intrinsic fields don't have scope

* Consistent plus button placement next to the last tag. Changed All Scopes to "unscoped"

* Added validation to duration fields

* Disable options load when dropdown is opened

* Use focused list of operators when all values are of type string or int/float

* Fixed and added tests

* Fix another test

* Better way to prevent duplicate and redundant backend requests when a filter updates
2023-03-21 15:59:16 +00:00
Gábor Farkas
335bcd1e4e
elasticsearch: more robust field order (#65102) 2023-03-21 12:44:10 +00:00
Ivana Huckova
a416235e8f
Elasticsearch: Fix processing of percentiles on backend (#64540)
* Elasticsearch: Fix processing of percentiles on backend

* Remove redundant logic as we do this in addMetricValue

* Refactor for less cyclomatic complexity

* Remove changes in createFieldsFromPropKeys
2023-03-20 16:32:19 +01:00
Shirley
972e611f76
CloudWatch Logs: Revert "Queries in an expression should run synchronously (#64443)" (#65036)
Revert "CloudWatch Logs: Queries in an expression should run synchronously (#64443)"

This reverts commit 74436d31de.
2023-03-20 15:54:30 +01:00
Gábor Farkas
e1321f8721
elasticsearch: more tests (#64971)
* elasticsearch: more tests

* fix issue with uppercase refID on linux

---------

Co-authored-by: Todd Treece <todd.treece@grafana.com>
2023-03-20 15:50:26 +02:00
ismail simsek
ae07bf7ce5
Influxdb: Response parser performance improvement (#64776)
* Influxdb response parser allocation improvements

* More improvements

* more improvements

* embed file

* use json-iterator

* rename

* use encoding/json
2023-03-17 20:45:13 +01:00
Sven Grossmann
7261c6f7cd
DataSourceWithBackend: Add queryGroupId to find correlated/related queries (#64587)
* add `correlationId` to queries

* trace correlation id in backend

* add correlation id to loki's span

* add correlation id to query chunks

* fix test

* fix DataSourceWithBackend test

* change to `queryGroupId`

* remove empty line

* fix test in `DataSourceWithBackend`
2023-03-17 15:48:13 +01:00
Andrej Ocenas
998b035d52
Phlare: Fix panic on empty pprof profile (#64888) 2023-03-16 14:02:56 +01:00
Stephanie Hingtgen
10db808ea1
Plugins: Add sql support for the secure socks proxy (#64630) 2023-03-16 06:54:19 -06:00
Kristin Laemmert
8745d7ef1b
extract kindsys to external library (#64562)
* extract kindsys

* reinstate kindsys report

This may end up living somewhere else (or not! who knows!), but the important part is that I don't get rid of it right now :)

I hate the package layout (kindsysreport/codegen) for the main function and will take pretty much any alternative suggestion, but we can change also change it later.

Note that the generated report.json is in a different location - anything using this (ops something) needs to be updated.

* kindsysreport in codeowners
2023-03-15 12:04:28 -04:00
Isabella Siu
74436d31de
CloudWatch Logs: Queries in an expression should run synchronously (#64443) 2023-03-13 13:31:46 -04:00
Andrej Ocenas
6647217208
Phlare: Use enum config to send deduplicated func and filenames (#64435) 2023-03-13 11:06:04 +01:00
Ivana Huckova
d6eea0c7b5
Elasticsearch: Fix histogram fields to be filterale when processed trough backend (#64514)
* Elasticsearch: Fix histogram fields to be filterale when processed trough backend

* Simplify test and reuse logic
2023-03-13 10:11:18 +01:00
Brendan O'Handley
50ef183208
InfluxDB: Fix type assertion panics for interface conversion: interface {} is nil (#64556)
* fix type assertions

* fix chk

* add nil and fix tests

* add test for null bool and strings in the JSON response to be parsed as nil in Go

* reduce complexity

* reduce complexity

* reduce complexity again

* switch case for valTypes
2023-03-10 11:11:00 -05:00
Ivana Huckova
424e33146c
Elasticsearch: Reintroduce log tests from frontend (#64521)
* Elasticsearch: Reintroduce log tests from frontend

* Fix linting
2023-03-09 11:20:36 -05:00
Ivana Huckova
bd0fa79542
Elasticsearch: Add log highlight processing on backend (#63924)
* Elasticsearch: Add highlight for logs

* Fix running of queries trough backend only when shouldRunTroughBackend

* Fix incorrect json in test string

* Address feedback

* Keep order of words same
2023-03-09 13:34:53 +01:00
ismail simsek
68b588b912
Prometheus schematization (#63878)
* Schematize prometheus

* revert changes

* close response body

* Update report.json

* Update pkg/tsdb/prometheus/models/query.go

Co-authored-by: sam boyer <sdboyer@grafana.com>

* Use without pointers

* remove unused

* Specify query format

* Rename

* Clean up schema

* Update public/app/plugins/datasource/prometheus/dataquery.cue

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>

* Update pkg/tsdb/prometheus/models/query.go

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>

* Clean up tests

* Update public/app/plugins/datasource/prometheus/dataquery.cue

Co-authored-by: sam boyer <sdboyer@grafana.com>

* make gen-cue

* Add comments

* Make linter happy

* Remove editormode override

* Update

---------

Co-authored-by: sam boyer <sdboyer@grafana.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-03-09 11:26:15 +01:00
Sven Grossmann
473013e3f5
Loki: Add error handling to CallResource (#64439)
* surface loki error message for `CallResource`

* use `data.Message` instead or `errorMessage`

* change struct coming from Loki

* remove whitespace
2023-03-09 11:12:33 +01:00
Ryan McKinley
4b94c7e5d2
Schema: Remove key from root DataQuery type (#64467) 2023-03-08 16:52:31 -05:00
Ivana Huckova
aa123e0d50
Elasticsearch: Fix where name of frame is set (#64233)
* Elasticsearch: Use displayName field for naming

* Change solution to frame.Name to be backward compatible

* Fix snapshot tests

* Use Time and Value for time and value fields

* Use variables from grafana-plugin-sdk-go for name
2023-03-08 13:32:01 +01:00
Ivana Huckova
1cb39b3523
Elasticsearch: Fix some of the tests duplicated from frontend (#64320) 2023-03-08 13:31:50 +01:00
Alex Khomenko
4c30403904
Elastic Search: Fix BasePipelineMetricAggregation schema type (#64335)
* Fix type

* Tweak BaseBucketAggregation type

* Remove comment
2023-03-08 13:12:44 +02:00
Kevin Yu
70f600db10
Cloudwatch Logs: Make mixed type fields fallback to being strings (#63981)
* Cloudwatch Logs: make mixed type fields fallback to being strings

* addressing pr comments
2023-03-07 14:35:19 -08:00
Will Browne
94f39e69a3
Plugins: Migrate plugincontext, adapters and pluginsettings to pkg/services/pluginsintegration package (#64154)
* migrate plugincontext, adapter and pluginsettings

* add to CODEOWNERS

* fix imports

* fix CODEOWNERS

* take pluginsettings

* migrate wire stuff
2023-03-07 11:22:30 -05:00
Ivana Huckova
07ab12c07d
Elasticsearch: Rename time series query to es data query (#64225) 2023-03-07 13:57:24 +01:00
Ivana Huckova
3bd7217aa2
Elasticsearch: Remove _source field when processing raw data on backend (#64119)
* Elasticsearch: Remove _source field when processing raw data on backend

* Update snapshot test
2023-03-07 13:56:34 +01:00
Alex Khomenko
8999de4313
Cloudwatch: Use generated TS types (#63166)
* Add veneer

* Fix queries

* Remove redundant type

* Fix todos

* Sync and fix some todos

* Revert unrelated changes

* Revert unrelated changes[2]

* Revert unrelated changes[3]
2023-03-07 14:39:52 +02:00
Pepe Fagoaga
fa0f640d6a
SQL Engine: Handle one session to connect the DB (#63246)
fix(postgresql): Handle one session to the DB
2023-03-07 10:33:59 +01:00
Andrej Ocenas
58eb25e47d
Phlare: Refactor the pprof transform (#64028) 2023-03-07 10:26:51 +01:00
Isabella Siu
4f3d64e8b7
CloudWatch: Make deeplinks work for us-gov and china regions (#64080) 2023-03-06 16:00:59 -05:00
Andre Pereira
fd37ff29b5
Tempo: New Search UI using TraceQL (#63808)
* WIP of creating new components to support the Search tab using TraceQL

* Search fields now require an ID. Added duration fields to new Search UI

* Distinguish static from dynamic fields. Added dynamic tags input

* Moved new search behind traceqlSearch feature flag. Added handling of different types of values to accurately wrap them in quotes when generating query.

* Hold search state in TempoQuery to leverage state in URL. Moved types to schema file

* Use a read only monaco editor to render a syntax highlighted generated query. Added tooltip to duration. Added query options section

* Support multiple values using the regex operator and multi input

* Delete dynamic filters

* Automatically select the regex op when multiple values are selected. Revert to previous operator when only one value is selected

* Added tests for SearchField component

* Added tests for the TraceQLSearch component

* Added tests for function that generates the query

* Fix merge conflicts

* Update test

* Replace Search tab when traceqlSearch feature flag is enabled. Limit operators for both name fields to =,!=,=~

* Disable clear button for values

* Changed delete and add buttons to AccessoryButton. Added descriptions to operators

* Remove duplicate test

* Added a prismjs grammar for traceql. Replaced read only query editor with syntax highlighted query. Removed spaces between tag operator and value when generating query.

* Fix support for custom values when isMulti is enabled in Select

* Use toOption function
2023-03-06 16:31:08 +00:00
Ivana Huckova
7353299495
Elasticsearch: Fix using of correct size for log and document queries on backend (#64155)
* Elasticsearch: Fix using of correct size for log and document queries

* Fix linting
2023-03-06 13:41:45 +01:00
Ivana Huckova
50cf024fef
Elasticsearch: Uncomment FIXME parts of test in TestRefIdMatching (#64156) 2023-03-06 13:35:00 +01:00
Serge Zaitsev
0bdb105df2
Chore: Remove xorcare/pointer dependency (#63900)
* Chore: remove pointer dependency

* fix type casts

* deprecate xorcare/pointer library in linter

* rooky mistake
2023-03-06 05:23:15 -05:00
Ryan McKinley
b7d8589588
FieldType: Add enum type and include it in testdata scenarios (#64059) 2023-03-03 13:37:56 -08:00
Ludovic Viaud
5bd2fac9c8
InfluxDB: Update InfluxQL querybuilder to qualify identifiers (#62230) 2023-03-02 15:05:24 +01:00
Ivana Huckova
adda7819e9
Elasticsearch: Implement processing of raw document query results in backend (#63932) 2023-03-02 09:50:54 +01:00
Ivana Huckova
d258c8ef8a
Elasticsearch: Implement processing of logs query results in backend (#63647)
* Elasticsearch: Add processing of logs query to backend

* Add and fix tests

* Add snapshot tests

* Fix test in ES client

* Small updates, remove redundant logic

* Refactor setPreferredVisType to improve readability
2023-03-01 05:50:56 -05:00
Selene
e1350a905f
Chore: Update thema and cuesty v0.1.6 (#63629)
* Update thema and cuesty

* Update thema version

* Update thema again

* update thema

---------

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2023-03-01 00:23:57 -05: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
zhichli
3c218d742f
Datasources: Add user_agent header customization for outgoing HTTP requests (#63769) 2023-02-28 14:10:05 +01:00
Cyril Tovena
dde9b22113
Phlare: Switch to the new Pprof endpoint (#61505)
Co-authored-by: Joey Tawadrous <joey.tawadrous@grafana.com>
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2023-02-28 11:28:45 +01:00
Adam Simpson
3672e44c1c
CloudMonitoring: Fix crash when inspecting data for MQL queries (#63747)
CloudMonitoring: Fix missing Field name

This happened for MQL queries that used an [aggregate function][1], e.g.
`sum`.

[1]: https://cloud.google.com/monitoring/mql/reference#aggr-function-group
2023-02-24 18:09:10 +00: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
Kyle Cunningham
356e2e1933
MSSQL Datasource: Revert functions within macros change (#63592)
* Revert functions within macros change
* Add tests for function and macro for mssql
* Remove macro support tests

---------

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2023-02-22 22:02:05 +01:00
Isabella Siu
b674cad09e
CloudWatch: Add AWS/IotSiteWise namespace and metrics (#63534) 2023-02-22 08:55:18 -05:00
Ivana Huckova
89b3663a23
Elasticsearch: Add processing for raw data to backend (#63208)
* WIP

* WIP

* Refactor

* Add tests

* Cleanup

* Fix whitespace

* Fix test and lint

* In snapshot tests update counter to be number

* Add boolean value for snapshot testing

* Update pkg/tsdb/elasticsearch/response_parser.go

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>

* Update pkg/tsdb/elasticsearch/response_parser.go

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>

* Use generic to reuse logic when creating fields

* Use nullable fields

* Fix lint

* WIP (#63272)

wip

* Fix snapshot test after we changed field types to nullable

---------

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2023-02-22 13:28:43 +01:00