{"name":"@opentelemetry/resource-detector-gcp","version":"0.27.4","description":"OpenTelemetry SDK resource detector for GCP","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-gcp --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":">=14"},"publishConfig":{"access":"public"},"devDependencies":{"@opentelemetry/api":"^1.0.0","@opentelemetry/contrib-test-utils":"^0.33.0","@types/mocha":"8.2.3","@types/node":"18.11.7","@types/semver":"7.3.8","gts":"3.1.0","mocha":"7.2.0","nock":"12.0.3","nyc":"15.1.0","rimraf":"3.0.2","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","gcp-metadata":"^5.0.0","semver":"7.3.5"},"homepage":"https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/detectors/node/opentelemetry-resource-detector-gcp#readme","gitHead":"59fa57cfd0dff4ae0e6f3833dff73c55dfd79ee5","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js-contrib/issues"},"_id":"@opentelemetry/resource-detector-gcp@0.27.4","_nodeVersion":"14.18.1","_npmVersion":"lerna/5.5.2/node@v14.18.1+x64 (darwin)","dist":{"integrity":"sha512-domGKsMIIVAmfgH7OH6N3y1EHZuv/pHS1QY8YadyXemGnYyh8J/MyjDfz5fGoQ12xdawfslF8+6pWumxPwJT6A==","shasum":"4d2de0dd2355ed3b5c2b684a5baafa5ff091f994","tarball":"http://registry-npm.ywwl.com/@opentelemetry/resource-detector-gcp/download/@opentelemetry/resource-detector-gcp-0.27.4.tgz","fileCount":12,"unpackedSize":26550,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICWNGEEaIZqvSat8jE/J0LbhRrVZV/mRpni/CzPIAypcAiEAjGAzoPGtEqU69HzeUttFpnZPyR/+znFG0zmy8JUHCkM="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjd7UWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr6Lw/+PYar+eu4JCBOXuMtfm3NQ4HsxNxu45amfrxmJcYHP0fFvv7V\r\nlplcYiLvU+bh+Ka5MX6/H1wkjWPrSzaySEFwN6dUPRuC8+NZ70rWYAd8uFBP\r\n4qeFqf6BXdpeHIhwQUnaNcVSAE5HBdsenFn25EH975QeATo81SaGdf9SncmY\r\nvIKcN/nb/UfW2rHns5iIoASkyLwnAOtxakE1/hV95ALAr+DLkpBcgw31BsrT\r\nAUyf8OE5WUlEmFyjOleMp7+R08rDA++lRElvvM0Op43TtwvPZJkf+1YRzOnU\r\nl7gx7aTs2TYjEPwgYInOD8d3CQOSCvTTAbYL9sh3+Yf75Jqjqsfc0X3cKSlH\r\nmOI3A2SY/Mq3j7fjoLZ2RM3Jjh7TbnOqqnZWjltYFTc7yxsGCiK9WpLi/t4W\r\nsNEfrA7NYg+hj6YrRYjZwUw+J5L6UEVQlM5sR9yaJLMZ9RX0DAyU/Bcz5tN6\r\nS3QZe81/l0oh9Pce/qcTYv0u2NXi0RLlqvlUIGjp0+O7V1faYmcPtrqzBbm3\r\n9lUuR0BVQHMQzsuD+VEO9c1bAjBxQmDAnzasWkyKe1EWmvsLh3fAtE2uiJkQ\r\n53+H3BNX/thMiBqAi0J7jW6aVbnORX8czo2bSZ+3H6zmEsIKb1LBPqwSJaP+\r\n9tOhBJo5lJYIEKEQpzM/x0sOJAEz02jyQsE=\r\n=0nMX\r\n-----END PGP SIGNATURE-----\r\n","size":8143,"noattachment":false,"key":"/@opentelemetry/resource-detector-gcp/-/@opentelemetry/resource-detector-gcp-0.27.4.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-gcp_0.27.4_1668789525780_0.5530305427352844"},"_hasShrinkwrap":false,"readme":"# OpenTelemetry Resource Detector for GCP\n\n[![NPM Published Version][npm-img]][npm-url]\n[![Apache License][license-image]][license-image]\n\nResource detector for Google Cloud Platform.\n\nCompatible with OpenTelemetry JS API and SDK `1.0+`.\n\n## Installation\n\nThe GCP resource detector requires Node.JS 10+ due to a dependency on [`gcp-metadata`][] which uses features only available in Node.JS 10+.\n\n```bash\nnpm install --save @opentelemetry/resource-detector-gcp\n```\n\n## Usage\n\n```typescript\nimport { detectResources } from '@opentelemetry/resources';\nimport { gcpDetector } from '@opentelemetry/resource-detector-gcp'\nconst resource = await detectResources({\n   detectors: [gcpDetector],\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### GCP Detector\n\n| Resource Attribute      | Description                                                   |\n|-------------------------|---------------------------------------------------------------|\n| cloud.account.id        | Value of `project-id` from GCP Metadata project               |\n| cloud.availability_zone | Value of `zone` from GCP Metadata instance                    |\n| cloud.provider          | The cloud provider. In this context, it's always \"gcp\"        |\n| container.name          | Value of Environment Variable `CONTAINER_NAME`                |\n| host.id                 | Value of `id` from GCP Metadata instance                      |\n| host.name               | Value of `hostname` from GCP Metadata instance                |\n| k8s.cluster.name        | Value of `attributes/cluster-name` from GCP Metadata instance |\n| k8s.namespace.name      | Value of Environment Variable `NAMESPACE`                     |\n| k8s.pod.name            | Value of Environment Variable `HOSTNAME`                      |\n\n## Useful links\n\n- [GCP Metadata Documentation][]\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[`gcp-metadata`]: https://www.npmjs.com/package/gcp-metadata\n[GCP Metadata Documentation]: https://cloud.google.com/compute/docs/metadata/overview\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-gcp\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fresource-detector-gcp.svg\n","publish_time":1668789525970,"_cnpm_publish_time":1668789525970,"dist-tags":{"canary":"0.24.1-alpha.7","latest":"0.60.0","next":"0.24.0"}}