{"name":"@opentelemetry/resource-detector-azure","version":"0.2.7","author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resource-detector-azure@0.2.7","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/detectors/node/opentelemetry-resource-detector-azure#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js-contrib/issues"},"dist":{"shasum":"55b484a70c969ff2658a76665f7621b97e4e38c0","tarball":"http://registry-npm.ywwl.com/@opentelemetry/resource-detector-azure/download/@opentelemetry/resource-detector-azure-0.2.7.tgz","fileCount":21,"integrity":"sha512-+R3VnPaK6rc+kKfdvhgQlYDGXy0+JMAjPNDjcRQSeXY8pVOzHGCIrY+gT6gUrpjsw8w1EgNBVofr+qeNOr+o4A==","signatures":[{"sig":"MEQCIFTUVA78vuL4ZL0b2O9/U7yjY50Wzp9Ewq7zc2MVYa6FAiBckbH2jmdKuoVIXVzsV7kqT4kbcRdpRNeKU9jPrq4p/Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":67655,"size":14008,"noattachment":false,"key":"/@opentelemetry/resource-detector-azure/-/@opentelemetry/resource-detector-azure-0.2.7.tgz"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=14"},"gitHead":"96a87b48934f0afcf1fe637eed6704f35bd8e973","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","watch":"tsc -w","compile":"tsc -p .","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"tsc --version && lerna run version:update --scope @opentelemetry/resource-detector-azure --include-dependencies","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js-contrib.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.20.2+x64 (linux)","description":"OpenTelemetry SDK resource detector for Azure","directories":{},"_nodeVersion":"18.20.2","dependencies":{"@opentelemetry/resources":"^1.10.1","@opentelemetry/semantic-conventions":"^1.22.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.3.3","mocha":"7.2.0","rimraf":"5.0.5","ts-mocha":"10.0.0","typescript":"4.4.4","@types/node":"18.6.5","@types/mocha":"8.2.3","@types/sinon":"10.0.18","@opentelemetry/api":"^1.0.0","@opentelemetry/contrib-test-utils":"^0.39.0"},"peerDependencies":{"@opentelemetry/api":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resource-detector-azure_0.2.7_1714071726879_0.11808910637091308","host":"s3://npm-registry-packages"},"readme":"# OpenTelemetry Resource Detector for Azure\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): @JacksonWeber\n\nResource detector for Azure.\n\n## Installation\n\n```bash\nnpm install --save @opentelemetry/resource-detector-azure\n```\n\n## Usage\n\n```typescript\nimport { detectResources } from '@opentelemetry/resources';\nimport { azureAppServiceDetector } from '@opentelemetry/resource-detector-azure';\nconst resource = detectResourcesSync({\n    detectors: [azureAppServiceDetector],\n});\n\nconst tracerProvider = new NodeTracerProvider({ resource });\n```\n\n## Available Detectors\n\nThis package implements Semantic Convention [Version 1.19.0](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.19.0/semantic_conventions/README.md).\n\n### App Service Resource Detector\n\n| Resource Attribute      | Description                                                                                                                                                                                               |\n|-------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| azure.app.service.stamp | The specific \"stamp\" cluster within Azure where the App Service is running, e.g., \"waws-prod-sn1-001\". Value of Process Environment Variable `APP_SERVICE_ATTRIBUTE_ENV_VARS`.                            |\n| cloud.platform          | The cloud platform. Here, it's always \"azure_app_service\".                                                                                                                                                |\n| cloud.provider          | The cloud service provider. In this context, it's always \"azure\".                                                                                                                                         |\n| cloud.region            | The Azure region where the App Service is hosted, e.g., \"East US\", \"West Europe\", etc.  Value of Process Environment Variable `REGION_NAME`.                                                              |\n| cloud.resource_id       | The Azure Resource Manager URI uniquely identifying the Azure App Service. Typically in the format `/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Web/sites/{siteName}`. |\n| deployment.environment  | The deployment slot where the Azure App Service is running, such as \"staging\", \"production\", etc. Value of Process Environment Variable `WEBSITE_SLOT_NAME`.                                              |\n| host.id                 | The primary hostname for the app, excluding any custom hostnames. Value of Process Environment Variable `WEBSITE_HOSTNAME`.                                                                               |\n| service.instance.id     | The specific instance of the Azure App Service, useful in a scaled-out configuration. Value of Process Environment Variable `WEBSITE_INSTANCE_ID`.                                                        |\n| service.name            | The name of the Azure App Service. Value of Process Environment Variable `WEBSITE_SITE_NAME`.                                                                                                             |\n\n### VM Resource Detector\n\n| Resource Attribute       | Description                                                                                                                                                                                              |\n|--------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| azure.vm.scaleset.name   | The name of the Virtual Machine Scale Set if the VM is part of one. Value from `vmScaleSetName` key on `/metadata/instance/compute` request.                                                             |\n| azure.vm.sku             | The SKU of the Azure Virtual Machine's operating system. For instance, for a VM running Windows Server 2019 Datacenter edition, this value would be \"2019-Datacenter\". Value from `sku` key on `/metadata/instance/compute` request. |\n| cloud.platform           | The cloud platform, which is always set to \"azure_vm\" in this context.                                                                                                                                   |\n| cloud.provider           | The cloud service provider, which is always set to \"azure\" in this context.                                                                                                                              |\n| cloud.region             | The Azure region where the Virtual Machine is hosted, such as \"East US\", \"West Europe\", etc. Value from `location` key on `/metadata/instance/compute` request.                                          |\n| cloud.resource_id        | The Azure Resource Manager URI uniquely identifying the Azure Virtual Machine. It typically follows this format: `/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Compute/virtualMachines/{vmName}`. Value from `resourceId` key on `/metadata/instance/compute` request.|\n| host.id                  | A unique identifier for the VM host, for instance, \"02aab8a4-74ef-476e-8182-f6d2ba4166a6\". Value from `vmId` key on `/metadata/instance/compute` request.                                                |\n| host.name                | The name of the host machine. Value from `name` key on `/metadata/instance/compute` request.                                                                                                             |\n| host.type                | The size of the VM instance, for example, \"Standard_D2s_v3\". Value from `vmSize` key on `/metadata/instance/compute` request.                                                                            |\n| os.version               | The version of the operating system running on the VM. Value from `version` key on `/metadata/instance/compute` request.                                                                                 |\n\n### Azure Functions Resource Detector\n\n| Resource Attribute      | Description                                                                                                                                          |\n|-------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|\n| cloud.platform          | The cloud platform. Here, it's always \"azure_functions\".                                                                                             |\n| cloud.provider          | The cloud service provider. In this context, it's always \"azure\".                                                                                    |\n| cloud.region            | The Azure region where the Azure Function is hosted, e.g., \"East US\", \"West Europe\", etc. Value of Process Environment Variable `REGION_NAME`.       |\n| faas.instance           | The specific instance of the Azure App Service, useful in a scaled-out configuration. Value from Process Environment Variable `WEBSITE_INSTANCE_ID`. |\n| faas.max_memory         | The amount of memory available to the Azure Function expressed in MiB. value from Process Environment Variable `WEBSITE_MEMORY_LIMIT_MB`.            |\n| service.name            | The name of the service the Azure Functions runs within. Value from Process Environment Variable `WEBSITE_SITE_NAME`.                                |\n| cloud.resource_id       | The Azure Resource Manager URI uniquely identifying the Azure Virtual Machine. It typically follows this format: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Compute/virtualMachines/{vmName}. Value from resourceId key on /metadata/instance/compute request. |\n| process.pid             | The process ID collected from the running process.                                                                                                   |\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-azure\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fresource-detector-azure.svg\n","publish_time":1714071727069,"_cnpm_publish_time":1714071727069,"dist-tags":{"latest":"0.33.0"}}