Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vertical annotations for CloudWatch GraphWidgets #7622

Closed
bappa601 opened this issue Apr 27, 2020 · 11 comments · Fixed by #26819
Closed

Vertical annotations for CloudWatch GraphWidgets #7622

bappa601 opened this issue Apr 27, 2020 · 11 comments · Fixed by #26819
Assignees
Labels
@aws-cdk/aws-cloudwatch Related to Amazon CloudWatch effort/medium Medium work item – several days of effort feature-request A feature should be added or improved.

Comments

@bappa601
Copy link

Horizontal Annotations are available for GraphWidgets in CDK. But we don't have Vertical Annotations available in CDK

https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-cloudwatch.HorizontalAnnotation.html

Use Case

We normally plot Vertical lines i.e particular timestamps of deployments/Events in the Graphs during troubleshooting any particular issue.

Let say we want to check if Latency/Error counts increased after particular deployment or timestamp.

We have that same feature in Cloudwatch Console. We can create it manually.
But CDK doesn't have that same feature.

Proposed Solution

Add one more property for Graph Widget like Horizontal Annotation

https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-cloudwatch.HorizontalAnnotation.html

@bappa601 bappa601 added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Apr 27, 2020
@alluriv
Copy link

alluriv commented Apr 28, 2020

+1 Need to show deployments in related stacks of the CW graph. Once we have this we can identify which deployment is the rootcause

@SomayaB SomayaB added the @aws-cdk/aws-cloudwatch Related to Amazon CloudWatch label Apr 29, 2020
@rix0rrr
Copy link
Contributor

rix0rrr commented May 4, 2020

Happy to have this feature in CDK, but I have a hard time seeing the described use case in practice.

  • Would you go into your CDK code after every deployment to add a vertical annotation and redeploy the dashboards?
  • Would you just automatically add a vertical annotation with the current date and time in your CDK app, and assume the interval between synthesis and deployment is "not too long"?

Could you go into some detail how you would use this feature if available?

@rix0rrr rix0rrr added the effort/medium Medium work item – several days of effort label May 4, 2020
@SomayaB SomayaB removed the needs-triage This issue or PR still needs to be triaged. label May 19, 2020
@bappa601
Copy link
Author

Would you just automatically add a vertical annotation with the current date and time in your CDK app, and assume the interval between synthesis and deployment is "not too long"? ----

this one making more sense...

@alluriv
Copy link

alluriv commented May 27, 2020

I actually used lambda to add timelines as we cannot add timelines in CDK it will be huge. So it should not done as part of CDK as we cannot get live timelines

Create lambda which takes CW dashboards as input

  1. Create lambda which when triggered fetches events from given cloud formation stacks of service and store them in s3. Also creates vertical lines with deployment timelines in dashboards(different color for different stacks)
    Some points in above steps:
    a) We initially pick only stack level deployment start and end events for vertical lines in dashboards.
    b) We will fetch only new events information only as old events info is already stored
    c) For first run we pick last 90 days of the events.
    d) Even if old stack with same name is deleted we can pick events/deployments in that stack.

  2. when this lambda should be triggered: Ideally when ever events occur in Cloudformation template it should be triggered. It can be achieved by add notificationSNSarn which can trigger lambda.
    Issue is aws-cdk/packages/core is not supporting adding notificationSNSarn.
    Add notificationArn to a Cdk Stack #2528

Currently scheduled lambda every 15mins.
Below is the image of snapshot
Screenshot 2020-05-04 at 9 49 23 AM

@brendo-m
Copy link

This would be useful still. Right now my workaround is this: https://gist.github.com/brendo-m/a10f37a7248029a0e6a09b14b5e1600c

Seems like a small amount of work to add this upstream to CDK

@brendo-m
Copy link

#15809

@gshpychka
Copy link
Contributor

@bappa601 why'd you close this? It's still not available in CDK.

@rix0rrr shouldn't the fact that this feature is available in CloudWatch and Cfn be enough reason to implement in CDK? I would also love to be able to mark arbitrary events on my widgets.

@blim747
Copy link

blim747 commented Oct 19, 2022

I also agree this would be a super useful feature to automatically indicate deployments or infra changes in CI/CD pipelines

@brendo-m
Copy link

Revived my PR in #22568

@peterwoodworth
Copy link
Contributor

Reopened since this is not supported

jasonsaruulo pushed a commit to jasonsaruulo/aws-cdk that referenced this issue Aug 20, 2023
jasonsaruulo pushed a commit to jasonsaruulo/aws-cdk that referenced this issue Aug 20, 2023
jasonsaruulo pushed a commit to jasonsaruulo/aws-cdk that referenced this issue Aug 20, 2023
jasonsaruulo pushed a commit to jasonsaruulo/aws-cdk that referenced this issue Aug 20, 2023
jasonsaruulo pushed a commit to jasonsaruulo/aws-cdk that referenced this issue Aug 21, 2023
jasonsaruulo pushed a commit to jasonsaruulo/aws-cdk that referenced this issue Aug 21, 2023
jasonsaruulo pushed a commit to jasonsaruulo/aws-cdk that referenced this issue Sep 17, 2023
@mergify mergify bot closed this as completed in #26819 Sep 19, 2023
mergify bot pushed a commit that referenced this issue Sep 19, 2023
…6819)

Adds a verticalAnnotation property to GraphWidget, reference: https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/CloudWatch-Dashboard-Body-Structure.html#CloudWatch-Dashboard-Properties-Annotation-Format

Shoutout to brendo-m for coming up with the solution

Closes #7622.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

HBobertz pushed a commit that referenced this issue Sep 19, 2023
…6819)

Adds a verticalAnnotation property to GraphWidget, reference: https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/CloudWatch-Dashboard-Body-Structure.html#CloudWatch-Dashboard-Properties-Annotation-Format

Shoutout to brendo-m for coming up with the solution

Closes #7622.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-cloudwatch Related to Amazon CloudWatch effort/medium Medium work item – several days of effort feature-request A feature should be added or improved.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants