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

@opentelemetry/resource-detector-aws

Package Overview
Dependencies
Maintainers
3
Versions
139
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentelemetry/resource-detector-aws - npm Package Compare versions

Comparing version 1.4.0 to 1.4.1

12

build/src/detectors/AwsBeanstalkDetector.js

@@ -49,8 +49,8 @@ "use strict";

return new resources_1.Resource({
[semantic_conventions_1.SemanticResourceAttributes.CLOUD_PROVIDER]: semantic_conventions_1.CloudProviderValues.AWS,
[semantic_conventions_1.SemanticResourceAttributes.CLOUD_PLATFORM]: semantic_conventions_1.CloudPlatformValues.AWS_ELASTIC_BEANSTALK,
[semantic_conventions_1.SemanticResourceAttributes.SERVICE_NAME]: semantic_conventions_1.CloudPlatformValues.AWS_ELASTIC_BEANSTALK,
[semantic_conventions_1.SemanticResourceAttributes.SERVICE_NAMESPACE]: parsedData.environment_name,
[semantic_conventions_1.SemanticResourceAttributes.SERVICE_VERSION]: parsedData.version_label,
[semantic_conventions_1.SemanticResourceAttributes.SERVICE_INSTANCE_ID]: parsedData.deployment_id,
[semantic_conventions_1.SEMRESATTRS_CLOUD_PROVIDER]: semantic_conventions_1.CLOUDPROVIDERVALUES_AWS,
[semantic_conventions_1.SEMRESATTRS_CLOUD_PLATFORM]: semantic_conventions_1.CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK,
[semantic_conventions_1.SEMRESATTRS_SERVICE_NAME]: semantic_conventions_1.CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK,
[semantic_conventions_1.SEMRESATTRS_SERVICE_NAMESPACE]: parsedData.environment_name,
[semantic_conventions_1.SEMRESATTRS_SERVICE_VERSION]: parsedData.version_label,
[semantic_conventions_1.SEMRESATTRS_SERVICE_INSTANCE_ID]: parsedData.deployment_id,
});

@@ -57,0 +57,0 @@ }

@@ -56,10 +56,10 @@ "use strict";

return new resources_1.Resource({
[semantic_conventions_1.SemanticResourceAttributes.CLOUD_PROVIDER]: semantic_conventions_1.CloudProviderValues.AWS,
[semantic_conventions_1.SemanticResourceAttributes.CLOUD_PLATFORM]: semantic_conventions_1.CloudPlatformValues.AWS_EC2,
[semantic_conventions_1.SemanticResourceAttributes.CLOUD_ACCOUNT_ID]: accountId,
[semantic_conventions_1.SemanticResourceAttributes.CLOUD_REGION]: region,
[semantic_conventions_1.SemanticResourceAttributes.CLOUD_AVAILABILITY_ZONE]: availabilityZone,
[semantic_conventions_1.SemanticResourceAttributes.HOST_ID]: instanceId,
[semantic_conventions_1.SemanticResourceAttributes.HOST_TYPE]: instanceType,
[semantic_conventions_1.SemanticResourceAttributes.HOST_NAME]: hostname,
[semantic_conventions_1.SEMRESATTRS_CLOUD_PROVIDER]: semantic_conventions_1.CLOUDPROVIDERVALUES_AWS,
[semantic_conventions_1.SEMRESATTRS_CLOUD_PLATFORM]: semantic_conventions_1.CLOUDPLATFORMVALUES_AWS_EC2,
[semantic_conventions_1.SEMRESATTRS_CLOUD_ACCOUNT_ID]: accountId,
[semantic_conventions_1.SEMRESATTRS_CLOUD_REGION]: region,
[semantic_conventions_1.SEMRESATTRS_CLOUD_AVAILABILITY_ZONE]: availabilityZone,
[semantic_conventions_1.SEMRESATTRS_HOST_ID]: instanceId,
[semantic_conventions_1.SEMRESATTRS_HOST_TYPE]: instanceType,
[semantic_conventions_1.SEMRESATTRS_HOST_NAME]: hostname,
});

@@ -66,0 +66,0 @@ }

@@ -41,4 +41,4 @@ "use strict";

let resource = new resources_1.Resource({
[semantic_conventions_1.SemanticResourceAttributes.CLOUD_PROVIDER]: semantic_conventions_1.CloudProviderValues.AWS,
[semantic_conventions_1.SemanticResourceAttributes.CLOUD_PLATFORM]: semantic_conventions_1.CloudPlatformValues.AWS_ECS,
[semantic_conventions_1.SEMRESATTRS_CLOUD_PROVIDER]: semantic_conventions_1.CLOUDPROVIDERVALUES_AWS,
[semantic_conventions_1.SEMRESATTRS_CLOUD_PLATFORM]: semantic_conventions_1.CLOUDPLATFORMVALUES_AWS_ECS,
}).merge(await AwsEcsDetector._getContainerIdAndHostnameResource());

@@ -82,4 +82,4 @@ const metadataUrl = (0, core_1.getEnv)().ECS_CONTAINER_METADATA_URI_V4;

return new resources_1.Resource({
[semantic_conventions_1.SemanticResourceAttributes.CONTAINER_NAME]: hostName || '',
[semantic_conventions_1.SemanticResourceAttributes.CONTAINER_ID]: containerId || '',
[semantic_conventions_1.SEMRESATTRS_CONTAINER_NAME]: hostName || '',
[semantic_conventions_1.SEMRESATTRS_CONTAINER_ID]: containerId || '',
});

@@ -103,15 +103,14 @@ }

const attributes = {
[semantic_conventions_1.SemanticResourceAttributes.AWS_ECS_CONTAINER_ARN]: containerArn,
[semantic_conventions_1.SemanticResourceAttributes.AWS_ECS_CLUSTER_ARN]: clusterArn,
[semantic_conventions_1.SemanticResourceAttributes.AWS_ECS_LAUNCHTYPE]: launchType === null || launchType === void 0 ? void 0 : launchType.toLowerCase(),
[semantic_conventions_1.SemanticResourceAttributes.AWS_ECS_TASK_ARN]: taskArn,
[semantic_conventions_1.SemanticResourceAttributes.AWS_ECS_TASK_FAMILY]: taskMetadata['Family'],
[semantic_conventions_1.SemanticResourceAttributes.AWS_ECS_TASK_REVISION]: taskMetadata['Revision'],
[semantic_conventions_1.SemanticResourceAttributes.CLOUD_ACCOUNT_ID]: accountId,
[semantic_conventions_1.SemanticResourceAttributes.CLOUD_REGION]: region,
[semantic_conventions_1.SEMRESATTRS_AWS_ECS_CONTAINER_ARN]: containerArn,
[semantic_conventions_1.SEMRESATTRS_AWS_ECS_CLUSTER_ARN]: clusterArn,
[semantic_conventions_1.SEMRESATTRS_AWS_ECS_LAUNCHTYPE]: launchType === null || launchType === void 0 ? void 0 : launchType.toLowerCase(),
[semantic_conventions_1.SEMRESATTRS_AWS_ECS_TASK_ARN]: taskArn,
[semantic_conventions_1.SEMRESATTRS_AWS_ECS_TASK_FAMILY]: taskMetadata['Family'],
[semantic_conventions_1.SEMRESATTRS_AWS_ECS_TASK_REVISION]: taskMetadata['Revision'],
[semantic_conventions_1.SEMRESATTRS_CLOUD_ACCOUNT_ID]: accountId,
[semantic_conventions_1.SEMRESATTRS_CLOUD_REGION]: region,
};
// The availability zone is not available in all Fargate runtimes
if (availabilityZone) {
attributes[semantic_conventions_1.SemanticResourceAttributes.CLOUD_AVAILABILITY_ZONE] =
availabilityZone;
attributes[semantic_conventions_1.SEMRESATTRS_CLOUD_AVAILABILITY_ZONE] = availabilityZone;
}

@@ -135,6 +134,6 @@ return new resources_1.Resource(attributes);

return new resources_1.Resource({
[semantic_conventions_1.SemanticResourceAttributes.AWS_LOG_GROUP_NAMES]: [logsGroupName],
[semantic_conventions_1.SemanticResourceAttributes.AWS_LOG_GROUP_ARNS]: [logsGroupArn],
[semantic_conventions_1.SemanticResourceAttributes.AWS_LOG_STREAM_NAMES]: [logsStreamName],
[semantic_conventions_1.SemanticResourceAttributes.AWS_LOG_STREAM_ARNS]: [logsStreamArn],
[semantic_conventions_1.SEMRESATTRS_AWS_LOG_GROUP_NAMES]: [logsGroupName],
[semantic_conventions_1.SEMRESATTRS_AWS_LOG_GROUP_ARNS]: [logsGroupArn],
[semantic_conventions_1.SEMRESATTRS_AWS_LOG_STREAM_NAMES]: [logsStreamName],
[semantic_conventions_1.SEMRESATTRS_AWS_LOG_STREAM_ARNS]: [logsStreamArn],
});

@@ -141,0 +140,0 @@ }

@@ -65,6 +65,6 @@ "use strict";

: new resources_1.Resource({
[semantic_conventions_1.SemanticResourceAttributes.CLOUD_PROVIDER]: semantic_conventions_1.CloudProviderValues.AWS,
[semantic_conventions_1.SemanticResourceAttributes.CLOUD_PLATFORM]: semantic_conventions_1.CloudPlatformValues.AWS_EKS,
[semantic_conventions_1.SemanticResourceAttributes.K8S_CLUSTER_NAME]: clusterName || '',
[semantic_conventions_1.SemanticResourceAttributes.CONTAINER_ID]: containerId || '',
[semantic_conventions_1.SEMRESATTRS_CLOUD_PROVIDER]: semantic_conventions_1.CLOUDPROVIDERVALUES_AWS,
[semantic_conventions_1.SEMRESATTRS_CLOUD_PLATFORM]: semantic_conventions_1.CLOUDPLATFORMVALUES_AWS_EKS,
[semantic_conventions_1.SEMRESATTRS_K8S_CLUSTER_NAME]: clusterName || '',
[semantic_conventions_1.SEMRESATTRS_CONTAINER_ID]: containerId || '',
});

@@ -71,0 +71,0 @@ }

@@ -35,13 +35,13 @@ "use strict";

const attributes = {
[semantic_conventions_1.SemanticResourceAttributes.CLOUD_PROVIDER]: String(semantic_conventions_1.CloudProviderValues.AWS),
[semantic_conventions_1.SemanticResourceAttributes.CLOUD_PLATFORM]: String(semantic_conventions_1.CloudPlatformValues.AWS_LAMBDA),
[semantic_conventions_1.SEMRESATTRS_CLOUD_PROVIDER]: String(semantic_conventions_1.CLOUDPROVIDERVALUES_AWS),
[semantic_conventions_1.SEMRESATTRS_CLOUD_PLATFORM]: String(semantic_conventions_1.CLOUDPLATFORMVALUES_AWS_LAMBDA),
};
if (region) {
attributes[semantic_conventions_1.SemanticResourceAttributes.CLOUD_REGION] = region;
attributes[semantic_conventions_1.SEMRESATTRS_CLOUD_REGION] = region;
}
if (functionName) {
attributes[semantic_conventions_1.SemanticResourceAttributes.FAAS_NAME] = functionName;
attributes[semantic_conventions_1.SEMRESATTRS_FAAS_NAME] = functionName;
}
if (functionVersion) {
attributes[semantic_conventions_1.SemanticResourceAttributes.FAAS_VERSION] = functionVersion;
attributes[semantic_conventions_1.SEMRESATTRS_FAAS_VERSION] = functionVersion;
}

@@ -48,0 +48,0 @@ return new resources_1.Resource(attributes);

{
"name": "@opentelemetry/resource-detector-aws",
"version": "1.4.0",
"version": "1.4.1",
"description": "OpenTelemetry SDK resource detector for AWS",

@@ -42,3 +42,3 @@ "main": "build/src/index.js",

"@opentelemetry/api": "^1.0.0",
"@opentelemetry/contrib-test-utils": "^0.37.0",
"@opentelemetry/contrib-test-utils": "^0.38.0",
"@types/mocha": "8.2.3",

@@ -61,6 +61,6 @@ "@types/node": "18.6.5",

"@opentelemetry/resources": "^1.0.0",
"@opentelemetry/semantic-conventions": "^1.0.0"
"@opentelemetry/semantic-conventions": "^1.22.0"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/detectors/node/opentelemetry-resource-detector-aws#readme",
"gitHead": "fcea8ca0c83cb1dcd8ac736e5ea4d22ff20dc982"
"gitHead": "17a0bc1da3baa472ba9b867eee3c60730cc130fb"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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