{"name":"@opentelemetry/resource-detector-aws","version":"1.1.2","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-contrib.git"},"scripts":{"clean":"rimraf build/*","compile":"tsc -p .","lint":"eslint . --ext .ts","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version && lerna run version:update --scope @opentelemetry/resource-detector-aws --include-dependencies","prewatch":"npm run precompile","prepare":"npm run compile","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","tdd":"npm run test -- --watch-extensions ts --watch","watch":"tsc -w"},"keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","engines":{"node":">=8.12.0"},"publishConfig":{"access":"public"},"devDependencies":{"@opentelemetry/api":"^1.0.0","@opentelemetry/contrib-test-utils":"^0.32.0","@types/mocha":"8.2.3","@types/node":"16.11.21","@types/sinon":"10.0.2","gts":"3.1.0","mocha":"7.2.0","nock":"12.0.3","nyc":"15.1.0","rimraf":"3.0.2","sinon":"14.0.0","ts-mocha":"10.0.0","typescript":"4.3.5"},"peerDependencies":{"@opentelemetry/api":"^1.0.0"},"dependencies":{"@opentelemetry/core":"^1.0.0","@opentelemetry/resources":"^1.0.0","@opentelemetry/semantic-conventions":"^1.0.0"},"homepage":"https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/detectors/node/opentelemetry-resource-detector-aws#readme","gitHead":"4a9442ceea7f8555ad6e5f731f92834f3398d5b9","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js-contrib/issues"},"_id":"@opentelemetry/resource-detector-aws@1.1.2","_nodeVersion":"14.18.1","_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","dist":{"integrity":"sha512-yDpqb+lldRZLVkCb+6fPkqWp9lBMmEak+I4X7wgrKnmd2Rs7YfcO16TMVCh3tloeq06GeUI6jvQ+ukeHl2niHQ==","shasum":"e85b12ef0e90720f6ecaa38d31e0b23d1ea1e1d2","tarball":"http://registry-npm.ywwl.com/@opentelemetry/resource-detector-aws/download/@opentelemetry/resource-detector-aws-1.1.2.tgz","fileCount":25,"unpackedSize":65778,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFdtpFFEr2BX6GziJL9kFu+HFUL095e6iRX3s4ewnf+WAiB0j4Qu9sIEGkLXLNPYXv5+ePU6bQK7xUCN5PDopb+ejw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjEkG8ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq7ZhAAhkReNzxx0F97mwyADMiH2p3y0kJAYt83hVduQWcHWYVOIN0E\r\nLA7HJyFTY3TsGEgvqLZ7oAuRSl/G+mATZXiaQX0OWp0uyOpTVf/I07m8c4ZT\r\niY7z/Bu8fzqEaSIBvPShpG30UCsSWEbK3EKJefkoLY3guVI3sxzIjM4Er3Lh\r\n60pLYSeGmiaqeDLYI10kIsAYspg7P6lGqjqvEHZQ0cxNaJbxmPhzxxQYo3hR\r\nH4TDIg+pexUqKiekFNaEmvvuJeVKEIN6LVjWct/6ZDhEIDm8VS76pkVDUhDU\r\n6tiR5kMyCKU2PJobHYKmbWK2VcYG9YCiOWt0QbObSpq0AOiRD1MYzzqAo6II\r\ndD8ziADa5p/oJsBG4sDtO5FqsYVh4u/slqtojISxvSRlFWpetwZc+WdN3cLI\r\nvysoYZlilXbXuSBob4u32/tgEPQ9u2OQHjMVPFKtfQ3il+Ec1BpjJsMdTDgX\r\nEJW5SoKtaYCrxZaSxKlg4JWBjPlXBrh1ivNVgNJ7lcszqqXDRyYxhGKzOo0G\r\njsPfu+d2LpAuSGLiYiSyot7IPyfwysPe+4LCFZzQquYAgEmhCIn9Eal461tF\r\nINBgemS26cLO33kXlxWAuxGJdBU4XSYK3eV4Ku/Kg2QP6FaPjaukx9G5KfEd\r\nRBzGyEw1aqp9KynHZeddSs1k1OflKo0OyV4=\r\n=6Spr\r\n-----END PGP SIGNATURE-----\r\n","size":15627,"noattachment":false,"key":"/@opentelemetry/resource-detector-aws/-/@opentelemetry/resource-detector-aws-1.1.2.tgz"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"directories":{},"maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/resource-detector-aws_1.1.2_1662140860567_0.9037801994821593"},"_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":1662140860744,"_cnpm_publish_time":1662140860744,"dist-tags":{"canary":"0.24.1-alpha.7","latest":"3.0.0","next":"0.24.0"}}