Package Exports
- @opentelemetry/resource-detector-aws
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@opentelemetry/resource-detector-aws) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
OpenTelemetry Resource Detector for AWS
The OpenTelemetry Resource is an immutable representation of the entity producing telemetry. For example, a process producing telemetry that is running in a container on Kubernetes has a Pod name, it is in a namespace and possibly is part of a Deployment which also has a name. All three of these attributes can be included in the Resource.
This document defines standard attributes for resources.
Installation
npm install --save @opentelemetry/resource-detector-awsUsage
import { detectResources } from '@opentelemetry/resources';
import { awsBeanstalkDetector } from '@opentelemetry/resource-detector-aws'
const resource = await detectResources({
detectors: [awsEc2Detector],
})
const tracerProvider = new NodeTracerProvider({ resource });Available detectors
awsBeanstalkDetector: Populatesservicefor processes running on AWS Elastic BeanstalkawsEc2Detector: Populatescloudandhostfor processes running on Amazon EC2, including abstractions such as ECS on EC2. Notably, it does not populate anything on AWS FargateawsEcsDetector: Populatescontainerfor containers running on Amazon ECSawsEksDetector: Populatescontainerandk8s.cluster_namefor containers running on Amazon EKSk8s.cluster_nameis not always available depending on the configuration of CloudWatch monitoring for the EKS cluster
awsLambdaDetector: Populatesfaasandcloudfor functions running on AWS Lambdafaas.idis currently not populated as it is not provided by the runtime at startup
Useful links
- For more information on OpenTelemetry, visit: https://opentelemetry.io/
- For more about OpenTelemetry JavaScript: https://github.com/open-telemetry/opentelemetry-js
- For help or feedback on this project, join us in GitHub Discussions
License
Apache 2.0 - See LICENSE for more information.