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 2.0.0 to 2.0.1

3

lib/config/EnvironmentConfigurationProvider.js

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

Object.defineProperty(exports, "__esModule", { value: true });
const Constants_1 = require("../Constants");
const Environments_1 = require("../environment/Environments");

@@ -29,2 +30,3 @@ const ENV_VAR_PREFIX = 'AWS_EMF';

ConfigKeys["ENVIRONMENT_OVERRIDE"] = "ENVIRONMENT";
ConfigKeys["NAMESPACE"] = "NAMESPACE";
})(ConfigKeys || (ConfigKeys = {}));

@@ -41,2 +43,3 @@ class EnvironmentConfigurationProvider {

environmentOverride: this.getEnvironmentOverride(),
namespace: this.getEnvVariable(ConfigKeys.NAMESPACE) || Constants_1.Constants.DEFAULT_NAMESPACE,
};

@@ -43,0 +46,0 @@ }

@@ -38,2 +38,6 @@ import Environments from '../environment/Environments';

environmentOverride: Environments | undefined;
/**
* Sets the CloudWatch namespace that extracted metrics should be published to.
*/
namespace: string;
}

4

lib/logger/MetricsContext.js

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

Object.defineProperty(exports, "__esModule", { value: true });
const Constants_1 = require("../Constants");
const Configuration_1 = require("../config/Configuration");
const Logger_1 = require("../utils/Logger");

@@ -37,3 +37,3 @@ const MetricValues_1 = require("./MetricValues");

this.shouldUseDefaultDimensions = true;
this.namespace = namespace || Constants_1.Constants.DEFAULT_NAMESPACE;
this.namespace = namespace || Configuration_1.default.namespace;
this.properties = properties || {};

@@ -40,0 +40,0 @@ this.dimensions = dimensions || [];

@@ -31,3 +31,3 @@ "use strict";

this.endpoint = endpoint;
this.socket = new net.Socket({ allowHalfOpen: true })
this.socket = new net.Socket({ allowHalfOpen: true, writable: false })
.setEncoding('utf8')

@@ -34,0 +34,0 @@ .setKeepAlive(true)

{
"name": "aws-embedded-metrics",
"version": "2.0.0",
"version": "2.0.1",
"description": "AWS Embedded Metrics Client Library",

@@ -48,3 +48,3 @@ "main": "lib/index.js",

"prettier": "^1.19.1",
"ts-jest": "^24.0.2",
"ts-jest": "^26.1.1",
"typescript": "^3.8.0"

@@ -51,0 +51,0 @@ },

@@ -294,2 +294,3 @@ # aws-embedded-metrics

- EC2: decorates logs with EC2 metadata and sends over TCP
- ECS: decorates logs with ECS metadata and enables support for Firelens

@@ -315,2 +316,20 @@ Example:

**Namespace**: Sets the CloudWatch [namespace](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Namespace) that extracted metrics should be published to. If not set, a default value of aws-embedded-metrics will be used.
Requirements:
- Name Length 1-255 characters
- Name must be ASCII characters only
Example:
```js
// in process
const { Configuration } = require("aws-embedded-metrics");
Configuration.namespace = "Namespace";
// environment
AWS_EMF_NAMESPACE=Namespace
```
## Examples

@@ -317,0 +336,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