| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A serverless plugin to automatically create AWS:Logs:MetricFilter resources.
NPM:
npm install serverless-plugin-metric --save-dev
Add the plugin to serverless.yml
plugins:
- serverless-plugin-metricsetup metrics:
custom:
metrics: # Array<MetricOption>
- name: foo
pattern: "{ $.statusCode != 200 }"Info: In order to display the metric on CloudWatch it is necessary to receive data.
/**
* @typedef {object} MetricOption
* @property {string} name The name of the metric
* @property {string} pattern Filter patter doc (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html)
* @property {string[]} [functions] Default: ALL
* @property {string} [namespace] Override dynamic generated namespace (default: '<serviceName>/<stageName>')
* @property {string} [value] The value to apply to each occurence. (default: 1)
*/Built and maintained by Techthos.
| Back | FazBrowse Home | New Git URL |