{"name":"@opentelemetry/propagator-b3","version":"1.12.0","description":"OpenTelemetry B3 propagator provides context propagation for systems that are using the B3 header format","main":"build/src/index.js","module":"build/esm/index.js","esnext":"build/esnext/index.js","types":"build/src/index.d.ts","repository":{"type":"git","url":"git+https://github.com/open-telemetry/opentelemetry-js.git"},"scripts":{"prepublishOnly":"npm run compile","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","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 tsconfig.json tsconfig.esm.json tsconfig.esnext.json","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","prewatch":"npm run precompile","peer-api-check":"node ../../scripts/peer-api-check.js"},"keywords":["opentelemetry","nodejs","tracing","profiling","monitoring","b3"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","engines":{"node":">=14"},"publishConfig":{"access":"public"},"dependencies":{"@opentelemetry/core":"1.12.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.5.0"},"devDependencies":{"@opentelemetry/api":">=1.0.0 <1.5.0","@types/mocha":"10.0.0","@types/node":"18.6.5","codecov":"3.8.3","istanbul-instrumenter-loader":"3.0.1","mocha":"10.0.0","nyc":"15.1.0","rimraf":"4.1.2","ts-loader":"8.4.0","ts-mocha":"10.0.0","typescript":"4.4.4"},"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-propagator-b3","sideEffects":false,"gitHead":"a04090010ee18e17487b449984807cc2b7b6e3e6","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"_id":"@opentelemetry/propagator-b3@1.12.0","_nodeVersion":"14.18.1","_npmVersion":"lerna/6.0.3/node@v14.18.1+x64 (darwin)","dist":{"integrity":"sha512-WFcn98075QPc2zE1obhKydJHUehI5/HuLoelPEVwATj+487hjCwjHj9r2fgmQkWpvuNSB7CJaA0ys6qqq1N6lg==","shasum":"74d3e4b4889b1ae67a5aab0ca08afbce0a867f4d","tarball":"http://registry-npm.ywwl.com/@opentelemetry/propagator-b3/download/@opentelemetry/propagator-b3-1.12.0.tgz","fileCount":75,"unpackedSize":142741,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHH2WnIw8PGaJGfiDVpNIQS/8xdU8+IjzLS4XvVgPh35AiEAoATbEduFcG4c+iZcJYUaDTdaxuDaXgjAs4e+jM5MLFw="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkOEYrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr9nA/+JRxXf2dHEKy7fnGXPwfEFBsRUdQ3ryw1nxH62uWUX1hceoYo\r\nM2aqM3gmawsn1neBtj2m1ok4Hj46P1iHLQ4YYrFSziM7BmrvdTajG83Tdfct\r\nqYtB1jZOdbZe2S1nCjxVA2YJ0TxHggLVVubFxw30NvJLLxxJNUULWHa5S8zN\r\nQQyTkZr58HS9b2MJ21oS2NoZ18JCeYDerl0ESpctirJ2VC6NpwOo8JnbAaNs\r\nm0ysUbkmTCVwcD77hzpSWFh1jCnosFObQzpYf/obx7IGhhuIcEM+UlhAwu4i\r\nhP9CAHBk57gJh3/NFIPecBkbCX6xZeeVJ2F8V0ohhZa7NSXcw1U6KJrNwcfK\r\nicsQSka8lzFkM85it+mxsuLDMmSZItDa53gsLbux28AnaHYNy5n7e6yjZAIC\r\nx6SbhjcnBBz8PqhRFV0snqAQbABYwcMU6AdZfjcdr90zC7MP4mdyruFRINEn\r\nRQT6EE7k63aR8FT42qnYgyyA507+MnDUE7SwK+8Gwfd7wslgvhIWUjhR+a5u\r\nlPwxw7obTqQzHlcRRGwiXY10pWlftyfIkfA41WG7F0Ui1A5gJM5akeH0TuD1\r\nimhHhLFxiKA863w2ly48PD3xfVNwr4b4KG+xqiudlZGxRh02zrrQV4/Vdd0e\r\nt/xAW0UpOYepoxaRLjS15PH47RiZ0vjRKYQ=\r\n=oC+w\r\n-----END PGP SIGNATURE-----\r\n","size":18434,"noattachment":false,"key":"/@opentelemetry/propagator-b3/-/@opentelemetry/propagator-b3-1.12.0.tgz"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"directories":{},"maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/propagator-b3_1.12.0_1681409579044_0.10752601790730965"},"_hasShrinkwrap":false,"readme":"# OpenTelemetry Propagator B3\n\n[![NPM Published Version][npm-img]][npm-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## B3 Propagation\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 by default. The inject encoding can be changed to\nmulti-header via configuration. See the examples below.\n\n### B3 Single-Header Configuration\n\n```javascript\nconst api = require('@opentelemetry/api');\nconst { B3Propagator } = require('@opentelemetry/propagator-b3');\n\napi.propagation.setGlobalPropagator(new B3Propagator());\n```\n\n### B3 Multi-Header Configuration\n\n```javascript\nconst api = require('@opentelemetry/api');\nconst { B3Propagator, B3InjectEncoding } = require('@opentelemetry/propagator-b3');\n\napi.propagation.setGlobalPropagator(\n  new B3Propagator({ injectEncoding: B3InjectEncoding.MULTI_HEADER })\n);\n```\n\n### B3 Single and Multi-Header Configuration\n\nThe B3Propagator always extracts both the single and multi-header b3 encodings.\nIf you need to inject both encodings this can accomplished using a composite\npropagator.\n\n```javascript\nconst api = require('@opentelemetry/api');\nconst { CompositePropagator } = require('@opentelemetry/core');\nconst { B3Propagator, B3InjectEncoding } = require('@opentelemetry/propagator-b3');\napi.propagation.setGlobalPropagator(\n  new CompositePropagator({\n    propagators: [\n      new B3Propagator(),\n      new B3Propagator({ injectEncoding: B3InjectEncoding.MULTI_HEADER }),\n    ],\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[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","publish_time":1681409579291,"_cnpm_publish_time":1681409579291,"dist-tags":{"canary":"3.0.0-rc.0","latest":"3.1.0","next":"1.8.0"}}