New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

aws-embedded-metrics

Package Overview
Dependencies
Maintainers
2
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aws-embedded-metrics - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

2

lib/sinks/ConsoleSink.d.ts

@@ -11,4 +11,6 @@ import { MetricsContext } from '../logger/MetricsContext';

private serializer;
readonly console: Console;
private static readonly AWS_LAMBDA_LOG_FORMAT;
constructor(serializer?: ISerializer);
accept(context: MetricsContext): Promise<void>;
}

@@ -17,2 +17,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const console_1 = require("console");
const LogSerializer_1 = require("../serializers/LogSerializer");

@@ -27,2 +28,5 @@ /**

this.serializer = serializer || new LogSerializer_1.LogSerializer();
// To avoid escaping EMF when using Lambda JSON log format we need to use Console() instead of console
this.console =
process.env[ConsoleSink.AWS_LAMBDA_LOG_FORMAT] === 'JSON' ? new console_1.Console(process.stdout, process.stderr) : console;
}

@@ -32,3 +36,3 @@ accept(context) {

const events = this.serializer.serialize(context);
events.forEach(event => console.log(event));
events.forEach((event) => this.console.log(event));
return Promise.resolve();

@@ -38,1 +42,2 @@ }

exports.ConsoleSink = ConsoleSink;
ConsoleSink.AWS_LAMBDA_LOG_FORMAT = 'AWS_LAMBDA_LOG_FORMAT';

2

package.json
{
"name": "aws-embedded-metrics",
"version": "3.0.1",
"version": "3.0.2",
"description": "AWS Embedded Metrics Client Library",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -34,2 +34,5 @@ # aws-embedded-metrics

> **Important**
> Versions 4.1.1+, 3.0.2+, 2.0.7+ are required for usage in Lambda with JSON log format. Using previous versions in such Lambda environments will lead to metric loss.
## Usage

@@ -36,0 +39,0 @@

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