{"bugs":{"url":"https://github.com/openzipkin/zipkin-js/issues"},"dist":{"shasum":"46cfe7cae29b425e1415b387c8bd36d8d55ce375","tarball":"https://registry.npmjs.org/zipkin/-/zipkin-0.18.4-alpha.7.tgz","fileCount":85,"integrity":"sha512-ATnhNvXq4Ah35mzeHt/lur4U2sGr3HEl9+m5PfcdAs2AEZwZwFyWz01UnaUzqZA3MDq3pxy06L5vUeA82KXtMA==","signatures":[{"sig":"MEYCIQDZ1G31vOroRL2TVxmzAknZOwTvbU2XFAvaeVD5YGB4IgIhAJ9zVvKX1RVnxrgert8sXro52yjTN2Wb5taQJlhao7qS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":789043,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGdQ1CRA9TVsSAnZWagAALFcP/Am9mpbxxjXlXgW8LdYw\nX7FZ/deZJwHHZb8jtxa3kklXiK4jBOZYpssaL+Uxhcm2gvJyMTZdlburspQV\nqizCbPKv2lon7NdM1FJ7jOjeLNWbNQzHDeriH4bQEGYm66+XZbKzVOAF+NVQ\nu3L48MdPmrnD47heitiNDNakhM5FErmtaUiOy+WPZ61qWCQAKXB1Jer1jSIX\n0lDTZzDjvwbILLEggKIAyesA5fEF7jpzdiIDCh94JYQlZrLrOTUUxvB6yCOr\nsGHGP5dFAviCpI4scOpIosk5FzXDkij8y9yZibiB/SQksrmRfTq7grutqlqc\n28wszGN4XoELMiH/8HeLgqO+XLzWJGo2p12mdVUXKD5fq9gwIIaLPKVIr6qU\nlG6wfQa23lWKZmDb1BNm6lsQsWfKdnT3HRKHM0kBKtXU5Xc2PkjKP2wnZALq\n9UyreH7rITFUUcSIYK66rj0/iNiHqh1oSVEFVk4pXbHEje9R7HKa0qm0r4QE\nV3H1LLmyJWj1+DZzdsT8DE74o58bDWw/fkOW6tmlb8JR7WiKdJaSOe9o1Gp/\nHLFC6krDp7/NVl66Q4Rw5YSLASIPbYj4GWE+E5kTzrdKN9M1IUWVo+5VwluZ\nc9qzuRt8dAjWfy4pIpXDamtoQx/jcC5JE4LX8K6jAwFLpgdbxkhM3zUumK4j\n7I+N\r\n=hBGB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","name":"zipkin","types":"index.d.ts","unpkg":"dist/zipkin.js","author":{"name":"OpenZipkin","email":"openzipkin.alt@gmail.com"},"module":"es/index.js","readme":"# zipkin\n\nThis is the core npm package for Zipkin. It contains the public API which is used by the various\nplugins (instrumentations and transports).\n\nWe include TypeScript [definition file](index.d.ts) which you can also use as documentation.\n\n## Developing\n\nPlease always make sure that [TypeScript type definitions](index.d.ts) match source code modifications.\n\n## Usage\n\n```javascript\nconst zipkin = require('zipkin');\n\n// In Node.js, the recommended context API to use is zipkin-context-cls.\nconst CLSContext = require('zipkin-context-cls');\nconst ctxImpl = new CLSContext(); // if you want to use CLS\nconst xtxImpl = new zipkin.ExplicitContext(); // Alternative; if you want to pass around the context manually\n\n// Tracer will be a one to many relationship with instrumentation that use it (like express)\nconst tracer = new zipkin.Tracer({\n  ctxImpl,\n  recorder: new zipkin.ConsoleRecorder(), // For easy debugging. You probably want to use an actual implementation, like Kafka or Scribe.\n  sampler: new zipkin.sampler.CountingSampler(0.01), // sample rate 0.01 will sample 1 % of all incoming requests\n  traceId128Bit: true, // to generate 128-bit trace IDs. 64-bit (false) is default\n  localServiceName: 'my-service' // indicates this node in your service graph\n});\n```\n\n### Local tracing\nSometimes you have activity that precedes a remote request that you want to\ncapture in a trace. `tracer.local` can time an operation, placing a\ncorresponding span ID in scope so that any downstream commands end up in the\nsame trace.\n\nHere's an example tracing a synchronous function:\n```javascript\n// A span representing checkout completes before result is returned\nconst result = tracer.local('checkout', () => {\n  return someComputation();\n});\n```\n\nHere's an example tracing a function that returns a promise:\n```javascript\n// A span is in progress and completes when the promise is resolved.\nconst result = tracer.local('checkout', () => {\n  return createAPromise();\n});\n```\n","gitHead":"3913fd50c6ed9e7a7fce104729bb52b554eaf024","license":"Apache-2.0","scripts":{"test":"tsc index.d.ts && mocha --require ../../test/helper.js --require @babel/register && karma start --single-run --browsers ChromeHeadless,FirefoxHeadless ../../karma.conf.js","build":"rollup -c","prepublish":"npm run build","test-debug":"mocha --inspect-brk --require ../../test/helper.js","test-browser":"tsc index.d.ts && karma start --single-run --browsers ChromeHeadless ../../karma.conf.js"},"_npmUser":{"name":"openzipkin","email":"openzipkin-admin@googlegroups.com"},"homepage":"https://github.com/openzipkin/zipkin-js#readme","repository":{"url":"git+https://github.com/openzipkin/zipkin-js.git","type":"git"},"_npmVersion":"5.6.0","description":"The core tracer for Zipkin JS","directories":{},"maintainers":[{"name":"openzipkin","email":"openzipkin.alt@gmail.com"}],"_nodeVersion":"9.11.1","dependencies":{"base64-js":"^1.1.2","is-promise":"^2.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/zipkin_0.18.4-alpha.7_1561973812979_0.34844300582053434","host":"s3://npm-registry-packages"},"_id":"zipkin@0.18.4-alpha.7","version":"0.18.4-alpha.7"}