$ npm install @opentelemetry/resource-detector-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.
npm install --save @opentelemetry/resource-detector-aws
import { detectResources } from '@opentelemetry/resources';
import { awsBeanstalkDetector } from '@opentelemetry/resource-detector-aws'
const resource = await detectResources({
detectors: [awsEc2Detector],
})
const tracerProvider = new NodeTracerProvider({ resource });
awsBeanstalkDetector: Populates service for processes running on AWS Elastic BeanstalkawsEc2Detector: Populates cloud and host for processes running on Amazon EC2, including abstractions such as ECS on EC2. Notably, it does not populate anything on AWS FargateawsEcsDetector: Populates container for containers running on Amazon ECSawsEksDetector: Populates container and k8s.cluster_name for containers running on Amazon EKS
k8s.cluster_name is not always available depending on the configuration of CloudWatch monitoring for the EKS clusterawsLambdaDetector: Populates faas and cloud for functions running on AWS Lambda
faas.id is currently not populated as it is not provided by the runtime at startupApache 2.0 - See LICENSE for more information.
© 2010 - cnpmjs.org x YWFE | Home | YWFE