{"bugs":{"url":"https://github.com/openzipkin/zipkin-js/issues"},"dist":{"shasum":"ad4e4391a2404a1abe77e0d7a556487665189c0c","tarball":"https://registry.npmjs.org/zipkin/-/zipkin-0.20.0-alpha.1.tgz","fileCount":62,"integrity":"sha512-kIrPPA2Q5wqJk83Y2Kp2KZ2SZX6YvQcXOrMYyri27VJ98GjqSqlXtofYfMmwyPuH5aTdA6mN3cj0QpZXKnsuug==","signatures":[{"sig":"MEUCIF9Sgcvz/BhBvrzWswUpXAVazCCMN4IOOw7q5MbHRH1JAiEAv9q9HfblSG+fAXQU/57CPO5DfPqeoonfSI7vqRNQbDQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":722304,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdTUrKCRA9TVsSAnZWagAAtbMP/0B2nu+5bEzNh2TGUw6z\n1AcjLn5dA+OqDGLWqlhmmqbRUUY8OgJ6aX1HtqMSSoGuz50WAvlhTfhudEM/\nfOpuDEmbAZUjYdTKzOAZ9vvEHuMyfa/WZpGiv7n1gpLUj2664fKmTeik8WQx\nkRPtKtervM9viEP02GQ9Fk+Q7QPcbPnrH2Pw/7Di9L61hZK7I+9iL8h+NYGz\nnPBBGQ4p5bzQ7eaKyVpVe481RVIiGPqC9yDJuCeKpSJIP6DTklZy5PDz8MBZ\n67rnYTpd/Ibk6oi9y57kAmITkIk5fe7TALqLRD0mD4JZLaB/tXl0uj9cp/dH\nI2as3evPyMPD3mw2GfTnNmGDsuKV4roZ1ESxVALnI55VLrLsDDjPFBoY/GG/\nfC2m8I7CuZ7FF7x97wXEkLosfYuEOSp2o9MVwpiEprdSKYntEtXPS8Hx0FYb\nMEN7wx+Eg+BznburAUpjMC4ZRway0tPO4UPCIdTBwF7AgP8k5l/kW2ABrpUd\nnKLdm5Mg5tRF50VMdmeuI+A7M8t8d1IcSVa6RRd7UlLxZvBiBy924f/cf7ko\nDC9BwppYubGmNF/xvj2qoveINzgNIZN5NczMB8bE6Tgufq5cBAkWGpOBs9w1\neYX5ucVdxY6ENdZ2pNlDy4eK1vG6UX9xaiIFBjYVGI4TeGe5o+m8yzfX4RuQ\nEr7f\r\n=VsPN\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":"b49a1b4d310f92dad1e99fb5d65bd6800ecca853","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":"lerna/3.16.4/node@v12.5.0+x64 (darwin)","description":"The core tracer for Zipkin JS","directories":{},"maintainers":[{"name":"openzipkin","email":"openzipkin.alt@gmail.com"}],"_nodeVersion":"12.5.0","dependencies":{"base64-js":"^1.1.2","is-promise":"^2.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/zipkin_0.20.0-alpha.1_1565346505942_0.8590165029407806","host":"s3://npm-registry-packages"},"_id":"zipkin@0.20.0-alpha.1","version":"0.20.0-alpha.1"}