{"name":"@opentelemetry/propagator-b3","version":"0.18.3-alpha.2","description":"OpenTelemetry B3 propagator provides context propagation for systems that are using the B3 header format","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":{"compile":"tsc --build","clean":"tsc --build --clean","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","lint":"eslint . --ext .ts","lint:fix":"eslint . --ext .ts --fix","version":"node ../../scripts/version-update.js","watch":"tsc --build --watch"},"keywords":["opentelemetry","nodejs","tracing","profiling","monitoring","b3"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","engines":{"node":">=8.0.0"},"publishConfig":{"access":"public"},"dependencies":{"@opentelemetry/api":"^0.18.1"},"devDependencies":{"@types/mocha":"8.2.2","@types/node":"14.14.35","codecov":"3.8.1","gts":"3.1.0","istanbul-instrumenter-loader":"3.0.1","mocha":"7.2.0","nyc":"15.1.0","rimraf":"3.0.2","ts-loader":"8.0.18","ts-mocha":"8.0.0","typescript":"4.2.3"},"gitHead":"2409f1cdddd92c23548c18c055a6a36efe36349f","readme":"# OpenTelemetry Propagator B3\n\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\nThe OpenTelemetry b3 propagator package provides multiple propagator\nimplementations for systems using the b3 context format. See the\n[b3 specification][b3-spec] for complete details.\n\n## B3 Formats\n\nSingle-Header Format:\n\n```bash\nb3: {TraceId}-{SpanId}-{SamplingState}-{ParentSpanId}\n```\n\nMulti-Header Format:\n\n```bash\nX-B3-TraceId: {TraceId}\nX-B3-SpanId: {SpanId}\nX-B3-ParentSpanId: {ParentSpanId}\nX-B3-Sampled: {SamplingState}\n```\n\n- {TraceId}\n\n  - Required\n  - Encoded as 32 or 16 lower-hex characters\n  - 16 character traceIds will be converted to 32 characters by left-padding\n    with 0s to conform with the [OpenTelemetry specification][otel-spec-id-format]\n\n- {SpanId}\n\n  - Required\n  - Encoded as 16 lower-hex characters\n\n- {ParentSpanId}\n\n  - Optional\n  - Used to support the Zipkin functionality where the client and server spans\n    that make up an HTTP request share the same id\n  - Not propagated by this library\n\n- {SamplingState} - Single-header\n\n  - Optional\n  - Valid values\n    - 1 - Accept\n    - 0 - Deny\n    - d - Debug\n    - Absent - Defer sampling decision\n\n- {SamplingState} - Multi-header\n\n  - Optional\n  - Valid values\n    - 1 - Accept\n    - 0 - Deny\n\n- {Flags} - Multi-header\n  - Optional\n  - Debug is encoded as `X-B3-Flags`: 1. Absent or any other value can be ignored. Debug implies an accept decision, so don't also send the `X-B3-Sampled` header.\n\n## Propagator Implementations\n\n### B3Propagator\n\nThe default `B3Propagator` implements b3 propagation according to the\n[OpenTelemetry specification][otel-b3-requirements]. It extracts b3 context\nfrom multi and single header encodings and injects context using the\nsingle-header b3 encoding. The inject encoding can be changed to multi-header\nvia configuration.\n\nExample usage (default):\n\n```javascript\nconst api = require('@opentelemetry/api');\nconst { B3Propagator } = require('@opentelemetry/propagator-b3');\n\napi.propagation.setGlobalPropagator(new B3Propagator());\n```\n\nExample usage (specify inject encoding):\n\n```javascript\nconst api = require('@opentelemetry/api');\nconst { B3Propagator } = require('@opentelemetry/propagator-b3');\n\napi.propagation.setGlobalPropagator(\n  new B3Propagator({ injectEncoding: B3InjectEncoding.MULTI_HEADER })\n);\n```\n\n### B3SinglePropagator\n\nIf a distributed system only needs support for the b3 single-header\nencoding it can use the `B3SinglePropagator` directly.\n\nExample usage:\n\n```javascript\nconst api = require('@opentelemetry/api');\nconst { B3SinglePropagator } = require('@opentelemetry/propagator-b3');\n\napi.propagation.setGlobalPropagator(new B3SinglePropagator());\n```\n\n### B3MultiPropagator\n\nIf a distributed system only needs support for the b3 multi-header\nencoding it can use the `B3MultiPropagator` directly.\n\nExample usage:\n\n```javascript\nconst api = require('@opentelemetry/api');\nconst { B3MultiPropagator } = require('@opentelemetry/propagator-b3');\n\napi.propagation.setGlobalPropagator(new B3MultiPropagator());\n```\n\n### CompositePropagator\n\nIf a distributed system needs to support both single and multiple header\nencodings for inject and extract the `B3SinglePropagator` and\n`B3MultiPropagator` can be used in conjunction with a `CompositePropagator`.\n\nExample usage:\n\n```javascript\nconst api = require('@opentelemetry/api');\nconst { CompositePropagator } = require('@opentelemetry/core');\nconst {\n  B3SinglePropagator,\n  B3MultiPropagator,\n} = require('@opentelemetry/propagator-b3');\n\napi.propagation.setGlobalPropagator(\n  new CompositePropagator({\n    propagators: [new B3SinglePropagator(), new B3MultiPropagator()],\n  })\n);\n```\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 in [GitHub Discussions][discussions-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions\n[license-url]: https://github.com/open-telemetry/opentelemetry-js-contrib/blob/master/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[dependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-propagator-b3\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-propagator-b3\n[devdependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-propagator-b3&type=dev\n[devdependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-propagator-b3&type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/propagator-b3\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fpropagator-b3.svg\n[b3-spec]: https://github.com/openzipkin/b3-propagation\n[otel-b3-requirements]: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/context/api-propagators.md#b3-requirements\n[otel-spec-id-format]: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/api.md#retrieving-the-traceid-and-spanid\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/propagator-b3@0.18.3-alpha.2","_nodeVersion":"14.16.0","_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","dist":{"integrity":"sha512-T8kGXQdyHPKLuh0Bj4Vn7b7DkyGl9bHxuHOMSPdp+4QT0Q/tE+4txsF/cE3K6zn/o07JWOGHaqgswBlSye2i7g==","shasum":"e7505d42e3595e08b99b6c49027fc83704292eff","tarball":"http://registry-npm.ywwl.com/@opentelemetry/propagator-b3/download/@opentelemetry/propagator-b3-0.18.3-alpha.2.tgz","fileCount":24,"unpackedSize":43557,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgY0M/CRA9TVsSAnZWagAAeqwP/25MZ+sZg2TYY0UAl7x8\nZTz5dEaMFOpyilPa5ifXB6/pPBr4N3ewP1jgfPa7pXH0D4e/8UQ3InHlYyX5\nQXpn8jfNEVJqNiL/u/tmP7kRxrNQwOvKeqRCfECw0IWNwue7t06Jxu/E/Ahm\na00eL2Qtx+Xrfdo44lpP1E+FshGFEPPH4St4HG2Ke9wNYErIHHDovybjlFGD\nMEGxMXnGaavqC5XmlMkv7fJUFt+jD0mH3u7AFLDKVgemvbAqjbZf/PWSyI8X\njV36r73qLZdq9KK1WfoXeSKI+RpWUb9hEhS8MIf4QmLD/rgzRorBfHXZ94dO\ncy3FepX5uIRTVWqOyxsnLWcx1YXUCQ0kgvxaZXGg8ohVj8XpfeGfHrKbxpJ/\nNoA1SfCX0kysi5iDMd/QypGxWueoWIgIslvvdjMvdBsaclQGa5uGdWN6wgF6\nZRHlOwk6NWuibM7QeuHOtLSBp88K9gohBL5lopGld8rc13mDDjMUmOxbipWW\n4GvBIPzZOUo9NLkibjlNeiCVineklxa1msfsKFYMIdKWSh1AX/3Yvvr1t5YT\noDFxrNcV7/OM6zEn34GEFk/jLUHgOamGmyBmb+3Oe6skHKxnKd1myjfg+o0y\nPDa+gpxfzchZfAaTNq5z9tKHHQrfv4PTPwTy73oZ35HyYLvRe+F28siRaV+n\nq3N3\r\n=OPT7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB9s1gCdp8HXioTERWoWYXkBDvSZWp17T1n5xYcYe+LHAiEA64hhds8AGPXA+C+0Fceonc7yZOO9oTlgXnHppVEf+Kk="}],"size":11749,"noattachment":false,"key":"/@opentelemetry/propagator-b3/-/@opentelemetry/propagator-b3-0.18.3-alpha.2.tgz"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"directories":{},"maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/propagator-b3_0.18.3-alpha.2_1617118015069_0.06914201201182979"},"_hasShrinkwrap":false,"publish_time":1617118015312,"_cnpm_publish_time":1617118015312,"dist-tags":{"canary":"3.0.0-rc.0","latest":"3.1.0","next":"1.8.0"}}