cdklabs / cdk-monitoring-constructs

Easy-to-use CDK constructs for monitoring your AWS infrastructure
https://constructs.dev/packages/cdk-monitoring-constructs
Apache License 2.0
444 stars 56 forks source link

I can't remove "Region" dimension from EventBridge Pipes custom metrics #384

Closed fabio-vitali-docebo closed 1 year ago

fabio-vitali-docebo commented 1 year ago

Version

v5.2.0

Steps and/or minimal code example to reproduce

const monitor = new MonitoringFacade(...);
const metricFactory = monitor.createMetricFactory();

metricFactory.createMetric(
    name: 'Duration',
    statistic: MetricStatistic.P95,
    name: 'Duration',
    { PipeName: pipe.pipeName },
    undefined,
    'EventBridge/Pipes',
    Duration.minutes(10)
);

Expected behavior

I want to create the custom metric with only the "PipeName" dimension

Actual behavior

The "Region" dimension is present

Screenshot 2023-06-16 at 09 18 29

Other details

EventBridge Pipes metrics can only be partitioned by "PipeName" dimension so, with "Region" additional dimension, I can't see PipeName partitioned metrics diagrams on CloudWatch.

If I pick the metric browsing the "EventBridge/Pipes" namespace as I show below, the "Duration" metric about a specific PipeName is showed:

Screenshot 2023-06-16 at 09 19 45
fabio-vitali-docebo commented 1 year ago

Sorry, I misunderstood some information that CloudWatch displays, in fact, incorrectly. the real problem seems to be the incorrect namespace of the metrics: instead of "EventBridge/Pipes" it should have been "AWS/EventBridge/Pipes".