dazn-lambda-powertools icon indicating copy to clipboard operation
dazn-lambda-powertools copied to clipboard

Support custom metrics in the timeout middleware

Open theburningmonk opened this issue 4 years ago • 5 comments

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

theburningmonk avatar Sep 26 '19 20:09 theburningmonk

cc @onlyplo

theburningmonk avatar Sep 26 '19 20:09 theburningmonk

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.

theburningmonk avatar Sep 26 '19 20:09 theburningmonk

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?

onlyplo avatar Sep 30 '19 09:09 onlyplo

Sure, go for it!

theburningmonk avatar Sep 30 '19 10:09 theburningmonk

@onlyplo any update on this?

theburningmonk avatar Nov 21 '19 08:11 theburningmonk