{"bugs":{"url":"https://github.com/openzipkin/zipkin-js/issues"},"dist":{"shasum":"d15d3969bb0420fb0bac6ad651fdbcc95d0953ca","tarball":"https://registry.npmjs.org/zipkin/-/zipkin-0.19.2-alpha.3.tgz","fileCount":75,"integrity":"sha512-dm5oZ8Rxg2EvXr3OVRseno1ejaWctER8jFu8eP6EHB0v32Dzk/Rx1pmxa26BUJXiQ/+HFP0mrIiyfW+nE3iqng==","signatures":[{"sig":"MEUCIQCW+ZmHSPcEGrmfKTR2dlXYGFt4ojZhTW7iEptkGICGKwIgH1TDGdReRImEy9CEvSmq9MKCWh2iUu8SAzpJImHW+jI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":507700,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeMqFhCRA9TVsSAnZWagAAElgP+QCqUsoApjVGpsN2wMgW\nVUXh0+qBESEroiX/mkAxgOd/Emjb7CTZq2vrFnFPlR78Lvs9EtF7bt2jm8MF\nRAwhR6JgPNjLh5cmEOKi29V15H4H+nfLswRSdcdE3iTY1Yd+vMgCqdpkJ+6a\n1k8xkIQBMvYjOiQNGLt9K5FUroPoSva+Wl6WInoN135Z7NC4jFzlqQ8EdzQ+\nHgMRgT9AJKlSZxZpZqHTemmz1eWXt5QlfpeUPh18qP0xBH2e21mVa8I7TrfX\nu519Y6Q5MUsrst9hixwar6vbnzoxIK0+m/wt2uxIOATdDGpEptujl3Bb/5Pl\nYoe8yHdBuZveL1OaABEbRPXzdZ4yHgeW65fcr6lxNhHG49lmVcqq8U5j/LBj\nkMm7XZ1al1bAcvr8AXatEZzFGtQkRtAfXnDm6QTGSwuLUFPY2J6GIq9RAr3q\n+CACQRCkk3P79YRe6/SjarBKkbwzZQNJyixgottKRlsPlf7cD3KSXy6qr5Z4\nbijSRF2O917F1SGrUgZXOEGz+auam3up2ZCrpfBGgwKw5QOCO/XLk+2VTtoQ\nEbNWSSHOWTwjvWV5hf2h9qvWvWMdha6ssjTA1MjVF7oK1+NqAG/7D2qe5+3A\ntpdUk9SEtspYhx/7V/2ucIS2nUZE7zxyKwzwBmrYJDWyxYqqn6X1K+i8dyOp\n+MOk\r\n=14QB\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":"a173522b73c71f2ac330b7b2d41959c50d19762a","license":"Apache-2.0","scripts":{"test":"tsc --lib es6 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":"lerna/3.20.2/node@v12.14.1+x64 (linux)","description":"The core tracer for Zipkin JS","directories":{},"maintainers":[{"name":"openzipkin","email":"openzipkin.alt@gmail.com"}],"_nodeVersion":"12.14.1","dependencies":{"base64-js":"^1.1.2","is-promise":"^2.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/zipkin_0.19.2-alpha.3_1580376416994_0.7987515253251671","host":"s3://npm-registry-packages"},"_id":"zipkin@0.19.2-alpha.3","version":"0.19.2-alpha.3"}