{"name":"@opentelemetry/resource-detector-gcp","version":"0.11.0","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.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":">=10.0.0"},"publishConfig":{"access":"public"},"devDependencies":{"@opentelemetry/core":"^0.11.0","@types/mocha":"8.0.1","@types/node":"14.0.27","@types/semver":"7.3.3","codecov":"3.7.2","gts":"2.0.2","mocha":"7.2.0","nock":"12.0.3","nyc":"15.1.0","rimraf":"3.0.2","ts-mocha":"7.0.0","ts-node":"8.10.2","typescript":"3.9.7"},"dependencies":{"@opentelemetry/resources":"^0.11.0","gcp-metadata":"^4.1.4","semver":"7.3.2"},"gitHead":"15174c6647ab9863dfc1424412fa60f2fddb3351","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","_id":"@opentelemetry/resource-detector-gcp@0.11.0","_nodeVersion":"14.4.0","_npmVersion":"lerna/3.22.1/node@v14.4.0+x64 (darwin)","dist":{"integrity":"sha512-/pU8kqujFqrFH7ioSRHSu7jYWbvLIqXOpKi1qXwN2PnmHDK0qxWZakmxBu1dlr4VYDVfmYRf7Y8OzPn8U4uO4w==","shasum":"bfa3f3457487873000fc4529cbbabfbb4af03c83","tarball":"http://registry-npm.ywwl.com/@opentelemetry/resource-detector-gcp/download/@opentelemetry/resource-detector-gcp-0.11.0.tgz","fileCount":15,"unpackedSize":27718,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfTqHLCRA9TVsSAnZWagAAoJ0P/jw2Jhpf4As31ihNjKJ0\nnXLTQboOfwQ/9/DsR4AfG/mRX2iRAGrslqj6fuc553gBcZrCo9+wu2udO1TV\nfTcIaJ9CHl4acA8XpCNm83Rw+rVxjSfMEmTVXjsrxeefyLz0pMq07s0L7Nsv\nLxg+v8uLJG9is02VBkdPQAs0myJ+WrvUBiBOAZ/8sHWDjrFB04eMRJ4lHj9L\nLDca/2bMNmTEk0D4jfVG1WgXXCeqWuxX2S0wZJnvRgdzfP2GNGsLCB1GdFuT\nGADPTVhmhtfJ3b1VHGAbFMIs2tR/WvLEthQwu8sP2vAeKZ/UWBAA1N2yrUkl\nNdBsdKo7yLHY0wzwT5DjWYaWH83tYkRk9eUSp/OD5yAPQcDlerOhBSdo1gla\nQQO7IStfz+AHWinJ7jt1wNLDleVN/HEmN2Th1nM48G7DlzQV9U2AfnK/AjLq\nk9UnB+17POhhMx8PTVmEciGbuq9fA4luIQq/mlLzC8uk3lgWNg7yGyKRgSsK\njxTTIR68bdJ6ADQQ6dDR54kjSFAMswwBFBv/fweqQP8AWN/jHPcYR0mRZ2uv\nAhzZLd1WTOSY+PZ6JwdGLikH/y39aiormbKOjZwIb5ARmwVesn1d4b7ncYv9\nGQdsKOcJjArjzf/zyRv/MCB1xGtJGg6/z4wvVQRzgSe7ixS2QAQifIh7SGmh\nmHmH\r\n=hxb1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBLRldE90xnL6g+YH9susCeRy9A78jyf3pm4uo+NCh48AiAQXgJNoj3h409z8CKTS4Q0+B7VnhoWnsm4J4wwUWizTA=="}],"size":8426,"noattachment":false,"key":"/@opentelemetry/resource-detector-gcp/-/@opentelemetry/resource-detector-gcp-0.11.0.tgz"},"maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"_npmUser":{"name":"obecny","email":"bobecny@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/resource-detector-gcp_0.11.0_1598988747572_0.9455895600714703"},"_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":1598988747742,"_cnpm_publish_time":1598988747742,"dist-tags":{"canary":"0.24.1-alpha.7","latest":"0.60.0","next":"0.24.0"}}