Commit Graph

2309 Commits

Author SHA1 Message Date
Isabella Siu
114a136378
CloudWatch: Fix labels for raw metric search queries (#88943) 2024-06-07 17:37:19 -04:00
Isabella Siu
cd15e9732d
Cloudwatch: Use the metric map from grafana-aws-sdk (#88733) 2024-06-06 21:25:54 +03:00
ismail simsek
808cf75ff8
InfluxDB: Use json-iterator package for json operations (#88562)
* return error early

* enable gzip between grafana and influxdb

* use json-iterator package for json operations

* revert gzip changes

* update test

* go mod tidy
go work sync
2024-06-06 20:14:53 +03:00
Andreas Christou
c9778c3332
AzureMonitor: Prometheus exemplars support (#87742)
* Update types

* Mark datasource as supporting traces

* Add logic to transform exemplar query to traces query

* Render appropriate editor

* Run trace query for exemplars

* Refactor out common functions

- Add function to retrieve first/default subscription

* Add route for trace exemplars

* Update logic to appropriately query exemplars

* Update traces query builder

* Update instance test

* Remove unneeded import

* Set traces pseudo data source

* Replace deprecated function calls

* Add helper for setting default traces query

* Don't show resource field for exemplars query

* When resetting operation ID for exemplars set query to default

- Update tests

* Update query header to appropriately set the service value

* Fix response frame creation and update tests

* Correctly select resource

* Convert subscriptionsApiVersion to const

* Add feature toggle
2024-06-06 17:53:17 +01:00
Marcus Efraimsson
2403665998
Chore: Remove legacydata package (#88790)
* Chore: Remove legacydata package

* remove unused dependency

* sdk v0.234.0
2024-06-05 22:31:06 +02:00
ismail simsek
08276bd8e7
InfluxDB: Revert calculation of maxPointsEnforced value (#88809)
revert calculation of maxPointsEnforced
2024-06-05 21:43:04 +02:00
ismail simsek
a87c155c06
Chore: Return influxdb query error early before parsing the result (#88549)
return error early
2024-06-05 21:36:13 +02:00
Ivana Huckova
023857625a
Elasticsearch: Remove enableElasticsearchBackendQuerying feature toggle (#88668)
* wip

* Fix newly introduced any

* Remove toggle

* Remove unused code in LegacyQueryRunner
2024-06-05 17:03:29 +02:00
Ivana Huckova
a2f7e208fd
Elasticsearchl: In version check, include / (#88779)
Elasticsearchl: In version check, include /
2024-06-05 15:54:04 +02:00
Marcus Efraimsson
0fffa31931
Chore: Remove unused code in legacydata package (#88772) 2024-06-05 15:37:32 +02:00
Leonardo Boleli
d83818f8cc
Cloudwatch: Update AWS DynamoDB Metrics (#88418) 2024-06-04 15:22:15 -04:00
Andreas Christou
f787418e4b
AzureMonitor: Fix bug detecting app insights queries (#88572)
Make regexp case insensitive
2024-06-04 16:16:31 +01:00
Sarah Zinger
4d002d85f9
Cloudwatch Logs: Fix bug where we did not return errors to user (#87190) 2024-06-04 08:43:36 -04:00
ismail simsek
c73bbf19a1
InfluxDB: Introduce maxDataPoints setting for flux variable query editor (#87935)
* Introduce custom variable support

* Remove comment lines

* introduce maxDataPoints

* fix tests

* update

* fix unit tests

* remove new line
2024-06-03 12:09:33 +03:00
Isabella Siu
be2e420e6b
CloudWatch: Handle permissions error and update docs (#88524) 2024-05-31 14:36:38 -04:00
Scott Schreckengaust
3e872bb77e
Cloudwatch: Add Kendra metrics (#86809) 2024-05-31 09:02:29 -04:00
Andreas Christou
3eea71cc6b
Azure: Basic Logs support (#88025)
* Azure monitor: Basic Logs frontend (#85905)

* adds datasource level config for enabling basic logs

* add basiclogsquery type to query json

* add toggle between basic and analytics

* adds basic logs toggle from UI, blocks time picker to only dashboard if basic logs is selected

* add check to remove UI if alerting

* tests for logsmanagement component

* tests for logs query editor

* tests for time mangement control

* remove unused imports

* clears query whenever toggle changes from basic <-> analytics

* add test to account for clearning query

* Update public/app/plugins/datasource/azuremonitor/components/ConfigEditor/BasicLogsToggle.tsx

wording

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

* Update public/app/plugins/datasource/azuremonitor/components/LogsQueryEditor/LogsQueryEditor.tsx

spelling

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

* Update public/app/plugins/datasource/azuremonitor/components/LogsQueryEditor/LogsQueryEditor.tsx

spelling

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

* update dependency list

* clear basic logs if resources change

* fix tests

---------

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

* Azure Monitor: Basic Logs modal acknowledgement (#86244)

* adds datasource level config for enabling basic logs

* add basiclogsquery type to query json

* add toggle between basic and analytics

* adds basic logs toggle from UI, blocks time picker to only dashboard if basic logs is selected

* add check to remove UI if alerting

* tests for logsmanagement component

* tests for logs query editor

* tests for time mangement control

* remove unused imports

* add confirm modal

* clears query whenever toggle changes from basic <-> analytics

* add test to account for clearning query

* adds modal acknowledgement for basic logs query

* tests for handling modal logic

* basic logs ack type

* Update public/app/plugins/datasource/azuremonitor/components/ConfigEditor/BasicLogsToggle.tsx

wording

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

* Update public/app/plugins/datasource/azuremonitor/components/LogsQueryEditor/LogsQueryEditor.tsx

spelling

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

* Update public/app/plugins/datasource/azuremonitor/components/LogsQueryEditor/LogsQueryEditor.tsx

spelling

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

* update dependency list

* clear basic logs if resources change

* remove modal from config page

* remove basic logs query ack type

* add modal acknowledgement to toggle between basic and analytics

* clear query if resources change

* fix tests

* fix tests

* Update public/app/plugins/datasource/azuremonitor/components/LogsQueryEditor/LogsManagement.tsx

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

* fix tests

---------

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

* Azure Monitor: Basic Logs Backend (#87653)

* fix logic for showingBasicLogsToggle

* move to utils function and add basiclogsquery in apply template variable

* add backend safeguards for basiclogsqueries

* adds support for calling search or query apis based on whether it is basic logs or not

* add tests for utils

* initial test for basic logs query in the backend

* tests for basic logs

* remve comment

* simplify checks for basic logs

* adds fromAlert prop for azure monitor backend services

* adds fromAlert check fo basic logs

* fix working and empty tags

* add telemetry for basic logs

* remove import from grafana core package

* change fromAlert true in tests

* change the way tests catch errors

* Update pkg/tsdb/azuremonitor/loganalytics/utils.go

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

* Update pkg/tsdb/azuremonitor/loganalytics/utils.go

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

* Update pkg/tsdb/azuremonitor/loganalytics/utils.go

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

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

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

* restructure code to only run basic logs checks if basiclogsflag is true

* data retention warning

* tests for calculate time range

* Simplify determining if request is from alerting

* Fix lint and bool check

* Fix tests

* clarify data retention

---------

Co-authored-by: Jocelyn <jcolladokuri@microsoft.com>
Co-authored-by: jcolladokuri <jocelyncollado52@gmail.com>

* Azure Monitor: Basic Logs data volume notification (#88009)

* frontend changes for data ingested warning

* initial logic for getResource

* payload processing

* create basicLogs usage function

* add utils for converting time and getting the data volume query for basic logs

* frontend updates for showing the data ingested for the given query

* frontend tests

* add check for when no dataIngested is returned

* remove backend.logger prints

* comment on what function does

* fix merge

* make resource URI regex case insensitive

* add support for workspace variables in basic logs flow

* add undefined check

* structure and add tests for variable support

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

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

* add tracing for basic logs usage request

* clean up data volume query struct

* use async/await instead of callback

* fix parameters for getApiURL

* restrict time on usage query to 8 days max

* add time to dependency array to refetch basic logs usage

* move time check implementation to backend

* fix utils tests

---------

Co-authored-by: Jocelyn <jcolladokuri@microsoft.com>
Co-authored-by: jcolladokuri <jocelyncollado52@gmail.com>

---------

Co-authored-by: jcolladokuri <jcolladokuri@microsoft.com>
Co-authored-by: jcolladokuri <jocelyncollado52@gmail.com>
2024-05-28 18:06:27 +01:00
Andres Martinez Gotor
60ce523b72
Refactor plugin context initialization (#88343) 2024-05-28 16:59:06 +03:00
Giuseppe Guerra
2b54ce6c51
Chore: Bump google.golang.org/grpc to 1.64.0 (#88219)
* Bump google.golang.org/grpc to 1.64.0

* Address grpc.Dial deprecation notices

* go mod tidy

* Update go.work.sum

* go work sync
2024-05-27 12:44:39 +02:00
Ryan McKinley
ffc2702552
Plugins: Support Admission validation hooks (#87718) 2024-05-24 18:45:16 +03:00
Ryan McKinley
42b0f802de
QueryTypes: Add feature toggle to show query types in datasource apiservers (#88213)
* initial attempt

* show query types

* show query types

* with formatting

* with formatting

* more cleanup

* add feature toggle

* fix build
2024-05-23 18:46:28 +02:00
Tristan
bffd87107b
CloudWatch: Add additional AWS/KinesisAnalytics metrics (#88101) 2024-05-21 09:50:19 +02:00
Leonardo Boleli
e1e33d2f31
Cloudwatch: Add AWS/Events Metrics (#88097) 2024-05-20 11:46:57 -04:00
Ryan McKinley
778d9eb69d
Live: Add more devenv dashboards (#87952) 2024-05-16 20:37:24 +03:00
Fabrizio
953c8f838f
Loki: Lower log level when retrieving metadata (#87910)
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
2024-05-15 17:08:03 +03:00
lean.dev
639ab6cca7
Tempo: Implement PDC for gRPC client (#85867) 2024-05-15 14:39:02 +02:00
ismail simsek
194039c429
InfluxDB: Update alias regex pattern (#87713)
* use frontend mode alias regex

* remove comment
2024-05-14 09:53:18 +02:00
Ivana Huckova
336b6dafb6
Elasticsearch: Fix setting of default maxConcurrentShardRequests (#87703)
* Elasticsearch: Fix setting of default maxConcurrentShardRequests

* Add float test scenario

* Add comment
2024-05-13 16:39:37 +03:00
Andreas Christou
49e6bf26b3
AzureMonitor: Refactor Log Analytics backend (#87429)
* Remove unneeded error check

* Refactor to reduce cyclomatic complexity

* Add util function for parsing resultformat

* Make use of util

* Remove unneeded types

* Move types to their own file

* Move getApiUrl to utils

* Move traces functions to separate file

- Add separate helper for building trace string queries

* Add helper for determining resources

* Add test for RetrieveResources

* Don't append twice

* Refactor tests
2024-05-10 17:11:54 +01:00
Gábor Farkas
4f7ed97aad
mysql: fix dispose-method not called in external-mode (#87330) 2024-05-07 09:54:30 +02:00
Andreas Christou
28df41fd96
MSSQL: Add HostName method (#87309)
* Add HostName method

* Add test

* Fix lint
2024-05-03 15:45:34 +01:00
ismail simsek
3317691615
InfluxDB: Support cardinality queries with backend mode (#87264)
support cardinality queries
2024-05-03 12:50:00 +02:00
Kevin Yu
6851ad9f8c
CloudWatch: Fix apostrophes in dimension values not being escaped (#87182) 2024-05-02 06:15:11 -07:00
Kevin Yu
a54df47976
CloudWatch: Add labels for Metric Query type queries (#85766)
* CloudWatch: Fix metric query with group by not being labelled in alerts

* just use one key for the labels

* not needed

* unused function

* add tests

* pr comments

* fetch dimensions to build labels for MetricQuery type queries

* pr comments

* group cache related tests and use fresh cache for non-cache related tests

* don't cache empty values
2024-04-30 09:06:16 -07:00
Gábor Farkas
3d80693456
postgres: simpler test (#86331) 2024-04-30 15:27:20 +02:00
Andreas Christou
125ac18fa3
AzureMonitor: Enable session ID header for Log Analytics (#86320)
* Enable option

- Update sdk

* Sync go.work
2024-04-30 13:10:04 +01:00
Serge Zaitsev
522a98c126
Chore: Make Cfg field private in SQLStore (#85593)
* make cfg private in sqlstore

* fix db init in tests

* fix case

* fix folder test init

* fix imports

* make another Cfg private

* remove another Cfg

* remove unused variable

* use store cfg, it has side-effects

* fix mutated cfg in tests
2024-04-24 10:38:40 +02:00
Fabrizio
0b2e748bd8
Loki: Fix setting of tenant ID (#86433) 2024-04-22 21:02:56 +01:00
Andreas Christou
ae84d16a6f
MSSQL: Simplify proxy logic (#86278)
* Simplify proxy dialer creation

- Set new dialer on connector
- Create MSSQL connector in a similar fashion to postgres

* Update test

* Fix lint

* More lint

* Use correct driver name
2024-04-19 22:03:26 +01:00
Andreas Christou
420067a7e1
MSSQL: Add SQL_VARIANT converter and update test (#85823)
Add SQL_VARIANT converter and update test
2024-04-17 16:49:51 -05:00
Gábor Farkas
2379498228
mysql additional decoupling steps (#86168)
* mysql additional decoupling steps

* updated snapshot test
2024-04-16 11:50:41 +02:00
Gábor Farkas
9015bfa3f4
mssql: decouple sqleng (#86130)
* mssql: decouple sqleng

* fix codeowners-file
2024-04-16 08:00:14 +00:00
Gábor Farkas
7ce7584151
postgres: decouple sqleng (#86055) 2024-04-15 14:28:03 +02:00
Gábor Farkas
b02317d583
mysql: decouple sqleng (#86057) 2024-04-15 14:26:15 +02:00
Gábor Farkas
ee1ece1cf8
sql: use resample from grafana-plugin-sdk-go (#85599)
* copied files

* add copy of Pointer

* fix the API

* forward resample to the namespaced code

* moved the aligning-code to the parent

* call namespaced resample directly

* lint fix

* lint fix

* switch to plugin-sdk-go resample

* adjusted import path
2024-04-12 15:22:28 +02:00
Andre Pereira
1a62d94c55
Tempo: Return raw result from traceql query (#86032)
Return raw result from traceql query
2024-04-12 12:26:27 +01:00
Adam Yeats
0ec8ccbf66
Google Cloud Monitor: Fix interface conversion for incorrect type in cloudMonitoringProm.run (#85811) 2024-04-11 11:59:34 +02:00
Fabrizio
653d9fa895
Loki: Handle X-Scope-OrgID and tenant IDs (#85726) 2024-04-11 11:51:54 +02:00
ismail simsek
96f49bfaee
InfluxDB: Fix panic when reading concurrency count during influxql health check (#85771)
fix panic when reading concurrency count during influxql health check
2024-04-10 15:32:38 +02:00
Tristan
8f5839fe8f
CloudWatch: Add additional Glue metrics (#85798) 2024-04-09 19:31:39 +00:00