{"name":"@opentelemetry/sdk-node","version":"0.11.1-alpha.28","description":"OpenTelemetry SDK for Node.js","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":{"test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","build":"npm run compile","lint":"eslint . --ext .ts","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","watch":"tsc -w"},"keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","engines":{"node":">=8.0.0"},"publishConfig":{"access":"public"},"dependencies":{"@opentelemetry/api":"^0.11.0","@opentelemetry/context-base":"^0.11.0","@opentelemetry/core":"^0.11.0","@opentelemetry/metrics":"^0.11.0","@opentelemetry/node":"^0.11.0","@opentelemetry/resource-detector-aws":"^0.11.0","@opentelemetry/resource-detector-gcp":"^0.11.0","@opentelemetry/resources":"^0.11.0","@opentelemetry/tracing":"^0.11.0","nock":"12.0.3"},"devDependencies":{"@opentelemetry/context-async-hooks":"^0.11.0","@types/mocha":"8.0.3","@types/node":"14.0.27","@types/semver":"7.3.3","@types/sinon":"9.0.4","codecov":"3.7.2","gcp-metadata":"^4.1.4","gts":"2.0.2","istanbul-instrumenter-loader":"3.0.1","mocha":"7.2.0","nyc":"15.1.0","semver":"7.3.2","sinon":"9.0.3","ts-loader":"8.0.4","ts-mocha":"7.0.0","typescript":"3.9.7"},"gitHead":"480d1d98c9c04861b81cda8b601568acb57d4439","readme":"# OpenTelemetry SDK for Node.js\n\n[![Gitter chat][gitter-image]][gitter-url]\n[![NPM Published Version][npm-img]][npm-url]\n[![dependencies][dependencies-image]][dependencies-url]\n[![devDependencies][devDependencies-image]][devDependencies-url]\n[![Apache License][license-image]][license-image]\n\nThis package provides the full OpenTelemetry SDK for Node.js including tracing and metrics.\n\n## Quick Start\n\nTo get started you need to install `@opentelemetry/sdk-node`, a metrics and/or tracing exporter, and any appropriate plugins for the node modules used by your application.\n\n### Installation\n\n```sh\n$ # Install the SDK\n$ npm install @opentelemetry/sdk-node\n\n$ # Install exporters and plugins\n$ npm install \\\n    @opentelemetry/exporter-jaeger \\ # add tracing exporters as needed\n    @opentelemetry/exporter-prometheus # add metrics exporters as needed\n    @opentelemetry/plugin-http # add plugins as needed\n\n$ # or install all officially supported core and contrib plugins\n$ npm install @opentelemetry/plugins-node-core-and-contrib\n```\n\n> Note: this example is for Node.js. See [examples/tracer-web](https://github.com/open-telemetry/opentelemetry-js/tree/master/examples/tracer-web) for a browser example.\n\n### Initialize the SDK\n\nBefore any other module in your application is loaded, you must initialize the SDK.\nIf you fail to initialize the SDK or initialize it too late, no-op implementations will be provided to any library which acquires a tracer or meter from the API.\nThis example uses Jaeger and Prometheus, but exporters exist for [other tracing backends][other-tracing-backends].\n\n```javascript\nconst opentelemetry = require(\"@opentelemetry/sdk-node\");\nconst { JaegerExporter } = require(\"@opentelemetry/exporter-jaeger\");\nconst { PrometheusExporter } = require(\"@opentelemetry/exporter-prometheus\");\n\nconst jaegerExporter = new JaegerExporter({\n  serviceName: 'my-service',\n});\nconst prometheusExporter = new PrometheusExporter({ startServer: true });\n\nconst sdk = new opentelemetry.NodeSDK({\n  // Optional - if omitted, the tracing SDK will not be initialized\n  traceExporter: jaegerExporter,\n  // Optional - If omitted, the metrics SDK will not be initialized\n  metricExporter: prometheusExporter,\n\n  // See the Configuration section below for additional  configuration options\n});\n\n// You can optionally detect resources asynchronously from the environment.\n// Detected resources are merged with the resources provided in the SDK configuration.\nsdk\n  .start()\n  .then(() => {\n    // Resources have been detected and SDK is started\n  })\n\n// You can also use the shutdown method to gracefully shut down the SDK before process shutdown\n// or on some operating system signal.\nconst process = require(\"process\");\nprocess.on(\"SIGTERM\", () => {\n  sdk.shutdown()\n    .then(\n      () => console.log(\"SDK shut down successfully\"),\n      (err) => console.log(\"Error shutting down SDK\", err),\n    )\n    .finally(() => process.exit(0))\n});\n```\n\n## Configuration\n\nBelow is a full list of configuration options which may be passed into the `NodeSDK` constructor;\n\n### autoDetectResources\n\nDetect resources automatically from the environment using the default resource detectors. Default `true`.\n\n### contextManager\n\nUse a custom context manager. Default: [AsyncHooksContextManager](../opentelemetry-context-async-hooks/README.md)\n\n### textMapPropagator\n\nUse a custom propagator. Default: [CompositePropagator](../opentelemetry-core/src/context/propagation/composite.ts) using [W3C Trace Context](../opentelemetry-core/README.md#httptracecontext-propagator) and [Correlation Context](../opentelemetry-core/README.md#correlation-context-propagator)\n\n### logger\n\nUse a custom logger. Default: Logging disabled\n\n### logLevel\n\nDefault: [INFO](../opentelemetry-core/src/common/types.ts#L19)\n\n### metricBatcher\n\nUse a custom batcher for metrics. Default: [UngroupedBatcher](../opentelemetry-metrics/src/export/Batcher.ts#L50)\n\n### metricExporter\n\nConfigure a metric exporter. If an exporter is not configured, the metrics SDK will not be initialized and registered.\n\n### metricInterval\n\nConfigure an interval for metrics export in ms. Default: 60,000 (60 seconds)\n\n### plugins\n\nConfigure plugins. By default, all plugins which are installed and in the [Default Plugins List](../opentelemetry-node/src/config.ts#L29) will be enabled.\n\n### resource\n\nConfigure a resource. Resources may also be detected by using the `autoDetectResources` method of the SDK.\n\n### sampler\n\nConfigure a custom sampler. By default all traces will be sampled.\n\n### spanProcessor\n\n### traceExporter\n\nConfigure a trace exporter. If an exporter OR span processor is not configured, the tracing SDK will not be initialized and registered. If an exporter is configured, it will be used with a [BatchSpanProcessor](../opentelemetry-tracing/src/export/BatchSpanProcessor.ts).\n\n### traceParams\n\nConfigure tracing parameters. These are the same trace parameters used to [configure a tracer](../opentelemetry-tracing/src/types.ts#L71).\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 on [gitter][gitter-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[gitter-image]: https://badges.gitter.im/open-telemetry/opentelemetry-js.svg\n[gitter-url]: https://gitter.im/open-telemetry/opentelemetry-node?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/master/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[dependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/status.svg?path=packages/opentelemetry-sdk-node\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-sdk-node\n[devDependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/dev-status.svg?path=packages/opentelemetry-sdk-node\n[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-sdk-node&type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/sdk-node\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fsdk-node.svg\n\n[other-tracing-backends]: https://github.com/open-telemetry/opentelemetry-js#trace-exporters\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","_id":"@opentelemetry/sdk-node@0.11.1-alpha.28","_nodeVersion":"14.10.1","_npmVersion":"lerna/3.22.1/node@v14.10.1+x64 (linux)","dist":{"integrity":"sha512-TvH4pBv4aDOXdpL6m3EWgrCWyM0S4DorZg9kjmT1wewRmixvNZgaanOZqYK7ZoWpiNRpU6wBxewxc4kQWh/Ehg==","shasum":"ff06d272dde1571f6b1aa760be55955a27fd971a","tarball":"http://registry-npm.ywwl.com/@opentelemetry/sdk-node/download/@opentelemetry/sdk-node-0.11.1-alpha.28.tgz","fileCount":15,"unpackedSize":36079,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfa3EqCRA9TVsSAnZWagAA6mIQAIqoM7jrIAab0ysPq/0v\nFAjM7gVsgfWHqukpTjU7aulzeBGxTG5I6fMPwUiAw4FKmB61e7FmQtu/hA3f\ntpLBlY9emfq8jyVsUg7A/XjzbZH9BlOO8bXg9VoSmWvP4peiX6DBG5rdz9+i\nw5g0wqckkHTKAB7DvRIVjO9RS3zn1aDmYAPWn1ophKV7KFZXnW1a/TJWwTnL\nqlOU3I2Z4ORv/0X9e6PZS0Ts8iect9ZhWi478gXCJT7iuvPI1rlDE639UJzR\nxkboE4cuOsfHS0MN07gppmgg1ugtxcW8gRYvBZbsmw/Z01lrWcALoKTgLPSO\n1a6ooqpU2x1QwphVDIR/cbCRbneVO90ywDSwNByh6E7dJB/XA2nh4Qem+nvG\nLP6PPzDu7qZi9zWnaP5dKkLjbSKm9R2Fm515PI1K/nCYZb1lW4aCIeb9tqex\nys+1RcRN265AlRtYwuVzZkN/XeLCcP2N2AKQ+l+A9pXeAVMCQzy+ZKEZ3xTd\nyI0h01eZ784n50TaJr4uvMXZfdKwultisadu7sH6OqN+6vZ95RjTTh3fm2r2\nA+Zbd6NMPp+50/vMDG/wOcE3+xeU6oO3w8/4zYTXvH9/5+weAMe0RV19knut\nfS86IWVXa2TkmVif9bxd05aWHxTnF/0VbSJTxZr6FOVXInquIzWUkS0lKJLi\nF4HK\r\n=4+Ct\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHey5QniQ4+g88++BtUYOO/Csc80aOJOCbb8zUVeWs8VAiEAjA43a8xKvvWDn3gnZEEzwTMTqB30XLExv2Vc2oL53p4="}],"size":10589,"noattachment":false,"key":"/@opentelemetry/sdk-node/-/@opentelemetry/sdk-node-0.11.1-alpha.28.tgz"},"maintainers":[{"name":"obecny","email":"bobecny@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdk-node_0.11.1-alpha.28_1600876841755_0.5353942706962898"},"_hasShrinkwrap":false,"publish_time":1600876841865,"_cnpm_publish_time":1600876841865,"dist-tags":{"canary":"0.300.0-rc.0","latest":"0.301.0","next":"0.34.0"}}