cdk-monitoring-constructs icon indicating copy to clipboard operation
cdk-monitoring-constructs copied to clipboard

Add Period value from Widget Context in Lambda function for bitmap widget rendering

Open naveen19991124 opened this issue 2 years ago • 2 comments

Version

1.22.6

Steps and/or minimal code example to reproduce

  1. Add renderingPreference: DashboardRenderingPreference.INTERACTIVE_AND_BITMAP to generate bitmap dashboards.
  2. Visit the generated Bitmap CW Dashboard in your AWS account.
  3. Set the period value for the dashboard to any value other than the set default value.
  4. Notice that there is no change in the datapoints for the metrics in dashboard widgets.

Expected behavior

The metric data for the widgets in bitmap dashboards should align with the set period value of the Bitmap dashboard.

Actual behavior

There is no change in the datapoints for the metrics in dashboard widgets.

Other details

No response

naveen19991124 avatar Dec 15 '22 17:12 naveen19991124

Some ideas:

  • Maybe a period change event listener needs to be registered?
  • We are maybe not using period from the context? https://github.com/aws-samples/cloudwatch-custom-widgets-samples/blob/main/README.md#is-the-custom-widget-passed-any-information-by-default

voho avatar Dec 21 '22 20:12 voho

Yes, correct we need to pass the period from the context.

naveen19991124 avatar Jan 03 '23 02:01 naveen19991124