dazn-lambda-powertools
dazn-lambda-powertools copied to clipboard
Support custom metrics in the timeout middleware
This is a Feature Proposal
Description
- Need a way to also track the occurrence of timeouts as a metric. Ideally a way to plug in datadog or newrelic clients to track custom metrics
cc @onlyplo
As I mentioned on the other thread, the simplest solution I can think of is to let you pass in a callback function, but let's carry on the discussed on the other thread.
Yo, the initial work i have done here: https://github.com/getndazn/dazn-lambda-powertools/commit/d4f873b9e705ceb5f415b57be1fa2c4fe37a2e8c already starts to extend the middleware with a custom callback function.
Will probably need to change the naming and some logic based on our discussions to split off custom logging and custom metrics into separate issues.
Happy for me to submit a PR for this?
Sure, go for it!
@onlyplo any update on this?