ryan-mars / stochastic

TypeScript framework for building event-driven services. Easily go from Event Storming → Code.
MIT License
6 stars 1 forks source link

Construct: Metrics, Dashboards and Alarms #83

Open sam-goodwin opened 3 years ago

sam-goodwin commented 3 years ago

We should integrate the LambdaRuntime with the embedded metrics library to output a base level of domain specific metrics for Command, Event, Policy, ReadModel.

Then we can generate dashboards and alarms on the infrastructure side, allowing for developers to customize the thresholds but providing sane defaults out of the box.

Our dashboards can also link to pre-populated cloud watch insights queries that search for event handler logs or even search a cloud watch log that includes all events in a BoundedContext.

sam-goodwin commented 3 years ago

@davehimself any thoughts on best practices for out-of-the-box metrics?

ryan-mars commented 3 years ago

Should X-Ray be part of this?

sam-goodwin commented 3 years ago

Should X-Ray be part of this?

Good point, we should definitely leverage X-Ray. I don't have personal experience with X-Ray so will have to look into it.

davehimself commented 3 years ago

X-Ray should. From an ops perspective, tracing is the primary methodology for monitoring microservices and/or distributed architectures. Second to that, error rates and variances in "expected" $probe over $time (e.g., I/O writes per second).

I can envision such characteristics being captured during event storming.

ryan-mars commented 3 years ago

I can envision such characteristics being captured during event storming.

@davehimself What kinds of characteristics should be captured during event storming? Are you referring to business metrics or ops metrics?