{"name":"@opentelemetry/resource-detector-aws","version":"0.14.0","description":"OpenTelemetry SDK resource detector for AWS","main":"build/src/index.js","types":"build/src/index.d.ts","repository":{"type":"git","url":"git+https://github.com/open-telemetry/opentelemetry-js.git"},"scripts":{"lint":"eslint . --ext .ts","lint:fix":"eslint . --ext .ts --fix","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","tdd":"npm run test -- --watch-extensions ts --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","clean":"rimraf build/*","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js","compile":"npm run version:update && tsc -p .","prepare":"npm run compile"},"keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","engines":{"node":">=8.0.0"},"publishConfig":{"access":"public"},"devDependencies":{"@types/mocha":"8.2.0","@types/node":"14.14.12","@types/sinon":"9.0.9","codecov":"3.8.1","gts":"2.0.2","mocha":"7.2.0","nock":"12.0.3","nyc":"15.1.0","rimraf":"3.0.2","sinon":"9.2.2","ts-mocha":"8.0.0","ts-node":"9.1.1","typescript":"3.9.7"},"dependencies":{"@opentelemetry/api":"^0.14.0","@opentelemetry/core":"^0.14.0","@opentelemetry/resources":"^0.14.0"},"gitHead":"27a8d4530c56257c191468b073669909bf8892a1","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","_id":"@opentelemetry/resource-detector-aws@0.14.0","_nodeVersion":"14.8.0","_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","dist":{"integrity":"sha512-bs6jbbovGpHF4MB2s4ZWTnvjwNhb1B7rZBjGwQbszPyD7J4tD/jGBiJVtat/NnuOXS7j6cAiX/PwQg0Vgv0/IA==","shasum":"171f34de33a11cb52585f84c1b5af54177a3b360","tarball":"http://registry-npm.ywwl.com/@opentelemetry/resource-detector-aws/download/@opentelemetry/resource-detector-aws-0.14.0.tgz","fileCount":24,"unpackedSize":57134,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf28UyCRA9TVsSAnZWagAAnN0P/2jV8Brkmk86wBaBk0B+\nwfAm7dg3r4F5tmN/4Qsq5sNm+NK2PNXk6bx821k19iIL2vDT7Rjgq+PXzCJn\nxbmk+xtjYIP1y/QG1xD56NcP1NNlnVRyVDhQpIpKxh7wDuPSV6HcDMOsOueh\nHVR2qiG1TCO8uvJRH4zDLhuLCRv31XHpvxRrK4EqvPM0p9bKZvAV3iDYBw51\nC/a64nVmTcjtwGQ4fKOA9zTIhz/afIVmrOiROx3+GjY/j32kMgejKBu08czi\n0YQzNW6K0j6AJcGxUDmoA3qLAil9TNrk2pQRnbYg29Z4GW6/6e3tlVS996R5\nRmfsrjaaLt5fHOdS+HtaIRwtVfmkxMTETlPU5F6kc7yLii/5p2QZf4WXarQ9\npD0j62GP86y0WNUSk86p6K0T0Xv1UD2ItITYfNsq0WHQ1L6vdJTXU5us0Aae\nfOGmYU8No6UawwqHK09qHUciK6jz0RuPJgKHBRc67AHG5yB8OgueqjzxkEpW\nn3Dn097rksZvCqboJJZVvEp+6hc3jXcMpBUCyegAqQHNfl9h6jHxHXpvdIV8\nx5qBrqEnZx/46R59Bky+f1pubpv+ltNR8yiOa77R8nWKw8p9sVvF3KknFwEm\nKEM+dfnau6OkfZLDPNnwwQkjojW3gc3/QnEkXfRZQvaAoAAJz4Txv94FKeiw\nlNoT\r\n=IA+v\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDhm3N/dg6apZIG3giDXQFV9udEQw2v/I3XSnsMUSm9HQIgaAYo4HExUZasxhePcfyJlOQQFKB/WWHA/THD3t7aCrA="}],"size":14065,"noattachment":false,"key":"/@opentelemetry/resource-detector-aws/-/@opentelemetry/resource-detector-aws-0.14.0.tgz"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"directories":{},"maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/resource-detector-aws_0.14.0_1608238386176_0.668481711055529"},"_hasShrinkwrap":false,"readme":"# OpenTelemetry Resource Detector for AWS\n\n[![NPM Published Version][npm-img]][npm-url]\n[![Apache License][license-image]][license-image]\n\n[component owners](https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/.github/component_owners.yml): @carolabadeer\n\nResource detector for Amazon Web Services.\n\n## Status\n\n| Maturity                                  | [Component Owner](../../.github/component_owners.yml) | Compatibility         |\n| ----------------------------------------- | ----------------------------------------------------- | --------------------- |\n| [Stable](../../../CONTRIBUTING.md#stable) | @carolabadeer                                         | API 1.0+<br/>SDK 1.0+ |\n\n## Installation\n\n```bash\nnpm install --save @opentelemetry/resource-detector-aws\n```\n\n## Usage\n\n```typescript\nimport { detectResources } from '@opentelemetry/resources';\nimport { awsEc2Detector } from '@opentelemetry/resource-detector-aws'\nconst resource = await detectResources({\n   detectors: [awsEc2Detector],\n})\n\nconst tracerProvider = new NodeTracerProvider({ resource });\n```\n\n## Available detectors\n\nThis package uses `@opentelemetry/semantic-conventions` version `1.22+`, which implements Semantic Convention [Version 1.7.0](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/semantic_conventions/README.md)\n\n### AWS Beanstalk Detector\n\nPopulates `service` for processes running on [AWS Elastic Beanstalk](https://aws.amazon.com/elasticbeanstalk/)\n\n| Resource Attribute  | Description                                                              |\n|---------------------|--------------------------------------------------------------------------|\n| cloud.platform      | The cloud platform. In this context, it's always \"aws_elastic_beanstalk\" |\n| cloud.provider      | The cloud provider. In this context, it's always \"aws\"                   |\n| service.instance.id | Value of `deployment_id` from config file `environment.conf`             |\n| service.name        | The service name. In this context, it's always \"aws_elastic_beanstalk\"   |\n| service.namespace   | Value of `environment_name` from config file `environment.conf`          |\n| service.version     | Value of `version_label` from config file `environment.conf`             |\n\n### AWS EC2 Detector\n\nPopulates `cloud` and `host` for processes running on [Amazon EC2](https://aws.amazon.com/ec2/), including abstractions such as ECS on EC2. Notably, it does not populate anything on AWS Fargate.\n\n| Resource Attribute      | Description                                                                           |\n|-------------------------|---------------------------------------------------------------------------------------|\n| cloud.account.id        | Value of `accountId` from `/latest/dynamic/instance-identity/document` request        |\n| cloud.availability_zone | Value of `availabilityZone` from `/latest/dynamic/instance-identity/document` request |\n| cloud.platform          | The cloud platform. In this context, it's always \"aws_ec2\"                            |\n| cloud.provider          | The cloud provider. In this context, it's always \"aws\"                                |\n| cloud.region            | Value of `region` from `/latest/dynamic/instance-identity/document` request           |\n| host.id                 | Value of `instanceId` from `/latest/dynamic/instance-identity/document` request       |\n| host.name               | Value of `hostname` from `/latest/dynamic/instance-identity/document` request         |\n| host.type               | Value of `instanceType` from `/latest/dynamic/instance-identity/document` request     |\n\n### AWS ECS Detector\n\nPopulates `container` for containers running on [Amazon ECS](https://aws.amazon.com/ecs/).\n\n| Resource Attribute      | Description                                                                            |\n|-------------------------|----------------------------------------------------------------------------------------|\n| aws.ecs.container.arn   | Value of `ContainerARN` from the request to the metadata Uri. The Metadata Uri is stored on the Environment Variable `ECS_CONTAINER_METADATA_URI_V4`  |\n| aws.ecs.cluster.arn     | Value in the format `${baseArn}:cluster/${cluster}`, with `baseArn` and `cluster` from a `ECS_CONTAINER_METADATA_URI_V4/task` request, with values from `TaskARN` and `Cluster` respectively |\n| aws.ecs.launchtype      | Value of `LaunchType` from `ECS_CONTAINER_METADATA_URI_V4/task` request                |\n| aws.ecs.task.arn        | Value of `TaskARN` from `ECS_CONTAINER_METADATA_URI_V4/task` request                   |\n| aws.ecs.task.family     | Value of `Family` from `ECS_CONTAINER_METADATA_URI_V4/task` request                    |\n| aws.ecs.task.revision   | Value of `Revision` from `ECS_CONTAINER_METADATA_URI_V4/task` request                  |\n| aws.log.group.arns      | Value on format `arn:aws:logs:${logsRegion}:${awsAccount}:log-group:${logsGroupName}`, with `logsRegions` and `logsGroupName` from logs metadata, values of `awslogs-region` and `awslogs-group` respectively, and `awsAccount` parsed value from the `TaskARN`. Logs metadata values come from `LogOptions` on `ECS_CONTAINER_METADATA_URI_V4` request |\n| aws.log.group.names     | Value of `awslogs-group` from logs metadata. Logs metadata values come from `LogOptions` on `ECS_CONTAINER_METADATA_URI_V4` request |\n| aws.log.stream.arns     | Value on format `arn:aws:logs:${logsRegion}:${awsAccount}:log-group:${logsGroupName}:log-stream:${logsStreamName}`, with `logsRegions`, `logsGroupName` and `logsStreamName` from logs metadata, values of `awslogs-region`, `awslogs-group` and `awslogs-stream` respectively, and `awsAccount` parsed value from the `TaskARN` |\n| aws.log.stream.names    | Value of `awslogs-stream` from logs metadata |\n| cloud.account.id        | Parsed value from the `TaskARN` |\n| cloud.availability_zone | Value of `AvailabilityZone` from `ECS_CONTAINER_METADATA_URI_V4/task` request. This value is not available in all Fargate runtimes |\n| cloud.platform          | The cloud platform. In this context, it's always \"aws_ecs\"                             |\n| cloud.provider          | The cloud provider. In this context, it's always \"aws\"                                 |\n| cloud.region            | Parsed value from the `TaskARN`                                                        |\n| cloud.resource_id       | Value of `ContainerARN` from `ECS_CONTAINER_METADATA_URI_V4/task` request              |\n| container.id            | Value from file `/proc/self/cgroup`                                                    |\n| container.name          | The hostname of the operating system                                                   |\n\n### AWS EKS Detector\n\nPopulates `container` and `k8s.cluster_name` for containers running on [Amazon EKS](https://aws.amazon.com/eks/).\n`k8s.cluster_name` is not always available depending on the configuration of CloudWatch monitoring for the EKS cluster.\n\n| Resource Attribute | Description                                                                                         |\n|--------------------|-----------------------------------------------------------------------------------------------------|\n| cloud.platform     | The cloud platform. In this context, it's always \"aws_eks\"                                          |\n| cloud.provider     | The cloud provider. In this context, it's always \"aws\"                                              |\n| container.id       | Value from config file `/proc/self/cgroup`                                                          |\n| k8s.cluster.name   | Value of `cluster.name` from `/api/v1/namespaces/amazon-cloudwatch/configmaps/cluster-info` request |\n\n### AWS Lambda Detector\n\nPopulates `faas` and `cloud` for functions running on [AWS Lambda](https://aws.amazon.com/lambda/).\n`faas.id` is currently not populated as it is not provided by the runtime at startup.\n\n| Resource Attribute | Description                                                         |\n|--------------------|---------------------------------------------------------------------|\n| cloud.platform     | The cloud platform. In this context, it's always \"aws_lambda\"       |\n| cloud.provider     | The cloud provider. In this context, it's always \"aws\"              |\n| cloud.region       | Value of Process Environment Variable `AWS_REGION`                  |\n| faas.name          | Value of Process Environment Variable `AWS_LAMBDA_FUNCTION_NAME`    |\n| faas.version       | Value of Process Environment Variable `AWS_LAMBDA_FUNCTION_VERSION` |\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>\n- For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>\n- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions\n[license-url]: https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/resource-detector-aws\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fresource-detector-aws.svg\n","publish_time":1608238386328,"_cnpm_publish_time":1608238386328,"dist-tags":{"canary":"0.24.1-alpha.7","latest":"3.0.0","next":"0.24.0"}}