-
Notifications
You must be signed in to change notification settings - Fork 1
feat(stochastic): log out metrics for all handlers in LambdaRuntime. #88
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good!
Ugh, the build is failing because of that annoying CDK version bug but it isn't happening locally... Will fix tomorrow. Should we try CDK 2.0? I worry about this for stochastic users. |
I also consolidated our jest configurations into one |
examples/airline/scheduling/src/__snapshots__/service.test.ts.snap
Outdated
Show resolved
Hide resolved
I have no problem with moving to CDK 2.0 now. |
|
Adds metrics and dashboards for #83
Closes #60
Closes #89
Closes #101
This change instruments our Command and Policy handlers to capture granular metrics such as the timing and success/fail rate of handling an event in a particular policy. We leverage the domain graph model to automatically track these granular merics and add them to a CloudWatch dashboard. The dashboards are a separate CDK stack than the BoundedContext to separate concerns. Not sure if this is a premature optimization.
Example dashboard:
See how the Policy dashboard has a metric for each event the Policy handles. We have similar metrics for the Command, tracking which Events were emitted by it.