Skip to content

Azure Monitor: log error responses from Azure Monitor endpoints #59077

@kostrse

Description

@kostrse

What happened:

In case if a request to Azure Monitor / Azure Management API endpoint failed with an error, Grafana logs do not provide any insight other than status code.

What you expected to happen:

Grafana should log error response (at least error message) from the data endpoint, so the logs could be captured and analyzed.

How to reproduce it (as minimally and precisely as possible):

Current log output looks like this:

INFO [11-21|21:20:52] Request Completed                        logger=context traceID=00000000000000000000000000000000 userId=123 orgId=1 [email protected] method=GET path=/api/datasources/2/resources/azuremonitor/subscriptions status=401 remote_addr=[xxx] time_ms=233 duration=233.6361ms size=76 referer=http://yyy/datasources/edit/uaCMDFqGk traceID=00000000000000000000000000000000 handler=/api/datasources/:id/resources/*

Anything else we need to know?:

A customer reported a problem with authentication in Azure Monitor datasource and there's no way to investigate the problem on our side because Grafana doesn't log any details.

Environment:

  • Grafana version: main
  • Data source type & version: Azure Monitor
  • OS Grafana is installed on:
  • User OS & Browser:
  • Grafana plugins:
  • Others:

Metadata

Metadata

Assignees

Labels

datasource/AzureAzure Monitor Datasourcekind/enhancementprio/highMust be staffed and worked on either currently, or very soon, ideally in time for the next release.staleIssue with no recent activitytype/feature-request

Type

No type

Projects

Status

Feature Requests

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions