Skip to content

cloudwatch: MetricFilter.metric() does not use dimensions #34643

@jakajancar

Description

@jakajancar

Describe the bug

The Metric returned from MetricFilter.metric() uses the namespace and name from the filter, but not the dimensions.

Not really a problem since you can override the dimensions manually, either by passing them when calling MetricFilter.metric() or by just creating the metric from scratch, but it seems reasonable to expect all of the filter properties would be passed to the metric.

Regression Issue

  • Select this option if this issue appears to be a regression.

Last Known Working CDK Library Version

No response

Expected Behavior

x

Current Behavior

x

Reproduction Steps

x

Possible Solution

No response

Additional Information/Context

No response

AWS CDK Library version (aws-cdk-lib)

v22.14.0

AWS CDK CLI version

2.1018.0

Node.js Version

v22.14.0

OS

linux

Language

TypeScript

Language Version

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions