Skip to content

Conversation

@vatti-10
Copy link
Contributor

@vatti-10 vatti-10 commented Jun 7, 2025

Issue # (if applicable)

Closes #34643

Reason for this change

When the metric filter is created, you can specify the dimension map for the metric. When you extract the metric out of the metric filter, the extracted metric will not include the dimension map, and you will be forced to manually add it to the metric.

Description of changes

This PR preserves the dimension map used when creating the metric filter and then applies it back when extracting the metric using the MetricFilter.metric() API.

Describe any new or updated permissions being added

N/A

Description of how you validated changes

Added new unit and integration test that verify the extracted metric still includes the original dimension map used when creating the metric filter.

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

… the dimension map if any was provided when creating the filter
@github-actions github-actions bot added bug This issue is a bug. p2 beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK labels Jun 7, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team June 7, 2025 21:40
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Jun 7, 2025
@alvazjor alvazjor self-assigned this Jun 10, 2025
@mergify
Copy link
Contributor

mergify bot commented Jun 10, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: b1fd9aa
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Jun 10, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 892b013 into aws:main Jun 10, 2025
10 checks passed
@github-actions
Copy link
Contributor

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK bug This issue is a bug. p2 pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cloudwatch: MetricFilter.metric() does not use dimensions

3 participants