1 | import middy from '@middy/core'
|
2 | import { MetricsLogger } from 'aws-embedded-metrics'
|
3 | import type { Context as LambdaContext } from 'aws-lambda'
|
4 | export { MetricsLogger } from 'aws-embedded-metrics'
|
5 |
|
6 | interface Options {
|
7 | namespace?: string
|
8 | dimensions?: Array<Record<string, string>>
|
9 | }
|
10 |
|
11 | export type Context = LambdaContext & {
|
12 | metrics: MetricsLogger
|
13 | }
|
14 |
|
15 | declare function cloudwatchMetrics (
|
16 | options?: Options
|
17 | ): middy.MiddlewareObj<unknown, any, Error, Context>
|
18 |
|
19 | export default cloudwatchMetrics
|
20 |
|
\ | No newline at end of file |