Commit Graph

7 Commits

Author SHA1 Message Date
Andres Martinez Gotor
b10ddfdf8c
AzureMonitor: Parse non-fatal errors for Logs (#51320) 2022-06-24 08:56:58 +02:00
Andreas Christou
ecaa1dcbfd
AzureMonitor: Migrate to backend checkHealth API (#50448)
* Add check health functions for each datasource and generic checkHealth function

* Log backend errors

* Update testDatasource function

- Remove unused testDatasource functions from pseudo datasources

* Switch datasource to extend DataSourceWithBackend

* Improve errors and responses from health endpoint

* Fix backend lint issues

* Remove unneeded frontend tests

* Remove unused/unnecessary datasource methods

* Update types

* Improve message construction

* Stubbing out checkHealth tests

* Update tests

- Remove comments
- Simplify structure

* Update log analytics health check to query data rather than retrieve workspace metadata

* Fix lint issue

* Fix frontend lint issues

* Update pkg/tsdb/azuremonitor/azuremonitor.go

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>

* Updates based on PR comments

- Don't use deprecated default workspace field
- Handle situation if no workspace is found by notifying user
- Correctly handle health responses

* Remove debug line

* Make use of defined api versions

* Remove field validation functions

* Expose errors in frontend

* Update errors and tests

* Remove instanceSettings

* Update error handling

* Improve error handling and presentation

* Update tests and correctly check error type

* Refactor AzureHealthCheckError and update tests

* Fix lint errors

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2022-06-20 11:33:13 +01:00
Kat Yang
3c3039f5b3
Chore: Remove Wrap (#50048)
* Chore: Remove Wrap and Wrapf

* Fix: Add error check
2022-06-03 09:24:24 +02:00
Kristin Laemmert
8f6877e12a
chore: remove all remaining uses of golang.org/x/net/context (#47564)
* chore: remove all remaining uses of  golang.org/x/net/context

This PR finishes the work started in #47532, replacing all calls to that package with the stdlib context and using http.NewRequestWithContext to include the context where necessary.

Bonus: small formatting fixes to goimports in these files.

closes #44178

* tweak: use context.Background in favor of TODO for tests
2022-04-11 14:20:10 -04:00
Sergey Kostrukov
5675496f6b
Migrate to Grafana Azure SDK (#47232) 2022-04-04 11:23:13 +02:00
Sergey Kostrukov
656ade9884
Shared Azure middleware between Azure Monitor and Prometheus datasources (#46002)
* Scopes in Azure middleware

* Enable Azure middleware without feature flag

* Use common Azure middleware in Azure Monitor

* Apply feature flag to JsonData configuration of Azure auth

* Enforce feature flag in Prometheus datasource

* Prometheus provider tests

* Datasource service tests

* Fix http client provider tests

* Pass sdkhttpclient.Options by reference

* Add middleware to httpclient.Options

* Remove dependency on Grafana settings

* Unit-tests updated

* Fix ds_proxy_test

* Fix service_test
2022-04-01 13:26:49 +02:00
Andres Martinez Gotor
700f6863f2
AzureMonitor: Move Application Insights and Insight Analytics to a deprecated package (#45834) 2022-03-02 15:41:07 +01:00