awslabs/aws-athena-query-federation

[BUG] Linked account metrics not included with connector Cloudwatch Metrics

Opened this issue · 0 comments

pjoe commented

Describe the bug
When using the CW metrics connector I want to query metrics including those from linked accounts

To Reproduce
Steps to reproduce the behavior:

  1. Link CW metrics from another account
  2. Setup Athena CW metrics connector
  3. Try querying the linked metrics

Expected behavior
The linked metrics are returned

Screenshots / Exceptions / Errors
No results are returned

Connector Details (please complete the following information):

  • Version: 2024.42.3
  • Name: cloudwatch-metrics

Additional context
I think you need to include IncludeLinkedAccounts=true when listing metrics, maybe around here: https://github.com/awslabs/aws-athena-query-federation/blob/master/athena-cloudwatch-metrics/src/main/java/com/amazonaws/athena/connectors/cloudwatch/metrics/MetricsRecordHandler.java#L154

See also API: https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_ListMetrics.html