Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@middy/cloudwatch-metrics

Package Overview
Dependencies
Maintainers
3
Versions
131
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@middy/cloudwatch-metrics - npm Package Compare versions

Comparing version 2.0.1 to 2.1.0

6

package.json
{
"name": "@middy/cloudwatch-metrics",
"version": "2.0.1",
"version": "2.1.0",
"description": "Embedded CloudWatch metrics middleware for the middy framework",

@@ -55,5 +55,5 @@ "type": "commonjs",

"devDependencies": {
"@middy/core": "^2.0.1"
"@middy/core": "^2.1.0"
},
"gitHead": "b0eca01cad1b16439cb4dc21dab92b7221f52515"
"gitHead": "966ce6cb0ebba61fc7d60d9baa37395a9eaf4a51"
}

@@ -13,4 +13,4 @@ # Middy Cloudwatch metrics middleware

<p>
<a href="http://badge.fury.io/js/%40middy%2Fsecrets-manager">
<img src="https://badge.fury.io/js/%40middy%2Fsecrets-manager.svg" alt="npm version" style="max-width:100%;">
<a href="http://badge.fury.io/js/%40middy%2Fcloudwatch-metrics">
<img src="https://badge.fury.io/js/%40middy%2Fcloudwatch-metrics.svg" alt="npm version" style="max-width:100%;">
</a>

@@ -43,3 +43,3 @@ <a href="https://snyk.io/test/github/middyjs/middy">

```bash
npm install --save @middy/metrics
npm install --save @middy/cloudwatch-metrics
```

@@ -64,11 +64,10 @@

const middy = require('@middy/core')
const metrics = require('@middy/metrics')
const cloudwatchMetrics = require('@middy/cloudwatch-metrics')
const handler = middy((event, context, cb) => {
const handler = middy((event, context) => {
context.metrics.putMetric("ProcessingLatency", 100, "Milliseconds");
context.metrics.setProperty("RequestId", "422b1569-16f6-4a03-b8f0-fe3fd9b100f8")
cb(null, {})
})
handler.use(metrics({
handler.use(cloudwatchMetrics({
namspace: "myAppliction",

@@ -75,0 +74,0 @@ dimensions: [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc