{"name":"@azure/opentelemetry-instrumentation-azure-sdk","version":"1.0.0-alpha.20220524.1","keywords":["azure","cloud","tracing","typescript"],"author":{"name":"Microsoft Corporation"},"license":"MIT","_id":"@azure/opentelemetry-instrumentation-azure-sdk@1.0.0-alpha.20220524.1","maintainers":[{"name":"azure-sdk","email":"azure-sdk-npmjs@microsoft.com"}],"homepage":"https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/instrumentation/opentelemetry-instrumentation-azure-sdk/README.md","bugs":{"url":"https://github.com/Azure/azure-sdk-for-js/issues"},"dist":{"shasum":"d28547213baa47c4ceb6a52e88e1c4cc37115a7b","tarball":"http://registry-npm.ywwl.com/@azure/opentelemetry-instrumentation-azure-sdk/download/@azure/opentelemetry-instrumentation-azure-sdk-1.0.0-alpha.20220524.1.tgz","fileCount":24,"integrity":"sha512-wm9/+rQZKvMRWeaNFBrPuisIVyvHno146aLy6q1CpLAjYyL1XTuiI06U+XYVgEzGTrIzcPNZsVA8RMeizqbdag==","signatures":[{"sig":"MEYCIQDdaCPqyZM43yhAf6JhUQNMiqnV5QMPvUxGL5VIhGBb3gIhANlkrO5SeO8ugwntxmI6J3EyMb15TI4erwWSD/OAUEln","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":71668,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJijUOaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmovQw/9G9ft2MgIHI0Fh+c3QCL72vn0bsuzqA79Me8AVT9LbKBr7onv\r\nd94zOd/nsa7r9gDHIUuY4siG15qL/GiL7ckG4bRALBMvWq+UFrq4lBLDDUlZ\r\nUk1TdTKOwtc7VYWsgMjdC35a9Zk9sin5ntjBtyJ80XNaidIs63VwWAV95o4U\r\nAm1qKkA/iFg893lnJHhsP51Pwha06PKAs0MqIeWnQux44/q+2jeeT7EoF0Vd\r\nwNzDg+JCq1RHlwk2iCUMf52vlIkTA9StN6iRrgPeZAK20TSJwQgsofNh7GhZ\r\nMr/VNpvDA+Azmsq/K3dRmIqf+etjU50egs6qO327rAlShQcBM5KL9jqHJUvI\r\nUiAOYQaud4Sv40DpVsdXv4tyYaDuKuv5UIt0l/QZCLHXMQE5LzWfwla+4zsS\r\nhQ1d1dV5brD2d1WeDGY5okBneoSTXIQwN+ZIWp7qHVPaVZ3vhPg/+AEFB8VK\r\nAds+6MCZq//wVq2r9zBdTNX3YHtYmXL9LpoFTucflg0LSHki+/9ifp9/kjPE\r\npYgTfCiUq4K3nVOg1CEVGA1ShaH6EqkggTDTY6wdv5Rhy2f8E5Nvnh1L9fJR\r\n8o7HEssfjHLiqb8N+YMbtrvFC/qyI0V8OzRnKaVFoZ3v1yyNrpkmSq5BtrvK\r\nob5eJ/x44NCuRVoIhe6v6lc+cRyl9VqXI4w=\r\n=tJcY\r\n-----END PGP SIGNATURE-----\r\n","size":14578,"noattachment":false,"key":"/@azure/opentelemetry-instrumentation-azure-sdk/-/@azure/opentelemetry-instrumentation-azure-sdk-1.0.0-alpha.20220524.1.tgz"},"main":"dist/index.js","_from":"file:/mnt/vss/_work/1/packages/azure-opentelemetry-instrumentation-azure-sdk/azure-opentelemetry-instrumentation-azure-sdk-1.0.0-alpha.20220524.1.tgz","types":"types/latest/opentelemetry-instrumentation-azure-sdk.d.ts","module":"dist-esm/src/index.js","readme":"# Azure OpenTelemetry Instrumentation library for JavaScript\n\n## Getting started\n\n### Currently supported environments\n\n- [LTS versions of Node.js](https://nodejs.org/about/releases/)\n- Latest versions of Safari, Chrome, Edge, and Firefox.\n\nSee our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.\n\n### Prerequisites\n\n- An [Azure subscription][azure_sub].\n- The [@opentelemetry/instrumentation][otel_instrumentation] package.\n\nYou'll need to configure the OpenTelemetry SDK in order to produce Telemetry data. While configuring OpenTelemetry is outside the scope of this README, we encourage you to review the [OpenTelemetry documentation][otel_documentation] in order to get started using OpenTelemetry.\n\n### Install the `@azure/opentelemetry-instrumentation-azure-sdk` package\n\nInstall the Azure OpenTelemetry Instrumentation client library with `npm`:\n\n```bash\nnpm install @azure/opentelemetry-instrumentation-azure-sdk\n```\n\n### Browser support\n\n#### JavaScript Bundle\n\nTo use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling).\n\n## Key concepts\n\n- The **createAzureSdkInstrumentation** function is the main hook exported by this library which provides a way to create an Azure SDK Instrumentation object to be registered with OpenTelemetry.\n\n## Examples\n\n### Enable OpenTelemetry instrumentation\n\n```javascript\nconst { registerInstrumentations } = require(\"@opentelemetry/instrumentation\");\nconst { createAzureSdkInstrumentation } = require(\"@azure/opentelemetry-instrumentation-azure-sdk\");\n\n// Set-up and configure a Node Tracer Provider using OpenTelemetry\nconst opentelemetry = require(\"@opentelemetry/api\");\nconst { NodeTracerProvider } = require(\"@opentelemetry/sdk-trace-node\");\nconst { SimpleSpanProcessor, ConsoleSpanExporter } = require(\"@opentelemetry/tracing\");\n\nconst provider = new NodeTracerProvider();\nprovider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter()));\nprovider.register();\n\nregisterInstrumentations({\n  instrumentations: [createAzureSdkInstrumentation()],\n});\n\n// Continue to import any Azure SDK client libraries after registering the instrumentation.\n\nconst { keyClient } = require(\"@azure/keyvault-keys\");\n\nasync function main() {\n  // Tracing is now enabled using automatic span propagation with an active context.\n  await keyClient.getKey(\"MyKeyName\");\n\n  // If your scenario requires manual span propagation, all Azure client libraries\n  // support explicitly passing a parent context via an `options` parameter.\n  // Get a tracer from a registered provider, create a span, and get the current context.\n  const tracer = opentelemetry.trace.getTracer(\"my-tracer\");\n  const span = tracer.startSpan(\"main\");\n  const ctx = opentelemetry.trace.setSpan(opentelemetry.context.active(), span);\n\n  await keyClient.getKey(\"MyKeyName\", {\n    tracingOptions: {\n      // ctx will be used as the parent context for all operations.\n      tracingContext: ctx,\n    },\n  });\n}\n```\n\n## Troubleshooting\n\n### Logging\n\nEnabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:\n\n```javascript\nconst { setLogLevel } = require(\"@azure/logger\");\n\nsetLogLevel(\"info\");\n```\n\nFor more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger).\n\n## Contributing\n\nIf you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code.\n\n## Related projects\n\n- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)\n\n![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Ftemplate%2Ftemplate%2FREADME.png)\n\n[azure_cli]: https://docs.microsoft.com/cli/azure\n[azure_sub]: https://azure.microsoft.com/free/\n[otel_instrumentation]: https://www.npmjs.com/package/@opentelemetry/instrumentation\n[otel_documentation]: https://opentelemetry.io/docs/js/\n","browser":{"./dist-esm/src/instrumentation.js":"./dist-esm/src/instrumentation.browser.js","./dist-esm/test/public/util/tracerProvider.js":"./dist-esm/test/public/util/tracerProvider.browser.js"},"engines":{"node":">=12.0.0"},"scripts":{"lint":"eslint package.json api-extractor.json README.md src test --ext .ts,.javascript,.js","pack":"npm pack 2>&1","test":"npm run clean && tsc -p . && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test","audit":"node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit","build":"npm run clean && tsc -p . && dev-tool run bundle && api-extractor run --local && npm run build:types","clean":"rimraf dist dist-* temp types *.tgz *.log","format":"prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"","lint:fix":"eslint package.json api-extractor.json README.md src test --ext .ts,.javascript,.js --fix --fix-type [problem,suggestion]","test:node":"npm run clean && tsc -p . && npm run unit-test:node && npm run integration-test:node","unit-test":"npm run unit-test:node && npm run unit-test:browser","build:test":"tsc -p . && dev-tool run bundle","build:types":"downlevel-dts types/latest/ types/3.1/","extract-api":"tsc -p . && api-extractor run --local","check-format":"prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"","test:browser":"npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser","build:samples":"echo Obsolete","unit-test:node":"mocha -r esm -r ts-node/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 1200000 --full-trace  --exclude \"test/**/browser/*.spec.ts\" \"test/**/*.spec.ts\"","execute:samples":"dev-tool samples run samples-dev","generate:client":"autorest --typescript ./swagger/README.md","integration-test":"npm run integration-test:node && npm run integration-test:browser","unit-test:browser":"karma start --single-run","integration-test:node":"nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 5000000 --full-trace \"dist-esm/test/{,!(browser)/**/}/*.spec.js\"","integration-test:browser":"karma start --single-run"},"_npmUser":{"name":"azure-sdk","email":"azure-sdk-npmjs@microsoft.com"},"prettier":"@azure/eslint-plugin-azure-sdk/prettier.json","sdk-type":"client","_resolved":"/mnt/vss/_work/1/packages/azure-opentelemetry-instrumentation-azure-sdk/azure-opentelemetry-instrumentation-azure-sdk-1.0.0-alpha.20220524.1.tgz","//metadata":{"constantPaths":[{"path":"src/configuration.ts","prefix":"SDK_VERSION"}]},"_integrity":"sha512-wm9/+rQZKvMRWeaNFBrPuisIVyvHno146aLy6q1CpLAjYyL1XTuiI06U+XYVgEzGTrIzcPNZsVA8RMeizqbdag==","repository":{"url":"git+https://github.com/Azure/azure-sdk-for-js.git","type":"git"},"_npmVersion":"8.5.5","description":"Instrumentation client for the Azure SDK.","directories":{},"sideEffects":false,"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.2.0","@azure/logger":"^1.0.0","@opentelemetry/api":"^1.0.2","@azure/core-tracing":"^1.0.0","@opentelemetry/core":"^1.0.0","@opentelemetry/instrumentation":"^0.27.0"},"typesVersions":{"<3.6":{"*":["types/3.1/opentelemetry-instrumentation-azure-sdk.d.ts"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"esm":"^3.2.18","nyc":"^14.0.0","chai":"^4.2.0","util":"^0.12.1","karma":"^6.2.0","mocha":"^7.1.1","sinon":"^12.0.1","dotenv":"^8.2.0","eslint":"^8.0.0","rimraf":"^3.0.0","inherits":"^2.0.3","prettier":"^2.5.1","cross-env":"^7.0.2","typescript":"~4.6.0","@types/chai":"^4.1.6","@types/node":"^12.0.0","karma-mocha":"^2.0.1","@types/mocha":"^7.0.2","@types/sinon":"^10.0.6","downlevel-dts":"~0.4.0","karma-coverage":"^2.0.0","@azure/dev-tool":">=1.0.0-alpha <1.0.0-alphb","karma-ie-launcher":"^1.0.0","source-map-support":"^0.5.9","karma-edge-launcher":"^0.4.2","karma-junit-reporter":"^2.0.1","karma-mocha-reporter":"^2.2.5","mocha-junit-reporter":"^1.18.0","karma-chrome-launcher":"^3.0.0","karma-env-preprocessor":"^0.1.1","karma-firefox-launcher":"^1.1.0","karma-json-preprocessor":"^0.3.3","@microsoft/api-extractor":"7.18.11","@azure/core-rest-pipeline":"^1.5.1","@azure-tools/test-recorder":"^1.0.0","karma-json-to-file-reporter":"^1.0.1","@opentelemetry/sdk-trace-base":"^1.0.1","@opentelemetry/sdk-trace-node":"^1.0.1","@azure/eslint-plugin-azure-sdk":">=3.0.0-alpha <3.0.0-alphb"},"//sampleConfiguration":{"apiRefLink":"https://docs.microsoft.com/javascript/api/","skipFolder":true,"productName":"Azure OpenTelemetry Instrumentation","productSlugs":[],"disableDocsMs":true,"requiredResources":{}},"_npmOperationalInternal":{"tmp":"tmp/opentelemetry-instrumentation-azure-sdk_1.0.0-alpha.20220524.1_1653425049754_0.673326210657009","host":"s3://npm-registry-packages"},"publish_time":1653425049998,"_cnpm_publish_time":1653425049998,"dist-tags":{"beta":"1.1.0-beta.1","dev":"1.0.0-alpha.20260311.1","latest":"1.0.0","next":"1.0.0-beta.9"}}