Commit Graph

226 Commits

Author SHA1 Message Date
Andreas Christou
97a90591ca
AzureMonitor: Fix App Insights portal URL for multi-resource trace queries (#94119)
* Retrieve the resource in the query

* Appropriately construct url

* Update tests
2024-10-09 14:21:10 +01:00
Andreas Christou
564ee32b04
AzureMonitor: Improve errorsource (#93533)
* Improve errorsource

* Fix imports
2024-09-24 12:45:44 -05:00
Andrew Hackmann
8b6cec2356
Azure Monitor: Blank result formats are not overwritten (#93493)
* if result format is null from previous query, it will be null and not correct to a different format

* update to not have empty value in result format field

* fix tests

* add check to see if options are in list

* reformat stuff so logic lives on the right layer

* linterrrrrrrrrrrrrrrrrrRR

* Apply suggestions from code review

* if result format is null from previous query, it will be null and not correct to a different format

* update to not have empty value in result format field

* fix tests

* add check to see if options are in list

* reformat stuff so logic lives on the right layer

* linterrrrrrrrrrrrrrrrrrRR

* frontend linter

* linter

* feedback :)
2024-09-20 02:30:03 +03:00
Alyssa (Bull) Joyner
0049e4f997
Add basic logs enabled check (#92324) 2024-09-09 13:35:56 -06:00
Andreas Christou
d61530941a
AzureMonitor: Add errorsource (#92094)
* Add errorsource

* Migrate to individually build metric queries

* Migrate logs queries to be built individually

* Migrate to individually build resource graph queries
2024-09-09 10:29:35 +01:00
Adam Yeats
3ce1a5b0ca
AzureMonitor: Fix out of bounds error when accessing metricNamespaceArray and resourceNameArray in buildResourceURI (#89222)
Fix out of range error when accessing metricNamespaceArray in buildResourceURI
2024-07-25 11:19:15 +01:00
Adam Simpson
a7d37d4ed5
azuremonitor: add labels for single resource query (#90832)
* azuremonitor: add labels for single resource query

* fix tests
2024-07-23 13:31:44 -04:00
Marcus Efraimsson
c8af659f02
Plugins: Enhanced plugin instrumentation (#90199)
* Plugins: Enhanced plugin instrumentation

* use backend.CallResourceResponseSenderFunc

* sdk v0.237.0

* support admission control

* cover all handlers in log and metrics middlewares

* fix after review
2024-07-09 15:03:46 +02:00
Dave Henderson
6262c56132
chore(perf): Pre-allocate where possible (enable prealloc linter) (#88952)
* chore(perf): Pre-allocate where possible (enable prealloc linter)

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>

* fix TestAlertManagers_buildRedactedAMs

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>

* prealloc a slice that appeared after rebase

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>

---------

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
2024-06-14 14:16:36 -04: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
Andreas Christou
f787418e4b
AzureMonitor: Fix bug detecting app insights queries (#88572)
Make regexp case insensitive
2024-06-04 16:16:31 +01: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
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
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
Erik Sundell
29d4f6a217
Datasource: Change query filtering (#84656)
* call filterQuery from queryrunner

* test query hide filtering

* fix more broken tests

* lint errrors

* remove redundant filterQuery call

* skip filter in variable queries

* fix broken cypress test

* change tooltip text

* fix translations

* fix comments

* do not execute query is targets are empty

* add more tests

* remove unsued import

* update translations

* revert id change

* change header text

* update comment for hide prop

* rename hide query prop

* change tooltip and introduce different toggle state text

* update tests

* update comment and regenerate types

* run extract again

* fix broken e2e test

* track event

* fix build issues

* revert changes in wire file
2024-03-21 13:39:39 +01: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
Andres Martinez Gotor
9298a5fcb5
AzureMonitor: Update standalone HTTP middlewares (#84833) 2024-03-21 08:53:27 +01:00
Andreas Christou
00c094f7cf
Azure: Update data link title for clarity (#84686)
Update data link title for clarity
2024-03-20 13:39:00 -05:00
Andreas Christou
6bb7ab261a
AzureMonitor: User authentication support (#81918)
* Stub out frontend user auth

* Stub out backend user auth

* Add context

* Reorganise files

* Refactor app registration form

* Alert for user auth service principal credentials

* AzureMonitor: Add flag for enabling/disabling fallback credentials for current user authentication (#82332)

* Rename field

* Add fallback setting

* Update tests and mock

* Remove duplicate setting line

* Update name of property

* Update frontend settings

* Update docs and default config files

* Update azure-sdk

* Fix lint

* Update test

* Bump dependency

* Update configuration

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Docs review

* AzureMonitor: User authentication frontend updates (#83107)

* Rename field

* Add fallback setting

* Update tests and mock

* Remove duplicate setting line

* Update name of property

* Update frontend settings

* Update docs and default config files

* Add alerts to query editor

- Add authenticatedBy property to grafana/data
- Update mocks
- Update query editor to disable it under certain circumstances
- Update tests

* Add separate FallbackCredentials component

- Reset AppRegistrationCredentials component to only handle clientsecret credentials
- Update AzureCredentialsForm
- Update selectors
- Update tests
- Update credentials utility functions logic

* Alert when fallback credentials disabled

* Update condition

* Update azure-sdk

* Fix lint

* Update test

* Remove unneeded conditions

* Set auth type correctly

* Legacy cloud options

* Fix client secret

* Remove accidental import

* Bump dependency

* Add tests

* Don't use VerticalGroup component

* Remove unused import

* Fix lint

* Appropriately set oAuthPassThru and disableGrafanaCache properties

* Clear azureCredentials on authType change

* Correctly retrieve secret

* Fix bug in authTypeOptions

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

Co-authored-by: Andrew Hackmann <5140848+bossinc@users.noreply.github.com>

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

Co-authored-by: Andrew Hackmann <5140848+bossinc@users.noreply.github.com>

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

Co-authored-by: Andrew Hackmann <5140848+bossinc@users.noreply.github.com>

* Add documentation links

* Fix broken link

---------

Co-authored-by: Andrew Hackmann <5140848+bossinc@users.noreply.github.com>

* AzureMonitor: Update docs for current user authentication (#83440)

* Rename field

* Add fallback setting

* Update tests and mock

* Remove duplicate setting line

* Update name of property

* Update frontend settings

* Update docs and default config files

* Add alerts to query editor

- Add authenticatedBy property to grafana/data
- Update mocks
- Update query editor to disable it under certain circumstances
- Update tests

* Add separate FallbackCredentials component

- Reset AppRegistrationCredentials component to only handle clientsecret credentials
- Update AzureCredentialsForm
- Update selectors
- Update tests
- Update credentials utility functions logic

* Alert when fallback credentials disabled

* Update condition

* Update azure-sdk

* Fix lint

* Update test

* Remove unneeded conditions

* Set auth type correctly

* Legacy cloud options

* Fix client secret

* Remove accidental import

* Bump dependency

* Add tests

* Don't use VerticalGroup component

* Remove unused import

* Update docs

* Fix lint

* Appropriately set oAuthPassThru and disableGrafanaCache properties

* Clear azureCredentials on authType change

* Correctly retrieve secret

* Feedback

* Spelling

* Update docs/sources/datasources/azure-monitor/_index.md

Co-authored-by: Larissa Wandzura <126723338+lwandz13@users.noreply.github.com>

* Update docs/sources/datasources/azure-monitor/_index.md

Co-authored-by: Larissa Wandzura <126723338+lwandz13@users.noreply.github.com>

* Update docs/sources/datasources/azure-monitor/_index.md

Co-authored-by: Larissa Wandzura <126723338+lwandz13@users.noreply.github.com>

* Update docs/sources/datasources/azure-monitor/_index.md

Co-authored-by: Larissa Wandzura <126723338+lwandz13@users.noreply.github.com>

---------

Co-authored-by: Larissa Wandzura <126723338+lwandz13@users.noreply.github.com>

* Docs review

* Update docs with additional configuration information

* Fix to appropriately hide the query editor

* Typo

* Update isCredentialsComplete

* Update test

---------

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Andrew Hackmann <5140848+bossinc@users.noreply.github.com>
Co-authored-by: Larissa Wandzura <126723338+lwandz13@users.noreply.github.com>
2024-03-19 16:32:24 +00:00
Andreas Christou
7c3f621688
Chore: Update grafana-azure-sdk-go (#84741)
* Update grafana-azure-sdk-go

* Update test
2024-03-19 14:56:40 +00:00
Andres Martinez Gotor
265200799d
Chore: Update grafana-plugin-sdk (#84289) 2024-03-12 17:13:23 +01:00
ismail simsek
22860a7978
Chore: Use mapUtil from grafana-plugin-sdk-go (#84297)
use mapUtil from grafana-plugin-sdk-go
2024-03-12 10:08:10 -05:00
Adam Yeats
facb19fefb
AzureMonitor: Fix mishandled resources vs workspaces (#83184) 2024-02-27 16:46: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
Sergey Kostrukov
9bfb7e1f0b
Azure Monitor: Azure routes from Grafana Azure SDK (#82043)
Prometheus: Azure routes from Grafana Azure SDK
2024-02-08 10:42:20 +00:00
Andrew Hackmann
b411aa7266
Azure Monitor: use NewLoggerWith func instead of backend.Logger (#81124)
using NewLoggerWith
2024-01-26 22:53:55 +00:00
Andreas Christou
dd77ff6bcd
Plugins: Externalise Azure Monitor data source (#79545)
* Set up frontend linting for Azure

- Fix final frontend import
- Fix other lint issues

* Add Azure Monitor to backend linting

* Remove featuremgmt dependency

* Add intervalv2 to list of disallowed imports

* Remove config dependency

- Replace with function from azure-sdk

* Remove util dependency

* Duplicate interval functionality from core

* Add required backend wrappers

* Update frontend

* Add testing helper

* Add missing package

* Bump minimum grafana dependency

* Fix dependency

* Regen cue

* Fix lint

* Update expected response file

* Update import and dependency
2024-01-03 19:20:22 +00:00
Sergey Kostrukov
40152922d3
Azure Monitor: support AzureCredentials in common format on backend (#77424)
* Use GetDefaultCloud from SDK

* Use GetAzureCloud from SDK

* Credentials parser moved to azmoncredentials

* Refactor legacy credentials

* Tests

* Fix test description

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

---------

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2023-11-15 14:59:23 +00:00
Andreas Christou
8808de0b45
AzureMonitor: Improve error handling and update tests (#77967)
* Improve error handling and update tests

* Assert errors are nil

* Refactor away redundant code
2023-11-09 21:13:07 +00:00
Andreas Christou
6df5b30fa3
Azure: Remove data plane feature toggle (#77754)
* Remove feature toggle

* Fix test and lint
2023-11-08 15:02:46 +00:00
Alyssa Bull
a4744a8f5e
Azure Monitor: buildResourceURI function incorrectly migrating (#77178) 2023-11-02 14:30:18 -06:00
Andrew Hackmann
91ad07719f
Azure monitor: Support Logs visualization (#76594)
* logs view

* cant add a library

* gzip doesnt work

* remove link code :(

* clean up

* linter

* linter

* betterer. cant run this locally??

* Remove unneeded conversions

* Return portal link for log queries from backend

* Display portal link

* Update tests

* Lint

* Prettier

* Unused import

* Add Azure Monitor to explore docs

---------

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2023-10-18 18:19:35 +03:00
Will Browne
9d92818cae
Plugins: Update PDC pattern from latest plugin SDK changes (#76576)
* update with sdk

* do sql

* fix core plugins

* fix proxy settings

* bump SDK version

* tidy

* enable pdc for test

* add codeowners

* bump dep

* go mod tidy

* bump SDK
2023-10-16 16:40:04 +02:00
Dan Cech
91cf4f0c1c
Revert "Plugins: Update PDC pattern from latest plugin SDK changes" (#76565)
Revert "Plugins: Update PDC pattern from latest plugin SDK changes (#76036)"

This reverts commit 151f6d6216.
2023-10-13 12:35:16 -04:00
Will Browne
151f6d6216
Plugins: Update PDC pattern from latest plugin SDK changes (#76036)
* update with sdk

* do sql

* fix core plugins

* fix proxy settings

* bump SDK version

* tidy

* enable pdc for test

* add codeowners
2023-10-13 14:42:15 +02:00
Andrew Hackmann
e087a8ab05
Azure monitor/remove graf tracing (#75927)
* trying to remove tracing

* trying to remove tracing

* use plugin sdk tracing

* tracing is not init

* add infra tracing back

* remove infra trace

* Update pkg/tsdb/azuremonitor/metrics/azuremonitor-datasource.go

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

* pr feedback

* remove code from other pr

---------

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2023-10-05 02:38:26 +03:00
Marcus Efraimsson
e4c1a7a141
Tracing: Standardize on otel tracing (#75528) 2023-10-03 14:54:20 +02:00
Andreas Christou
5796836662
Azure: Add support for Workload Identity authentication (#75681)
* Update Azure Monitor

* Update Prometheus

* Update README

* Update docs/sources/datasources/azure-monitor/_index.md

Co-authored-by: Andrew Hackmann <5140848+bossinc@users.noreply.github.com>

* Update docs/sources/datasources/azure-monitor/_index.md

Co-authored-by: Beverly <131809838+BeverlyJaneJ@users.noreply.github.com>

* Update docs/sources/datasources/azure-monitor/_index.md

Co-authored-by: Beverly <131809838+BeverlyJaneJ@users.noreply.github.com>

* Update docs/sources/datasources/azure-monitor/_index.md

Co-authored-by: Beverly <131809838+BeverlyJaneJ@users.noreply.github.com>

* README updates

* Fix prettier

* memoize options

---------

Co-authored-by: Andrew Hackmann <5140848+bossinc@users.noreply.github.com>
Co-authored-by: Beverly <131809838+BeverlyJaneJ@users.noreply.github.com>
2023-09-29 12:35:11 +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
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
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
Andrew Hackmann
41ca13418b
AzureMonitor: Remove infra client (#74113)
remove infra client from azure monitor
2023-09-05 09:00:21 -05: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
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
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
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
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
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
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