@opentelemetry/resource-detector-aws
Advanced tools
Comparing version 0.19.1-alpha.39 to 0.19.1-alpha.43
@@ -21,2 +21,3 @@ "use strict"; | ||
const resources_1 = require("@opentelemetry/resources"); | ||
const semantic_conventions_1 = require("@opentelemetry/semantic-conventions"); | ||
const fs = require("fs"); | ||
@@ -49,6 +50,8 @@ const util = require("util"); | ||
return new resources_1.Resource({ | ||
[resources_1.SERVICE_RESOURCE.NAME]: 'elastic_beanstalk', | ||
[resources_1.SERVICE_RESOURCE.NAMESPACE]: parsedData.environment_name, | ||
[resources_1.SERVICE_RESOURCE.VERSION]: parsedData.version_label, | ||
[resources_1.SERVICE_RESOURCE.INSTANCE_ID]: parsedData.deployment_id, | ||
[semantic_conventions_1.ResourceAttributes.CLOUD_PROVIDER]: semantic_conventions_1.CloudProviderValues.AWS, | ||
[semantic_conventions_1.ResourceAttributes.CLOUD_PLATFORM]: semantic_conventions_1.CloudPlatformValues.AWS_ELASTICBEANSTALK, | ||
[semantic_conventions_1.ResourceAttributes.SERVICE_NAME]: semantic_conventions_1.CloudPlatformValues.AWS_ELASTICBEANSTALK, | ||
[semantic_conventions_1.ResourceAttributes.SERVICE_NAMESPACE]: parsedData.environment_name, | ||
[semantic_conventions_1.ResourceAttributes.SERVICE_VERSION]: parsedData.version_label, | ||
[semantic_conventions_1.ResourceAttributes.SERVICE_INSTANCE_ID]: parsedData.deployment_id, | ||
}); | ||
@@ -55,0 +58,0 @@ } |
@@ -20,2 +20,3 @@ "use strict"; | ||
const resources_1 = require("@opentelemetry/resources"); | ||
const semantic_conventions_1 = require("@opentelemetry/semantic-conventions"); | ||
const http = require("http"); | ||
@@ -56,9 +57,10 @@ /** | ||
return new resources_1.Resource({ | ||
[resources_1.CLOUD_RESOURCE.PROVIDER]: 'aws', | ||
[resources_1.CLOUD_RESOURCE.ACCOUNT_ID]: accountId, | ||
[resources_1.CLOUD_RESOURCE.REGION]: region, | ||
[resources_1.CLOUD_RESOURCE.ZONE]: availabilityZone, | ||
[resources_1.HOST_RESOURCE.ID]: instanceId, | ||
[resources_1.HOST_RESOURCE.TYPE]: instanceType, | ||
[resources_1.HOST_RESOURCE.NAME]: hostname, | ||
[semantic_conventions_1.ResourceAttributes.CLOUD_PROVIDER]: semantic_conventions_1.CloudProviderValues.AWS, | ||
[semantic_conventions_1.ResourceAttributes.CLOUD_PLATFORM]: semantic_conventions_1.CloudPlatformValues.AWS_EC2, | ||
[semantic_conventions_1.ResourceAttributes.CLOUD_ACCOUNT_ID]: accountId, | ||
[semantic_conventions_1.ResourceAttributes.CLOUD_REGION]: region, | ||
[semantic_conventions_1.ResourceAttributes.CLOUD_AVAILABILITY_ZONE]: availabilityZone, | ||
[semantic_conventions_1.ResourceAttributes.HOST_ID]: instanceId, | ||
[semantic_conventions_1.ResourceAttributes.HOST_TYPE]: instanceType, | ||
[semantic_conventions_1.ResourceAttributes.HOST_NAME]: hostname, | ||
}); | ||
@@ -65,0 +67,0 @@ } |
@@ -21,2 +21,3 @@ "use strict"; | ||
const resources_1 = require("@opentelemetry/resources"); | ||
const semantic_conventions_1 = require("@opentelemetry/semantic-conventions"); | ||
const util = require("util"); | ||
@@ -47,4 +48,6 @@ const fs = require("fs"); | ||
: new resources_1.Resource({ | ||
[resources_1.CONTAINER_RESOURCE.NAME]: hostName || '', | ||
[resources_1.CONTAINER_RESOURCE.ID]: containerId || '', | ||
[semantic_conventions_1.ResourceAttributes.CLOUD_PROVIDER]: semantic_conventions_1.CloudProviderValues.AWS, | ||
[semantic_conventions_1.ResourceAttributes.CLOUD_PLATFORM]: semantic_conventions_1.CloudPlatformValues.AWS_ECS, | ||
[semantic_conventions_1.ResourceAttributes.CONTAINER_NAME]: hostName || '', | ||
[semantic_conventions_1.ResourceAttributes.CONTAINER_ID]: containerId || '', | ||
}); | ||
@@ -51,0 +54,0 @@ } |
@@ -20,2 +20,3 @@ "use strict"; | ||
const resources_1 = require("@opentelemetry/resources"); | ||
const semantic_conventions_1 = require("@opentelemetry/semantic-conventions"); | ||
const https = require("https"); | ||
@@ -65,4 +66,6 @@ const fs = require("fs"); | ||
: new resources_1.Resource({ | ||
[resources_1.K8S_RESOURCE.CLUSTER_NAME]: clusterName || '', | ||
[resources_1.CONTAINER_RESOURCE.ID]: containerId || '', | ||
[semantic_conventions_1.ResourceAttributes.CLOUD_PROVIDER]: semantic_conventions_1.CloudProviderValues.AWS, | ||
[semantic_conventions_1.ResourceAttributes.CLOUD_PLATFORM]: semantic_conventions_1.CloudPlatformValues.AWS_EKS, | ||
[semantic_conventions_1.ResourceAttributes.K8S_CLUSTER_NAME]: clusterName || '', | ||
[semantic_conventions_1.ResourceAttributes.CONTAINER_ID]: containerId || '', | ||
}); | ||
@@ -69,0 +72,0 @@ } |
@@ -20,2 +20,3 @@ "use strict"; | ||
const resources_1 = require("@opentelemetry/resources"); | ||
const semantic_conventions_1 = require("@opentelemetry/semantic-conventions"); | ||
/** | ||
@@ -35,13 +36,12 @@ * The AwsLambdaDetector can be used to detect if a process is running in AWS Lambda | ||
const attributes = { | ||
[resources_1.CLOUD_RESOURCE.PROVIDER]: 'aws', | ||
[semantic_conventions_1.ResourceAttributes.CLOUD_PROVIDER]: String(semantic_conventions_1.CloudProviderValues.AWS), | ||
}; | ||
if (region) { | ||
attributes[resources_1.CLOUD_RESOURCE.REGION] = region; | ||
attributes[semantic_conventions_1.ResourceAttributes.CLOUD_REGION] = region; | ||
} | ||
// TODO(https://github.com/open-telemetry/opentelemetry-js/issues/2123): Migrate to FAAS_RESOURCE when defined. | ||
if (functionName) { | ||
attributes['faas.name'] = functionName; | ||
attributes[semantic_conventions_1.ResourceAttributes.FAAS_NAME] = functionName; | ||
} | ||
if (functionVersion) { | ||
attributes['faas.version'] = functionVersion; | ||
attributes[semantic_conventions_1.ResourceAttributes.FAAS_VERSION] = functionVersion; | ||
} | ||
@@ -48,0 +48,0 @@ return new resources_1.Resource(attributes); |
{ | ||
"name": "@opentelemetry/resource-detector-aws", | ||
"version": "0.19.1-alpha.39+23ba4bfd", | ||
"version": "0.19.1-alpha.43+d5517812", | ||
"description": "OpenTelemetry SDK resource detector for AWS", | ||
@@ -42,8 +42,7 @@ "main": "build/src/index.js", | ||
"devDependencies": { | ||
"@opentelemetry/api": "^1.0.0-rc.0", | ||
"@opentelemetry/api": "^0.20.0", | ||
"@types/mocha": "8.2.2", | ||
"@types/node": "14.14.41", | ||
"@types/node": "14.14.43", | ||
"@types/sinon": "9.0.11", | ||
"codecov": "3.8.1", | ||
"gts": "3.1.0", | ||
"mocha": "7.2.0", | ||
@@ -56,12 +55,13 @@ "nock": "12.0.3", | ||
"ts-node": "9.1.1", | ||
"typescript": "4.2.4" | ||
"typescript": "4.3.2" | ||
}, | ||
"peerDependencies": { | ||
"@opentelemetry/api": "^1.0.0-rc.0" | ||
"@opentelemetry/api": "^0.20.0" | ||
}, | ||
"dependencies": { | ||
"@opentelemetry/core": "^0.19.1-alpha.39+23ba4bfd", | ||
"@opentelemetry/resources": "^0.19.1-alpha.39+23ba4bfd" | ||
"@opentelemetry/core": "^0.19.1-alpha.43+d5517812", | ||
"@opentelemetry/resources": "^0.19.1-alpha.43+d5517812", | ||
"@opentelemetry/semantic-conventions": "^0.19.1-alpha.43+d5517812" | ||
}, | ||
"gitHead": "23ba4bfdc77c8bf594bf0c817320a31f59ca0bd4" | ||
"gitHead": "d5517812b31d9206131bf1df4f8a3b5183ab07fb" | ||
} |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
63652
13
786
4