@opentelemetry/resource-detector-aws
Advanced tools
Comparing version 0.19.1-alpha.12 to 0.19.1-alpha.19
@@ -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.12+25c205aa", | ||
"version": "0.19.1-alpha.19+9ce9eea7", | ||
"description": "OpenTelemetry SDK resource detector for AWS", | ||
@@ -61,6 +61,7 @@ "main": "build/src/index.js", | ||
"dependencies": { | ||
"@opentelemetry/core": "^0.19.1-alpha.12+25c205aa", | ||
"@opentelemetry/resources": "^0.19.1-alpha.12+25c205aa" | ||
"@opentelemetry/core": "^0.19.1-alpha.19+9ce9eea7", | ||
"@opentelemetry/resources": "^0.19.1-alpha.19+9ce9eea7", | ||
"@opentelemetry/semantic-conventions": "^0.19.0" | ||
}, | ||
"gitHead": "25c205aaffb6707d4275be6bade3e078e50e2df3" | ||
"gitHead": "9ce9eea7cad32cbc57bd80830f21e4f366ecf929" | ||
} |
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
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
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
63662
786
4