{"_id":"@aspecto/opentelemetry-sampler","_rev":"15-905204280b78e6e246af96c1d1736a58","name":"@aspecto/opentelemetry-sampler","dist-tags":{"alpha":"0.0.0-2024-05-21--09-06","latest":"0.2.0"},"versions":{"0.0.0-2022-11-22--11-42":{"name":"@aspecto/opentelemetry-sampler","version":"0.0.0-2022-11-22--11-42","description":"Opentelemetry sampler by Aspecto","author":{"name":"Aspecto.io"},"license":"Apache-2.0","main":"dist/src/index.js","types":"dist/src/index.d.ts","repository":{"type":"git","url":"git+https://github.com/aspecto-io/aspecto-opentelemetry-js.git"},"homepage":"https://docs.aspecto.io/v1/","publishConfig":{"access":"public"},"scripts":{"test":"echo \"Error: run tests from root\" && exit 1","watch":"tsc -w","build":"tsc","prebuild":"rm -rf ./dist","prepare":"yarn run build"},"engines":{"node":">=14.0.0"},"peerDependencies":{"@opentelemetry/api":"^1.0.0"},"dependencies":{"@aspecto/opentelemetry-base":"^0.0.138","@aspecto/opentelemetry-config":"^0.0.0-2022-11-22--11-42","@aspecto/sampling-rules":"0.0.7","@opentelemetry/sdk-trace-base":"1.7.0"},"gitHead":"fe7267cdd6cc5e6d0be3272edd67c474ab6d829b","bugs":{"url":"https://github.com/aspecto-io/aspecto-opentelemetry-js/issues"},"_id":"@aspecto/opentelemetry-sampler@0.0.0-2022-11-22--11-42","_nodeVersion":"16.18.0","_npmVersion":"lerna/3.22.1/node@v16.18.0+x64 (linux)","dist":{"integrity":"sha512-EsjkCxRA6P9l3rNh7sSvObE0mwGW0lc2uKitcOItgrkThLiH2MFlLl7MAUpJpelRm4Ro2RXtRL6ccJNMLiVFAA==","shasum":"9cac310333aaeddeb8ff31855c0ad3d88ea31ac4","tarball":"https://registry.npmjs.org/@aspecto/opentelemetry-sampler/-/opentelemetry-sampler-0.0.0-2022-11-22--11-42.tgz","fileCount":21,"unpackedSize":45535,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDvym80POpM27MWMmHmbOhW43M7Fq4R0HYrw5GGfU4bhAiEAziy7E7XMzoe8VvVC+aDS1a+Dw9W8tUYN54CCukIeH1c="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfLW7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrt1A//fNRIErwQMTN3f7uIsidYyRY1aBn8ct7TPnoMyP2HbaSkudk7\r\nq0fAU6VDNA0npMpdYwz/OgM3JT2GqdzMZ2mMf4G20vkb2FxRsfhcnFm0U2Jx\r\nUYc17L2HBKTPsk42AkPq0+BHtVZNyxnI81eyQgUoy6AEvsabN91zBKO58h+B\r\noeD8+wU2MR4CWrJaFI08Ie3nYcHSPZ6dKyfMWc95G9KKX3uB0cttGM3WlBTU\r\npM+jqTH33PVznp4xDe6QRSdMwA5qON5KtVHkF/TrqU8nvf72LQCZUyQqcjYn\r\nCx+rb44wa+qooTX/AdDSF1bIW6L3fGIJbEcNXZWohL/GPqvHkCSfxLP1/w2F\r\nETuBzf+WkIfSRNi9aigoib7y8RKfxfQvIphZE/OZzO0YcWXrlEgj6qKTOb5z\r\nlYue7yC3aRI+NF2zzD54DQYc1ieF6QrIFnHzUyaSBy/90APyERlRxyQCfuK1\r\nd8KWlDGwBx7buFuJixcKIWwAtHIUnRppa23YSiHeWFyFNSuqOHI2+VOCu3re\r\nIJtXplTKi6WBzi9J0D2Tz9PrMrF4CewuPO7fR/zp3+rlh4tXQWBJ+2LfW8fm\r\nchAXy/8x6rHtCzTkgrSGkuXl2FOHN0/cwVqCx/0LWFxsqjETxm5E9Uh5j2pd\r\nj3oQUngy1dv0QIYoy2NDt+zqxwu91YFvr0k=\r\n=nOY0\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"habmic","email":"michael@topsight.io"},{"name":"amir.aspecto","email":"amir@aspecto.io"},{"name":"aspecto-release-bot","email":"dev@aspecto.io"},{"name":"andriy-aspecto","email":"andriy@aspecto.io"},{"name":"yanivd","email":"yaniv.davi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-sampler_0.0.0-2022-11-22--11-42_1669117371570_0.5687682769844649"},"_hasShrinkwrap":false},"0.0.0-2022-11-22--14-54":{"name":"@aspecto/opentelemetry-sampler","version":"0.0.0-2022-11-22--14-54","description":"Opentelemetry sampler by Aspecto","author":{"name":"Aspecto.io"},"license":"Apache-2.0","main":"dist/src/index.js","types":"dist/src/index.d.ts","repository":{"type":"git","url":"git+https://github.com/aspecto-io/aspecto-opentelemetry-js.git"},"homepage":"https://docs.aspecto.io/v1/","publishConfig":{"access":"public"},"scripts":{"test":"echo \"Error: run tests from root\" && exit 1","watch":"tsc -w","build":"tsc","prebuild":"rm -rf ./dist","prepare":"yarn run build"},"engines":{"node":">=14.0.0"},"peerDependencies":{"@opentelemetry/api":"^1.0.0"},"dependencies":{"@aspecto/opentelemetry-base":"^0.0.138","@aspecto/opentelemetry-config":"^0.0.0-2022-11-22--14-54","@aspecto/sampling-rules":"0.0.7","@opentelemetry/sdk-trace-base":"1.7.0"},"gitHead":"6196da6aa31bad3de4ba942b114351e424140f70","readme":"# Aspecto Sampler\n\nAspecto is an observability platform, powered by OpenTelemetry, that brings R&D teams complete visibility into every interaction, performance issue, and error happening within their distributed services.\n\n**If you are looking for a full OpenTelemetry distro, including all instrumentations and features, see [@aspecto/opentelemetry](https://www.npmjs.com/package/@aspecto/opentelemetry)**\n\nThis package exposes [OpenTelemetry Sampler](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/sdk.md#sampling) which you can integrate into your own OpenTelemetry installation to apply advance sampling using Aspecto platform.\n\n## Aspecto Sampling\n\nTo configure sampling in Aspecto, [visit \"Sampling Rules\"](https://docs.aspecto.io/v1/settings/sampling-rules)\nAspecto sampler fetches remote sampling rules that you configure in Aspecto platform and applies them on traces that start in a given service.\n\nIt includes the following features:\n\n### Remote Configuration\n\nSampling configuration is fetched from Aspecto platform. \n\n- Configuration is always up-to-date and consistent between all your instances.\n- Updates are automatically and immediately pushed to all samplers whenever you make a change.\n- Changing configuration does not require writing code, updating dependencies, or deploying artifacts. \n\n### Configure in UI\n\nConfigure your sampling rules in an easy-to-use UI.\n\n- No need to write code.\n- Search capabilities.\n- Turn rules on and off in a click.\n- Set up temporary rules with timeouts.\n- Same UI for multiple languages - configure your rules once and apply them for both NodeJS and Ruby (support for more languages is coming soon)\n\n### Rich Sampling Language\n\nAspecto sampling abstract away the hard parts of the sampling implementation and focus on common use cases, while still allowing advanced configuration for complex scenarios.\n\n- Create specific rules for different workspaces.\n- Easily defined which service/s and environment/s are affected.\n- Add conditions based on span attributes.\n- Control the sampling rate, and priority of rules.\n\n## Install\n\n### npm\n```sh\nnpm install @aspecto/opentelemetry-sampler\n```\n\n### yarn\n```sh\nyarn add @aspecto/opentelemetry-sampler\n```\n\nSupported node version: >= 14\n\n## Usage\n\nCreate an instance of `AspectoSampler` and use it in your `TraceProvider`\n\n```js\nimport { AspectoSampler } from '@aspecto/opentelemetry-sampler';\n\n// create an instance of AspectoSampler\nconst aspectoSampler = new AspectoSampler({\n    // aspectoAuth,\n    // serviceName,\n    // env,\n    // requireConfigForTraces,\n    // samplingRatio,\n});\n\n// Now, you can now use it wherever an OpenTelemetry sampler is acceptable\n\n// NodeTracerProvider\nimport { NodeTracerProvider } from '@opentelemetry/sdk-trace-node';\nconst provider = new NodeTracerProvider({\n    sampler: aspectoSampler,\n});\n\n// NodeSDK\nimport { NodeSDK } from '@opentelemetry/sdk-node';\nconst sdk = new NodeSDK({\n    traceExporter: // add your trace exporter here\n    sampler: aspectoSampler,\n});\n\n```\n\n## Configuration\n\nYou can configure the sampler via one or more of the following:\n- `options` variable. for example: `new AspectoSampler({optionName: optionValue})`.\nThis enables setting config options dynamically.\n- Environment variables\n- Add `aspecto.json` configuration file to the root directory, next to service's `package.json` file\n\nValues are evaluated in the following priority:\n1) `options` object\n2) environment variables\n3) config file\n4) default values\n\nAspecto auth is required, service name and env are recommended.\n\n| Option Name | Environment Variable | Type | Default | Description |\n| --- | --- | --- | --- | --- |\n| `disableAspecto` | `DISABLE_ASPECTO` |  boolean | `false` | Disable the sampler and don't apply any sampling logic (sample everything) |\n| `env` | `NODE_ENV` | string | - | Set environment for matching sampling rules |\n| `aspectoAuth` | `ASPECTO_AUTH` | UUID | - | [Aspecto token](https://app.aspecto.io/app/integration/api-key) for authentication to read sampling configuration  |\n| `serviceName` | `OTEL_SERVICE_NAME` | string | - | Set service name for matching sampling rules |\n| `samplingRatio` | `ASPECTO_SAMPLING_RATIO` | number | `1.0` | This option is used as a fallback if no specific sampling rule is matched, and before remote sampling rule configuration is fetched. It controls how many of the traces starting in this service should be sampled. Set to number in the range [0.0, 1.0] where `0.0` is no sampling, and `1.0` is sample all. |\n| `requireConfigForTraces` | `ASPECTO_REQUIRE_CONFIG_FOR_TRACES` | boolean | `false` | When `true`, the Sampler will not trace anything until the remote sampling configuration arrives (a few hundred ms). Can be used to enforce sampling configuration is always applied, with the cost of losing traces generated during service startup. |\n\n### Getting Help\n\nFor any assistance or question, feel free to [Contact Us](https://www.aspecto.io/contact-us/).\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/aspecto-io/aspecto-opentelemetry-js/issues"},"_id":"@aspecto/opentelemetry-sampler@0.0.0-2022-11-22--14-54","_nodeVersion":"16.18.0","_npmVersion":"lerna/3.22.1/node@v16.18.0+x64 (linux)","dist":{"integrity":"sha512-90urc4gMeze1sRmlyh0I/oNhACLGFNzbBb01HUm4e7BDV5fKaZ1eP3PZxZRu3pafeBWpiEa7IzFn946Zenbicw==","shasum":"dfa08e668ce05e5b629b0e0891e0ad209a601988","tarball":"https://registry.npmjs.org/@aspecto/opentelemetry-sampler/-/opentelemetry-sampler-0.0.0-2022-11-22--14-54.tgz","fileCount":22,"unpackedSize":45603,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD8hLdyuyWnMaYrLlZiwqgm7hQepKydiGBflYkSV8d2YQIhAORcY+RemxyLnWFrIb695turz+5zztGgIyuxo8KzXWG+"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfOLaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo88w//X/0n67NNS3bPgy0GlPPu0y8shxk1q6+6Vt0LfbC1JaMXc+iI\r\nMeuQmlF7kIWRLY86G10KoaOQ6z9DmEh7V8Eh3j+US+9cI3bbu3Xo/+eWsPdh\r\nsJICvtRqFpfGdGBLtIm53Iu0hjyuID0Br4BhjIBTzX1oGWKf6tkFkejOOX1C\r\n4kmUpC4WTEFK8IyB3NfjuRhbanNZ4NlWlz+Vr/lwSS0mbWP8blYPE37eLFyq\r\nBouG5X+ECWXlp7m0LZvUPVRoWHnhRnSfYnhCaniInRd3A0eNiYJFLyCyYNA1\r\nRfYDUobxjeC4e8FGdPqEgJDWR//iJ2B54MppjM6YKDvX3bqriySNYW5FAJat\r\nd2Pd2Ge/VuE4ZhGGvp7xWO7QjKJTvGKdrlIlk4kA3Y3SGp5MgRFgKcZJP3B2\r\nea4agXjWEYi1ov4W1OMzmMWPiAGFW/Cs4q0WEpjkJg3CFd9g/SkRm6lGDVYQ\r\nFCov8nQ3yH4OgXJG+vz8trC1BOTH8+knYQ5WCEA8Rsdsgectp16UpoODrkby\r\nX/RpxNzauO0mPVM+fsyRC6EuwO+amrj5R6/9MP/LFTM68WguYImg5K03x6Pt\r\n8WpUHUkxgHI4MF01zILzNlAPr5wXDFpGVS6za0kg+Ewm2RkYKGSkgNzl+a4f\r\nfRKJCC/+zP9qAfof+tic0+zs7GBpxxmY8Gw=\r\n=jDum\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"habmic","email":"michael@topsight.io"},{"name":"amir.aspecto","email":"amir@aspecto.io"},{"name":"aspecto-release-bot","email":"dev@aspecto.io"},{"name":"andriy-aspecto","email":"andriy@aspecto.io"},{"name":"yanivd","email":"yaniv.davi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-sampler_0.0.0-2022-11-22--14-54_1669128922640_0.7408289765874414"},"_hasShrinkwrap":false},"0.0.0-2022-11-24--17-44":{"name":"@aspecto/opentelemetry-sampler","version":"0.0.0-2022-11-24--17-44","description":"Opentelemetry sampler by Aspecto","author":{"name":"Aspecto.io"},"license":"Apache-2.0","main":"dist/src/index.js","types":"dist/src/index.d.ts","repository":{"type":"git","url":"git+https://github.com/aspecto-io/aspecto-opentelemetry-js.git"},"homepage":"https://docs.aspecto.io/v1/","publishConfig":{"access":"public"},"scripts":{"test":"echo \"Error: run tests from root\" && exit 1","watch":"tsc -w","build":"tsc","prebuild":"rm -rf ./dist","prepare":"yarn run build"},"engines":{"node":">=14.0.0"},"peerDependencies":{"@opentelemetry/api":"^1.3.0"},"dependencies":{"@aspecto/opentelemetry-base":"^0.0.138","@aspecto/opentelemetry-config":"^0.0.0-2022-11-24--17-44","@aspecto/sampling-rules":"0.0.7","@opentelemetry/sdk-trace-base":"1.8.0"},"gitHead":"64a888ffb3eaf235d129b465586da23fd82d40ae","readme":"# Aspecto Sampler\n\nAspecto is an observability platform, powered by OpenTelemetry, that brings R&D teams complete visibility into every interaction, performance issue, and error happening within their distributed services.\n\n**If you are looking for a full OpenTelemetry distro, including all instrumentations and features, see [@aspecto/opentelemetry](https://www.npmjs.com/package/@aspecto/opentelemetry)**\n\nThis package exposes an [OpenTelemetry Sampler](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/sdk.md#sampling) which you can integrate into your own OpenTelemetry installation to apply advance sampling capabilities using Aspecto platform.\n\n## Aspecto Sampling\n\nTo configure sampling in Aspecto, [click here](https://app.aspecto.io/settings/sampling-rules).\n\nAspecto sampler fetches remote sampling rules that you configure in Aspecto platform and applies them on traces that start in a given service.\n\nIt includes the following features:\n\n### Remote Configuration\n\nSampling configuration is fetched from Aspecto platform. \n\n- Configuration is always up-to-date and consistent between all your instances.\n- Updates are automatically and immediately pushed to all samplers whenever you make a change.\n- Changing configuration does not require writing code, updating dependencies, or deploying artifacts. \n\n### Configure in UI\n\nConfigure your sampling rules in an easy-to-use UI.\n\n- No need to write code.\n- Search capabilities.\n- Turn rules on and off in a click.\n- Set up temporary rules with timeouts.\n- Same UI for multiple languages - configure your rules once and apply them for both NodeJS and Ruby (support for more languages is coming soon)\n\n### Rich Sampling Language\n\nAspecto sampling abstract away the hard parts of the sampling implementation and focus on common use cases, while still allowing advanced configuration for complex scenarios.\n\n- Create specific rules for different workspaces.\n- Easily define which service/s and environment/s are affected.\n- Add conditions based on span attributes.\n- Control the sampling rate, and priority of rules.\n\n## Install\n\n### npm\n```sh\nnpm install @aspecto/opentelemetry-sampler\n```\n\n### yarn\n```sh\nyarn add @aspecto/opentelemetry-sampler\n```\n\nSupported node version: >= 14\n\n## Usage\n\nCreate an instance of `AspectoSampler` and use it in your `TraceProvider`\n\n```js\nimport { AspectoSampler } from '@aspecto/opentelemetry-sampler';\n\n// create an instance of AspectoSampler\nconst aspectoSampler = new AspectoSampler({\n    // aspectoAuth,\n    // serviceName,\n    // env,\n    // requireConfigForTraces,\n    // samplingRatio,\n});\n\n// Now, you can now use it wherever an OpenTelemetry sampler is acceptable\n\n// NodeTracerProvider\nimport { NodeTracerProvider } from '@opentelemetry/sdk-trace-node';\nconst provider = new NodeTracerProvider({\n    sampler: aspectoSampler,\n});\n\n// NodeSDK\nimport { NodeSDK } from '@opentelemetry/sdk-node';\nconst sdk = new NodeSDK({\n    traceExporter: // add your trace exporter here\n    sampler: aspectoSampler,\n});\n\n```\n\n## Configuration\n\nYou can configure the sampler via one or more of the following:\n- `options` variable. for example: `new AspectoSampler({optionName: optionValue})`.\nThis enables setting config options dynamically.\n- Environment variables\n- Add `aspecto.json` configuration file to the root directory, next to service's `package.json` file\n\nValues are evaluated in the following priority:\n1) `options` object\n2) environment variables\n3) config file\n4) default values\n\nAspecto auth is required, service name and env are recommended.\n\n| Option Name | Environment Variable | Type | Default | Description |\n| --- | --- | --- | --- | --- |\n| `disableAspecto` | `DISABLE_ASPECTO` |  boolean | `false` | Disable the sampler and don't apply any sampling logic (sample nothing) |\n| `env` | `NODE_ENV` | string | - | Set environment for matching sampling rules |\n| `aspectoAuth` | `ASPECTO_AUTH` | UUID | - | [Aspecto token](https://app.aspecto.io/app/integration/api-key) for authentication to read sampling configuration  |\n| `serviceName` | `OTEL_SERVICE_NAME` | string | - | Set service name for matching sampling rules |\n| `samplingRatio` | `ASPECTO_SAMPLING_RATIO` | number | `1.0` | This option is used as a fallback if no specific sampling rule is matched, and before remote sampling rule configuration is fetched. It controls how many of the traces starting in this service should be sampled. Set to number in the range [0.0, 1.0] where `0.0` is no sampling, and `1.0` is sample all. |\n| `requireConfigForTraces` | `ASPECTO_REQUIRE_CONFIG_FOR_TRACES` | boolean | `false` | When `true`, the Sampler will not trace anything until the remote sampling configuration arrives (a few hundred ms). Can be used to enforce sampling configuration is always applied, with the cost of losing traces generated during service startup. |\n\n### Getting Help\n\nFor any assistance or question, feel free to [Contact Us](https://www.aspecto.io/contact-us/).\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/aspecto-io/aspecto-opentelemetry-js/issues"},"_id":"@aspecto/opentelemetry-sampler@0.0.0-2022-11-24--17-44","_nodeVersion":"16.18.1","_npmVersion":"lerna/3.22.1/node@v16.18.1+x64 (linux)","dist":{"integrity":"sha512-Euw+3okF+8+ksQ6GS7kOHsVRNPk0a1PgYQp4b9vgUVpwD4C7Tr0h592LrPqzOcAL7MI7yQpxyhbJjIfag2zkKA==","shasum":"271ab9b4cf6e70f17101906378db2018d6f4c6f0","tarball":"https://registry.npmjs.org/@aspecto/opentelemetry-sampler/-/opentelemetry-sampler-0.0.0-2022-11-24--17-44.tgz","fileCount":22,"unpackedSize":46237,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID1AmBrZJu4n7AFAdlMBEuyUl0aKKnzHrZdctLplxwqTAiAqGWgjwWHtGUiGnL9xFfMrVWMUK4IclXpgnecW1IlQXg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjf62VACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq2eg//boof6kpfgnl6zi/KnugmniMtuF3SePN8KGjsNLuItGcgzgi4\r\ncI1fQBnqGXcw2hya2oSi6g+UHcTLL3i5zWGHjuMKj6yJiAvtL2dCkWOEEaf0\r\n3HspqqpedxU33/8b1BsoDlaieFCj2qfn+mqfpDYOKfTLzLYJhmpqKq91wnRl\r\nEveyqpM+iqsoFPyirxrfi+eHZ7dEusl5QRWQLAr24YHJ/Dwofyqnp6HcTtRI\r\n3q19/8NzLU/vehsUyUpFWRNgaPFQHELllwZG3kUFlrOdSpPPttyo523MJ5Lh\r\nKwVsZUCJtCZsGjl2lXk3RSyo3GNpkO/E5/V2IRvmS2F1Fi90MxO11nzPaED5\r\nEDM7g2b7V4OOh9oioRU1DPDaMo1aubhHyJj8MVP9FOGgyVfG/p46frvMrsd/\r\nkz6oug8xfYcUGA6P7UsTvwnvK3yKP1ZGkb3f6HLd7QjXtWsSbBMqvkMckIzL\r\n9PYqD9SE6gl9Y1uybH5fa2OxwdMr63HXvM5luh+QR0aLeylnchirO7raUjQB\r\nvJVEONvOFxyFPmqmUyNbruuIqtm9CPD2QLGMgRMlPRwZqNeB74cKEcCNm4ve\r\nVb5f+1VRA0tEj8Kb8PmW5KVd7HhnvCcpL1sGvR7N76Ea9Ym0WQWhTbkrdHz6\r\n75TUFMxaF6tDfAVAEX7aA18L8cVvWHumW8o=\r\n=kUVu\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"habmic","email":"michael@topsight.io"},{"name":"amir.aspecto","email":"amir@aspecto.io"},{"name":"aspecto-release-bot","email":"dev@aspecto.io"},{"name":"andriy-aspecto","email":"andriy@aspecto.io"},{"name":"yanivd","email":"yaniv.davi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-sampler_0.0.0-2022-11-24--17-44_1669311892764_0.5264747379863677"},"_hasShrinkwrap":false},"0.0.139":{"name":"@aspecto/opentelemetry-sampler","version":"0.0.139","description":"Opentelemetry sampler by Aspecto","author":{"name":"Aspecto.io"},"license":"Apache-2.0","main":"dist/src/index.js","types":"dist/src/index.d.ts","repository":{"type":"git","url":"git+https://github.com/aspecto-io/aspecto-opentelemetry-js.git"},"homepage":"https://docs.aspecto.io/v1/","publishConfig":{"access":"public"},"scripts":{"test":"echo \"Error: run tests from root\" && exit 1","watch":"tsc -w","build":"tsc","prebuild":"rm -rf ./dist","prepare":"yarn run build"},"engines":{"node":">=14.0.0"},"peerDependencies":{"@opentelemetry/api":"^1.3.0"},"dependencies":{"@aspecto/opentelemetry-base":"^0.0.139","@aspecto/opentelemetry-config":"^0.0.139","@aspecto/sampling-rules":"0.0.7","@opentelemetry/sdk-trace-base":"1.8.0"},"gitHead":"80be0557889856952c000339d61b65415fdeb4c0","bugs":{"url":"https://github.com/aspecto-io/aspecto-opentelemetry-js/issues"},"_id":"@aspecto/opentelemetry-sampler@0.0.139","_nodeVersion":"16.18.1","_npmVersion":"lerna/3.22.1/node@v16.18.1+x64 (linux)","dist":{"integrity":"sha512-KUW+zBFAdousdU45p8o38Qzhvf1gS0zgbln/2Vi0TPjZwOur+S6yEQA0ZqsRvBdxTb0MnL8b6hi8GYO9no/q7g==","shasum":"388b71d9b3016c8a4811e16b29a2277f838c4380","tarball":"https://registry.npmjs.org/@aspecto/opentelemetry-sampler/-/opentelemetry-sampler-0.0.139.tgz","fileCount":23,"unpackedSize":46708,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCYlEDaLILbbTNs3tst7RFDcQcIj641RDUsnkX5JShBtQIgTgwGrOSH+bKDeuE3B2WVYFDYwHaqLL6N2XmihRh+gjg="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjhvCsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoOKg//cZNkkEsO+JKDyIhjrkIoopk72ISDQ7SCB3tDdVrwCnizMQ24\r\nQMJ2NnkxCqytd8aaYRPpmBu1lydTpgzEi4A7sjiKh7GPNSP0Dgp4xvo/8ATk\r\nw59+h1NTmLVovWt0oG7ao8TgpBY12h8uKms3ksl3uERAt289wTzZy8OEAH5M\r\nUc8EEeiEeLwXyxnsRCIlPpDLhoTdosQO40rrJRDKNiKFaiVsVYvDfJwHYWJg\r\nmdyliy0h6VwFv88ZX8WFmnITxtkHDVEx/WBhLzNv+HJBzrhXxpiyBfC0cysY\r\nJ5/YZPpzj3id9RL4tsbr+OmacW5wePc2MmQdHIzQ8PaKXpoSu0K8aOhm+1Db\r\neWD/NH0h4RMGi797L5EjP3X6cn0iTcpqMMaIWk8/ir5DlgLUHgVXGHk8YOEq\r\nMlQd8X4L1sQ69RTyKY8fZ2MBxNQxFrJIerh30+3dHJZCmL2MpcUcN/WjxqXz\r\npTpnUq1WGphbkN3wjpe1VlNB2KjvqpqRxevbCRl6TSUDzDlXilRFOcbyAag5\r\nfG2TRwkyS9MSYv339QNTOi6zDYOCELTn5PrcCcjE77pbT2WHO8c2WPeqLset\r\nCbi1cVkSdqzz4fguzpSXtuvLsdRq3PDS90xi4hwZmAdQvU6LJqg5wtfts394\r\n/lp8Cb6ZSiFAMu0EQuZLvgCEGbcfvAJRuI4=\r\n=vGtA\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"habmic","email":"michael@topsight.io"},{"name":"amir.aspecto","email":"amir@aspecto.io"},{"name":"aspecto-release-bot","email":"dev@aspecto.io"},{"name":"andriy-aspecto","email":"andriy@aspecto.io"},{"name":"yanivd","email":"yaniv.davi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-sampler_0.0.139_1669787820576_0.8965380014460635"},"_hasShrinkwrap":false},"0.0.0-2023-02-09--09-14":{"name":"@aspecto/opentelemetry-sampler","version":"0.0.0-2023-02-09--09-14","description":"Opentelemetry sampler by Aspecto","author":{"name":"Aspecto.io"},"license":"Apache-2.0","main":"dist/src/index.js","types":"dist/src/index.d.ts","repository":{"type":"git","url":"git+https://github.com/aspecto-io/aspecto-opentelemetry-js.git"},"homepage":"https://docs.aspecto.io/v1/","publishConfig":{"access":"public"},"scripts":{"test":"echo \"Error: run tests from root\" && exit 1","watch":"tsc -w","build":"tsc","prebuild":"rm -rf ./dist","prepare":"yarn run build"},"engines":{"node":">=14.0.0"},"peerDependencies":{"@opentelemetry/api":"^1.3.0"},"dependencies":{"@aspecto/opentelemetry-base":"^0.0.139","@aspecto/opentelemetry-config":"^0.0.139","@aspecto/sampling-rules":"0.0.7","@opentelemetry/sdk-trace-base":"1.8.0"},"gitHead":"0d31a781b147b5ca23ede3e8cf277f49cf3ca878","readme":"# Aspecto Sampler\n\nAspecto is an observability platform, powered by OpenTelemetry, that brings R&D teams complete visibility into every interaction, performance issue, and error happening within their distributed services.\n\n**If you are looking for a full OpenTelemetry distro, including all instrumentations and features, see [@aspecto/opentelemetry](https://www.npmjs.com/package/@aspecto/opentelemetry)**\n\nThis package exposes an [OpenTelemetry Sampler](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/sdk.md#sampling) which you can integrate into your own OpenTelemetry installation to apply advance sampling capabilities using Aspecto platform.\n\n## Aspecto Sampling\n\nTo configure sampling in Aspecto, [click here](https://app.aspecto.io/settings/sampling-rules).\n\nAspecto sampler fetches remote sampling rules that you configure in Aspecto platform and applies them on traces that start in a given service.\n\nIt includes the following features:\n\n### Remote Configuration\n\nSampling configuration is fetched from Aspecto platform. \n\n- Configuration is always up-to-date and consistent between all your instances.\n- Updates are automatically and immediately pushed to all samplers whenever you make a change.\n- Changing configuration does not require writing code, updating dependencies, or deploying artifacts. \n\n### Configure in UI\n\nConfigure your sampling rules in an easy-to-use UI.\n\n- No need to write code.\n- Search capabilities.\n- Turn rules on and off in a click.\n- Set up temporary rules with timeouts.\n- Same UI for multiple languages - configure your rules once and apply them for both NodeJS and Ruby (support for more languages is coming soon)\n\n### Rich Sampling Language\n\nAspecto sampling abstract away the hard parts of the sampling implementation and focus on common use cases, while still allowing advanced configuration for complex scenarios.\n\n- Create specific rules for different workspaces.\n- Easily define which service/s and environment/s are affected.\n- Add conditions based on span attributes.\n- Control the sampling rate, and priority of rules.\n\n## Install\n\n### npm\n```sh\nnpm install @aspecto/opentelemetry-sampler\n```\n\n### yarn\n```sh\nyarn add @aspecto/opentelemetry-sampler\n```\n\nSupported node version: >= 14\n\n## Usage\n\nCreate an instance of `AspectoSampler` and use it in your `TraceProvider`\n\n```js\nimport { AspectoSampler } from '@aspecto/opentelemetry-sampler';\n\n// create an instance of AspectoSampler\nconst aspectoSampler = new AspectoSampler({\n    // aspectoAuth,\n    // serviceName,\n    // env,\n    // requireConfigForTraces,\n    // samplingRatio,\n});\n\n// Now, you can now use it wherever an OpenTelemetry sampler is acceptable\n\n// NodeTracerProvider\nimport { NodeTracerProvider } from '@opentelemetry/sdk-trace-node';\nconst provider = new NodeTracerProvider({\n    sampler: aspectoSampler,\n});\n\n// NodeSDK\nimport { NodeSDK } from '@opentelemetry/sdk-node';\nconst sdk = new NodeSDK({\n    traceExporter: // add your trace exporter here\n    sampler: aspectoSampler,\n});\n\n```\n\n## Configuration\n\nYou can configure the sampler via one or more of the following:\n- `options` variable. for example: `new AspectoSampler({optionName: optionValue})`.\nThis enables setting config options dynamically.\n- Environment variables\n- Add `aspecto.json` configuration file to the root directory, next to service's `package.json` file\n\nValues are evaluated in the following priority:\n1) `options` object\n2) environment variables\n3) config file\n4) default values\n\nAspecto auth is required, service name and env are recommended.\n\n| Option Name | Environment Variable | Type | Default | Description |\n| --- | --- | --- | --- | --- |\n| `disableAspecto` | `DISABLE_ASPECTO` |  boolean | `false` | Disable the sampler and don't apply any sampling logic (sample nothing) |\n| `env` | `NODE_ENV` | string | - | Set environment for matching sampling rules |\n| `aspectoAuth` | `ASPECTO_AUTH` | UUID | - | [Aspecto token](https://app.aspecto.io/app/integration/api-key) for authentication to read sampling configuration  |\n| `serviceName` | `OTEL_SERVICE_NAME` | string | - | Set service name for matching sampling rules |\n| `samplingRatio` | `ASPECTO_SAMPLING_RATIO` | number | `1.0` | This option is used as a fallback if no specific sampling rule is matched, and before remote sampling rule configuration is fetched. It controls how many of the traces starting in this service should be sampled. Set to number in the range [0.0, 1.0] where `0.0` is no sampling, and `1.0` is sample all. |\n| `requireConfigForTraces` | `ASPECTO_REQUIRE_CONFIG_FOR_TRACES` | boolean | `false` | When `true`, the Sampler will not trace anything until the remote sampling configuration arrives (a few hundred ms). Can be used to enforce sampling configuration is always applied, with the cost of losing traces generated during service startup. |\n\n### Getting Help\n\nFor any assistance or question, feel free to [Contact Us](https://www.aspecto.io/contact-us/).\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/aspecto-io/aspecto-opentelemetry-js/issues"},"_id":"@aspecto/opentelemetry-sampler@0.0.0-2023-02-09--09-14","_nodeVersion":"16.19.0","_npmVersion":"lerna/3.22.1/node@v16.19.0+x64 (linux)","dist":{"integrity":"sha512-KW7emcARkfUZWhAheHvKsCBQAGRyomxoMoetZjQIn4OHYvl7ZleIb+tpLvHosRbibStaym7WUNa0PUJZDRS1GQ==","shasum":"05c173e541b0dfa3d947417fbbf5df445f1bf632","tarball":"https://registry.npmjs.org/@aspecto/opentelemetry-sampler/-/opentelemetry-sampler-0.0.0-2023-02-09--09-14.tgz","fileCount":23,"unpackedSize":46834,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGvJlSKExiQA1Z+qDL9phymHCizoHx8EoMdJ1V722dh1AiAv+zo/s4m7axc2qQrGlde4IK9yCOo2Rom5u2n1FV+LEw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj5LmYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqJFBAAn0ERf8xcUGwjLxfzq5iw6nRPXEt3f4fmX2Wh9IQJcghTNy3c\r\n1jdRa/3b0z3ATuKDOqdNTXIkpi06PGoIMSK0Up1JXIY5v7tgKtkjyBJHquBw\r\nuOMZKPNoDEHKLDHxDqRnE5jES5fS6CVpB0xjadRBpA+M75FYzs0IVBa0k4Cd\r\n1rBRzKDW0cgieNbfvKwoQAmVKFVq6kBQn+ubDpWcptV8+dCOsUl2s2FB19+8\r\nniHiQmQQDYleyDi/igiqW2Kbz3kauAjbWVIzXp6EG0IPpv8qqF8Vq8OjEEhk\r\nIOogsly3BaGS7SX2MNvW9t4YMsMoD5b2WD5hH53QKZoY1H+ztsFHPoRk20HO\r\nIHJINcteGldleG2RvbUaiGG3eixdenfgt0sswWvNyU8DJOk3JpKw94QCsfK6\r\npUZH0ar4BuKxELGYFoETkDxdVxLAPPkF0wBG90k01zLAyvy72NJhBUGj9CgC\r\nqbbwDTOvfELPR/paIgMoIeUIOtJCY+RJ+0jVqDwKq56u8tsKT3xWEB8NO2c/\r\nQ8P23nUe0PSP+LZOJ3D/WL+eGwMVIoVnkx8Lgc5YywFhwklmBYfEFCUpuMQS\r\nJ7t6DgS6kloRTz/9hRDYiL9Qb5dTri8EA2iOrOVPoy18mYrf330NgmwleCzf\r\nKspaeMXB81hAC/LJd5jWeSlmPJiUgSoDbAI=\r\n=OKmh\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"habmic","email":"michael@topsight.io"},{"name":"amir.aspecto","email":"amir@aspecto.io"},{"name":"aspecto-release-bot","email":"dev@aspecto.io"},{"name":"andriy-aspecto","email":"andriy@aspecto.io"},{"name":"yanivd","email":"yaniv.davi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-sampler_0.0.0-2023-02-09--09-14_1675934103903_0.9264701085572111"},"_hasShrinkwrap":false},"0.0.0-2023-02-28--15-21":{"name":"@aspecto/opentelemetry-sampler","version":"0.0.0-2023-02-28--15-21","description":"Opentelemetry sampler by Aspecto","author":{"name":"Aspecto.io"},"license":"Apache-2.0","main":"dist/src/index.js","types":"dist/src/index.d.ts","repository":{"type":"git","url":"git+https://github.com/aspecto-io/aspecto-opentelemetry-js.git"},"homepage":"https://docs.aspecto.io/v1/","publishConfig":{"access":"public"},"scripts":{"test":"echo \"Error: run tests from root\" && exit 1","watch":"tsc -w","build":"tsc","prebuild":"rm -rf ./dist","prepare":"yarn run build"},"engines":{"node":">=14.0.0"},"peerDependencies":{"@opentelemetry/api":"^1.3.0"},"dependencies":{"@aspecto/opentelemetry-base":"^0.0.139","@aspecto/opentelemetry-config":"^0.0.139","@aspecto/sampling-rules":"0.0.7","@opentelemetry/sdk-trace-base":"1.8.0"},"gitHead":"acc11e555e99ed6a823e32c292c65a9a2f0396a3","readme":"# Aspecto Sampler\n\nAspecto is an observability platform, powered by OpenTelemetry, that brings R&D teams complete visibility into every interaction, performance issue, and error happening within their distributed services.\n\n**If you are looking for a full OpenTelemetry distro, including all instrumentations and features, see [@aspecto/opentelemetry](https://www.npmjs.com/package/@aspecto/opentelemetry)**\n\nThis package exposes an [OpenTelemetry Sampler](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/sdk.md#sampling) which you can integrate into your own OpenTelemetry installation to apply advance sampling capabilities using Aspecto platform.\n\n## Aspecto Sampling\n\nTo configure sampling in Aspecto, [click here](https://app.aspecto.io/settings/sampling-rules).\n\nAspecto sampler fetches remote sampling rules that you configure in Aspecto platform and applies them on traces that start in a given service.\n\nIt includes the following features:\n\n### Remote Configuration\n\nSampling configuration is fetched from Aspecto platform. \n\n- Configuration is always up-to-date and consistent between all your instances.\n- Updates are automatically and immediately pushed to all samplers whenever you make a change.\n- Changing configuration does not require writing code, updating dependencies, or deploying artifacts. \n\n### Configure in UI\n\nConfigure your sampling rules in an easy-to-use UI.\n\n- No need to write code.\n- Search capabilities.\n- Turn rules on and off in a click.\n- Set up temporary rules with timeouts.\n- Same UI for multiple languages - configure your rules once and apply them for both NodeJS and Ruby (support for more languages is coming soon)\n\n### Rich Sampling Language\n\nAspecto sampling abstract away the hard parts of the sampling implementation and focus on common use cases, while still allowing advanced configuration for complex scenarios.\n\n- Create specific rules for different workspaces.\n- Easily define which service/s and environment/s are affected.\n- Add conditions based on span attributes.\n- Control the sampling rate, and priority of rules.\n\n## Install\n\n### npm\n```sh\nnpm install @aspecto/opentelemetry-sampler\n```\n\n### yarn\n```sh\nyarn add @aspecto/opentelemetry-sampler\n```\n\nSupported node version: >= 14\n\n## Usage\n\nCreate an instance of `AspectoSampler` and use it in your `TraceProvider`\n\n```js\nimport { AspectoSampler } from '@aspecto/opentelemetry-sampler';\n\n// create an instance of AspectoSampler\nconst aspectoSampler = new AspectoSampler({\n    // aspectoAuth,\n    // serviceName,\n    // env,\n    // requireConfigForTraces,\n    // samplingRatio,\n});\n\n// Now, you can now use it wherever an OpenTelemetry sampler is acceptable\n\n// NodeTracerProvider\nimport { NodeTracerProvider } from '@opentelemetry/sdk-trace-node';\nconst provider = new NodeTracerProvider({\n    sampler: aspectoSampler,\n});\n\n// NodeSDK\nimport { NodeSDK } from '@opentelemetry/sdk-node';\nconst sdk = new NodeSDK({\n    traceExporter: // add your trace exporter here\n    sampler: aspectoSampler,\n});\n\n```\n\n## Configuration\n\nYou can configure the sampler via one or more of the following:\n- `options` variable. for example: `new AspectoSampler({optionName: optionValue})`.\nThis enables setting config options dynamically.\n- Environment variables\n- Add `aspecto.json` configuration file to the root directory, next to service's `package.json` file\n\nValues are evaluated in the following priority:\n1) `options` object\n2) environment variables\n3) config file\n4) default values\n\nAspecto auth is required, service name and env are recommended.\n\n| Option Name | Environment Variable | Type | Default | Description |\n| --- | --- | --- | --- | --- |\n| `disableAspecto` | `DISABLE_ASPECTO` |  boolean | `false` | Disable the sampler and don't apply any sampling logic (sample nothing) |\n| `env` | `NODE_ENV` | string | - | Set environment for matching sampling rules |\n| `aspectoAuth` | `ASPECTO_AUTH` | UUID | - | [Aspecto token](https://app.aspecto.io/app/integration/api-key) for authentication to read sampling configuration  |\n| `serviceName` | `OTEL_SERVICE_NAME` | string | - | Set service name for matching sampling rules |\n| `samplingRatio` | `ASPECTO_SAMPLING_RATIO` | number | `1.0` | This option is used as a fallback if no specific sampling rule is matched, and before remote sampling rule configuration is fetched. It controls how many of the traces starting in this service should be sampled. Set to number in the range [0.0, 1.0] where `0.0` is no sampling, and `1.0` is sample all. |\n| `requireConfigForTraces` | `ASPECTO_REQUIRE_CONFIG_FOR_TRACES` | boolean | `false` | When `true`, the Sampler will not trace anything until the remote sampling configuration arrives (a few hundred ms). Can be used to enforce sampling configuration is always applied, with the cost of losing traces generated during service startup. |\n\n### Getting Help\n\nFor any assistance or question, feel free to [Contact Us](https://www.aspecto.io/contact-us/).\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/aspecto-io/aspecto-opentelemetry-js/issues"},"_id":"@aspecto/opentelemetry-sampler@0.0.0-2023-02-28--15-21","_nodeVersion":"18.14.2","_npmVersion":"lerna/3.22.1/node@v18.14.2+x64 (linux)","dist":{"integrity":"sha512-sqaXULJ89738FSa4EJPu7uCiHb8X9LEFGbJvJ3F0qtgn3dlRQOeLg3CjhJN4VjES/TGrpURUjSX5z/uPthdIwQ==","shasum":"1ef19b5dc020e6a97ee1f64cf570e152263fd775","tarball":"https://registry.npmjs.org/@aspecto/opentelemetry-sampler/-/opentelemetry-sampler-0.0.0-2023-02-28--15-21.tgz","fileCount":23,"unpackedSize":46872,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDFO3szEsiADFskrPLLaoLzTK1fHGqFe3YTRmgDluFsJgIhAO2RnDsh3Rh7PumGAmm5nd2YrgKnTpVef/+A6ZTwAVEp"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj/hv5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrC7g/8DINcf1JTJ6FIUejQDJWkzhicnjLbG10/R1XgdyBtFDpKTzaB\r\nHQyHCFOxczsEUm59+A3FWuED7aaeRUlsXyLG9RP5hq+xT0gD3btx4UyMJJ3d\r\nojFvJHs23cdBQY8V9meC2oMuodydgHu8oTqadtXTM+cSbUf0AAQcFywVZ29t\r\nnyp2D6+88bWvPT0SQdA4qiqTn72e56zOyf8yuea4LA621hST/AvkgMX0+Ce7\r\nzfz8eGCBjXh4B8cdjFBIS0ucTfOhFh5MHKkDrxIpHdGSz9CUZISKjmjr4Qp3\r\nB/SENKURZUvnLY3+ToGrOzCNygijT53IphWhIGmwVBmmELDqg89ZLvUsl7Ht\r\nqDShR2V/7kYxtaaPsIZmjFNNQa3BHJbJyz1lSOJP2CVbKku2noODRPE5DpoO\r\nJIXxWZcV9Rg/VMsoP6Nlkl5nGNGh4oiTV9nKzRRqkGpIHXSyLfwakjlA2H42\r\n+EFa1Ae1lU8RLDB8Nifb9JrJ8eY3hiNToRH6MPiGMbYL0o/7ojnNoOB4Vmy7\r\nO05cigH0UetEm/+Y5aMx+vSqpvVUytvNuwTak6RQd1yTT5h1DNJvEclx12NE\r\nrKjbbL7pcrF5Utk2s1Ya/a3R3YgAFh4uMjqpekGbyMNk2pcmdkE1SBgLOCX4\r\n9J66XZjE5dxiAhH+7ryRmQQdw7F8fOCOBQ0=\r\n=c2BJ\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"habmic","email":"michael@topsight.io"},{"name":"amir.aspecto","email":"amir@aspecto.io"},{"name":"aspecto-release-bot","email":"dev@aspecto.io"},{"name":"andriy-aspecto","email":"andriy@aspecto.io"},{"name":"yanivd","email":"yaniv.davi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-sampler_0.0.0-2023-02-28--15-21_1677597689213_0.6626775873460764"},"_hasShrinkwrap":false},"0.0.0-2023-03-01--13-22":{"name":"@aspecto/opentelemetry-sampler","version":"0.0.0-2023-03-01--13-22","description":"Opentelemetry sampler by Aspecto","author":{"name":"Aspecto.io"},"license":"Apache-2.0","main":"dist/src/index.js","types":"dist/src/index.d.ts","repository":{"type":"git","url":"git+https://github.com/aspecto-io/aspecto-opentelemetry-js.git"},"homepage":"https://docs.aspecto.io/v1/","publishConfig":{"access":"public"},"scripts":{"test":"echo \"Error: run tests from root\" && exit 1","watch":"tsc -w","build":"tsc","prebuild":"rm -rf ./dist","prepare":"yarn run build"},"engines":{"node":">=14.0.0"},"peerDependencies":{"@opentelemetry/api":"^1.3.0"},"dependencies":{"@aspecto/opentelemetry-base":"^0.0.139","@aspecto/opentelemetry-config":"^0.0.139","@aspecto/sampling-rules":"0.0.7","@opentelemetry/sdk-trace-base":"1.9.1"},"gitHead":"e0803f2e7725c6f434009675924859293e8e2a96","readme":"# Aspecto Sampler\n\nAspecto is an observability platform, powered by OpenTelemetry, that brings R&D teams complete visibility into every interaction, performance issue, and error happening within their distributed services.\n\n**If you are looking for a full OpenTelemetry distro, including all instrumentations and features, see [@aspecto/opentelemetry](https://www.npmjs.com/package/@aspecto/opentelemetry)**\n\nThis package exposes an [OpenTelemetry Sampler](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/sdk.md#sampling) which you can integrate into your own OpenTelemetry installation to apply advance sampling capabilities using Aspecto platform.\n\n## Aspecto Sampling\n\nTo configure sampling in Aspecto, [click here](https://app.aspecto.io/settings/sampling-rules).\n\nAspecto sampler fetches remote sampling rules that you configure in Aspecto platform and applies them on traces that start in a given service.\n\nIt includes the following features:\n\n### Remote Configuration\n\nSampling configuration is fetched from Aspecto platform. \n\n- Configuration is always up-to-date and consistent between all your instances.\n- Updates are automatically and immediately pushed to all samplers whenever you make a change.\n- Changing configuration does not require writing code, updating dependencies, or deploying artifacts. \n\n### Configure in UI\n\nConfigure your sampling rules in an easy-to-use UI.\n\n- No need to write code.\n- Search capabilities.\n- Turn rules on and off in a click.\n- Set up temporary rules with timeouts.\n- Same UI for multiple languages - configure your rules once and apply them for both NodeJS and Ruby (support for more languages is coming soon)\n\n### Rich Sampling Language\n\nAspecto sampling abstract away the hard parts of the sampling implementation and focus on common use cases, while still allowing advanced configuration for complex scenarios.\n\n- Create specific rules for different workspaces.\n- Easily define which service/s and environment/s are affected.\n- Add conditions based on span attributes.\n- Control the sampling rate, and priority of rules.\n\n## Install\n\n### npm\n```sh\nnpm install @aspecto/opentelemetry-sampler\n```\n\n### yarn\n```sh\nyarn add @aspecto/opentelemetry-sampler\n```\n\nSupported node version: >= 14\n\n## Usage\n\nCreate an instance of `AspectoSampler` and use it in your `TraceProvider`\n\n```js\nimport { AspectoSampler } from '@aspecto/opentelemetry-sampler';\n\n// create an instance of AspectoSampler\nconst aspectoSampler = new AspectoSampler({\n    // aspectoAuth,\n    // serviceName,\n    // env,\n    // requireConfigForTraces,\n    // samplingRatio,\n});\n\n// Now, you can now use it wherever an OpenTelemetry sampler is acceptable\n\n// NodeTracerProvider\nimport { NodeTracerProvider } from '@opentelemetry/sdk-trace-node';\nconst provider = new NodeTracerProvider({\n    sampler: aspectoSampler,\n});\n\n// NodeSDK\nimport { NodeSDK } from '@opentelemetry/sdk-node';\nconst sdk = new NodeSDK({\n    traceExporter: // add your trace exporter here\n    sampler: aspectoSampler,\n});\n\n```\n\n## Configuration\n\nYou can configure the sampler via one or more of the following:\n- `options` variable. for example: `new AspectoSampler({optionName: optionValue})`.\nThis enables setting config options dynamically.\n- Environment variables\n- Add `aspecto.json` configuration file to the root directory, next to service's `package.json` file\n\nValues are evaluated in the following priority:\n1) `options` object\n2) environment variables\n3) config file\n4) default values\n\nAspecto auth is required, service name and env are recommended.\n\n| Option Name | Environment Variable | Type | Default | Description |\n| --- | --- | --- | --- | --- |\n| `disableAspecto` | `DISABLE_ASPECTO` |  boolean | `false` | Disable the sampler and don't apply any sampling logic (sample nothing) |\n| `env` | `NODE_ENV` | string | - | Set environment for matching sampling rules |\n| `aspectoAuth` | `ASPECTO_AUTH` | UUID | - | [Aspecto token](https://app.aspecto.io/app/integration/api-key) for authentication to read sampling configuration  |\n| `serviceName` | `OTEL_SERVICE_NAME` | string | - | Set service name for matching sampling rules |\n| `samplingRatio` | `ASPECTO_SAMPLING_RATIO` | number | `1.0` | This option is used as a fallback if no specific sampling rule is matched, and before remote sampling rule configuration is fetched. It controls how many of the traces starting in this service should be sampled. Set to number in the range [0.0, 1.0] where `0.0` is no sampling, and `1.0` is sample all. |\n| `requireConfigForTraces` | `ASPECTO_REQUIRE_CONFIG_FOR_TRACES` | boolean | `false` | When `true`, the Sampler will not trace anything until the remote sampling configuration arrives (a few hundred ms). Can be used to enforce sampling configuration is always applied, with the cost of losing traces generated during service startup. |\n\n### Getting Help\n\nFor any assistance or question, feel free to [Contact Us](https://www.aspecto.io/contact-us/).\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/aspecto-io/aspecto-opentelemetry-js/issues"},"_id":"@aspecto/opentelemetry-sampler@0.0.0-2023-03-01--13-22","_nodeVersion":"18.14.1","_npmVersion":"lerna/3.22.1/node@v18.14.1+x64 (linux)","dist":{"integrity":"sha512-KWOmWXAB+3zgURGs36Q56ml0xJPGBF5zX4R5MCFp+PKTb44ZG+36Mz7vJi8S/8PEWEumqismojDcblwB3xuSNw==","shasum":"edcefce4a6a18d7736e45b6194d1949f14ff913b","tarball":"https://registry.npmjs.org/@aspecto/opentelemetry-sampler/-/opentelemetry-sampler-0.0.0-2023-03-01--13-22.tgz","fileCount":23,"unpackedSize":46834,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCEikdawijG3i5ERF6DeL7e1lDc9i2IYGR7o5umDK7oagIgRgbcWz2s0Acgz1gyvFwFcmqEATkBdjwb0qeQD1rgVSs="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj/1G3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrBbw//TtnTQn9XbQHbCE46M9rN6x9E1zAkQoCnjRZQEjmA8+4Rq6iJ\r\n/ZC7APc2Ku4KXJhMcAW5rtdeZMnG6lCBaE01btO3ZpIApCQDjyo8CotAghri\r\nJ8RH8k5YT1LRMf9SBkdY/jH4elWO4iNd1ENnS07Rlu5dUQekH+5MOt7zs/kR\r\nOOWksP/Yv7GeCSQRDR3UFILfi9rO48Ob+dDWFruq76DK1VTBDpnFpAwgSiF6\r\nth7VUzLyxauLGhY7X6BcTxv9Vx4DyM9K708AHyBDTwS3C9eX3T/4t8X4NrjX\r\nqhGtOLsUIqIAUiomcSmxUIsEQJaQZ4ef0Z7zvNOB7C/CzHD4EtuK5JNi3eaD\r\n+cTIOJc423WTnIk0rt6RvnZqH1Hcvc06fwmJniuNAthQRW9PDVF+MfZTcZ/T\r\nw5AeE6TBQbb1s8+QYYDyA29CxpKVosyfM73S0DTZQx4Iz9gXiRCymLtQSkI7\r\nZx4pOP1YUlhmWp9XloR8hrlwGHiAg5rjqMk2bH2cJ/C6cYLG7dNR4Sv0S7uS\r\nV5zqrZ64Afcfd46mSEJL/spTrk+CFB/Y3e+S+PlvWhmA5SvUFzkJBznOs/Ln\r\nMij+3KMjH4yGjf63iWg5Eg4wqWOj1CJYCRYZX50R9YJtbEWtMtGBlslcgwEY\r\nq34Z+2n9me9NGPXCNJ1sYvyru9KfkDayLZE=\r\n=XgB/\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"habmic","email":"michael@topsight.io"},{"name":"amir.aspecto","email":"amir@aspecto.io"},{"name":"aspecto-release-bot","email":"dev@aspecto.io"},{"name":"andriy-aspecto","email":"andriy@aspecto.io"},{"name":"yanivd","email":"yaniv.davi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-sampler_0.0.0-2023-03-01--13-22_1677676983138_0.45652996870600604"},"_hasShrinkwrap":false},"0.0.140":{"name":"@aspecto/opentelemetry-sampler","version":"0.0.140","description":"Opentelemetry sampler by Aspecto","author":{"name":"Aspecto.io"},"license":"Apache-2.0","main":"dist/src/index.js","types":"dist/src/index.d.ts","repository":{"type":"git","url":"git+https://github.com/aspecto-io/aspecto-opentelemetry-js.git"},"homepage":"https://docs.aspecto.io/v1/","publishConfig":{"access":"public"},"scripts":{"test":"echo \"Error: run tests from root\" && exit 1","watch":"tsc -w","build":"tsc","prebuild":"rm -rf ./dist","prepare":"yarn run build"},"engines":{"node":">=14.0.0"},"peerDependencies":{"@opentelemetry/api":"^1.3.0"},"dependencies":{"@aspecto/opentelemetry-base":"^0.0.140","@aspecto/opentelemetry-config":"^0.0.140","@aspecto/sampling-rules":"0.0.7","@opentelemetry/sdk-trace-base":"1.9.1"},"gitHead":"c9b383a63b72bd8ba8f707c71f1de474c01500a6","bugs":{"url":"https://github.com/aspecto-io/aspecto-opentelemetry-js/issues"},"_id":"@aspecto/opentelemetry-sampler@0.0.140","_nodeVersion":"18.14.2","_npmVersion":"lerna/3.22.1/node@v18.14.2+x64 (linux)","dist":{"integrity":"sha512-kUGvHp1FQ2LfhSElI/yHULJBXnnO45Ntje4MM7R/rLrfM2YZdZCmK1bfi1TiKX/GEv5rQ5L3hgD1mLDy56AhAA==","shasum":"eec2e5c5e6a51e04ee12be1387a5e4c92ec507da","tarball":"https://registry.npmjs.org/@aspecto/opentelemetry-sampler/-/opentelemetry-sampler-0.0.140.tgz","fileCount":23,"unpackedSize":47180,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDd23REF0NfNk1o1gVxyanDe2Z5xLEiNC8qOnzY9hZfTgIhANsJelUIGIrSAWgDD0KFFxjftGDroK0LGCR3WMafa1CA"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj/2goACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoMYw/7ByMGt3WxAMal0gSVUXgJefvhp2xtXiZvzR4CzAopBVQzW7Jh\r\nJLID5pRpKkllBGOsP2af6OZ56vUNwKbmJ8LhWi+WuItfFQSqYjw9gFD7rLxF\r\nIRh2xYXAti+AJtTWAjk6b6fy8QBW1f2QzOYT2afxtRtYxdPU7DJYsDH5nfQV\r\nlTDV/kJOvgJLsca8e7ugMvw6w/BoaUfbn+xFR4L3Ait+U7cTvjsaqTGBEw3m\r\ngWgF99Zp8RHwoDRMMjIB/SaYdoXLLDgDrxqdjtl3ZQsl5Aof9/8VjzAArAzm\r\niZYbMu4iorLHXgywd04O6uiYkCzQAfqfbCn3SJD1nOoOafuEKr2mG0HtwmjJ\r\n7Jc4s4oOV3UJ7Orhj4aP3fzC61pwhGS0J9Zit+x9zbRaesuies+A5ujjOydq\r\nGpKWkXwjTk69NDw3BbmJg2TO6bvCVXyJ+00SsYwH5PzBRQ4yQzRoO+dL10pW\r\nftTtVBwLunV358YwmMVzb8fPHV5Rae7LLTQj6HeJLKHHfggRrN8A7My3Bk9Z\r\n7v4RG/eqsK69d1/lG8HOENzfQO2dixM3+ABeWyRlx6qvjrBFEOsV2hKR9Vzb\r\nKlXjFLLAFcM1y6gq8VcvaO3Z61wJb3z1t/0RuOU3DK7B0GuqnQ5axhAmc2Zp\r\nzbh4dVzX7MhHVFKpVPy33EmsBlC5AF9fkzA=\r\n=bIiO\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"habmic","email":"michael@topsight.io"},{"name":"amir.aspecto","email":"amir@aspecto.io"},{"name":"aspecto-release-bot","email":"dev@aspecto.io"},{"name":"andriy-aspecto","email":"andriy@aspecto.io"},{"name":"yanivd","email":"yaniv.davi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-sampler_0.0.140_1677682728456_0.6563211441981269"},"_hasShrinkwrap":false},"0.0.0-2023-07-27--11-15":{"name":"@aspecto/opentelemetry-sampler","version":"0.0.0-2023-07-27--11-15","description":"Opentelemetry sampler by Aspecto","author":{"name":"Aspecto.io"},"license":"Apache-2.0","main":"dist/src/index.js","types":"dist/src/index.d.ts","repository":{"type":"git","url":"git+https://github.com/aspecto-io/aspecto-opentelemetry-js.git"},"homepage":"https://docs.aspecto.io/v1/","publishConfig":{"access":"public"},"scripts":{"test":"echo \"Error: run tests from root\" && exit 1","watch":"tsc -w","build":"tsc","prebuild":"rm -rf ./dist","prepare":"yarn run build"},"engines":{"node":">=14.0.0"},"peerDependencies":{"@opentelemetry/api":"^1.3.0"},"dependencies":{"@aspecto/opentelemetry-base":"^0.0.140","@aspecto/opentelemetry-config":"^0.0.140","@aspecto/sampling-rules":"0.0.7","@opentelemetry/sdk-trace-base":"1.13.0"},"gitHead":"d4f271bc1921afafab0a04b30a9e2d76d3fe5d5c","readme":"# Aspecto Sampler\n\nAspecto is an observability platform, powered by OpenTelemetry, that brings R&D teams complete visibility into every interaction, performance issue, and error happening within their distributed services.\n\n**If you are looking for a full OpenTelemetry distro, including all instrumentations and features, see [@aspecto/opentelemetry](https://www.npmjs.com/package/@aspecto/opentelemetry)**\n\nThis package exposes an [OpenTelemetry Sampler](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/sdk.md#sampling) which you can integrate into your own OpenTelemetry installation to apply advance sampling capabilities using Aspecto platform.\n\n## Aspecto Sampling\n\nTo configure sampling in Aspecto, [click here](https://app.aspecto.io/settings/sampling-rules).\n\nAspecto sampler fetches remote sampling rules that you configure in Aspecto platform and applies them on traces that start in a given service.\n\nIt includes the following features:\n\n### Remote Configuration\n\nSampling configuration is fetched from Aspecto platform. \n\n- Configuration is always up-to-date and consistent between all your instances.\n- Updates are automatically and immediately pushed to all samplers whenever you make a change.\n- Changing configuration does not require writing code, updating dependencies, or deploying artifacts. \n\n### Configure in UI\n\nConfigure your sampling rules in an easy-to-use UI.\n\n- No need to write code.\n- Search capabilities.\n- Turn rules on and off in a click.\n- Set up temporary rules with timeouts.\n- Same UI for multiple languages - configure your rules once and apply them for both NodeJS and Ruby (support for more languages is coming soon)\n\n### Rich Sampling Language\n\nAspecto sampling abstract away the hard parts of the sampling implementation and focus on common use cases, while still allowing advanced configuration for complex scenarios.\n\n- Create specific rules for different workspaces.\n- Easily define which service/s and environment/s are affected.\n- Add conditions based on span attributes.\n- Control the sampling rate, and priority of rules.\n\n## Install\n\n### npm\n```sh\nnpm install @aspecto/opentelemetry-sampler\n```\n\n### yarn\n```sh\nyarn add @aspecto/opentelemetry-sampler\n```\n\nSupported node version: >= 14\n\n## Usage\n\nCreate an instance of `AspectoSampler` and use it in your `TraceProvider`\n\n```js\nimport { AspectoSampler } from '@aspecto/opentelemetry-sampler';\n\n// create an instance of AspectoSampler\nconst aspectoSampler = new AspectoSampler({\n    // aspectoAuth,\n    // serviceName,\n    // env,\n    // requireConfigForTraces,\n    // samplingRatio,\n});\n\n// Now, you can now use it wherever an OpenTelemetry sampler is acceptable\n\n// NodeTracerProvider\nimport { NodeTracerProvider } from '@opentelemetry/sdk-trace-node';\nconst provider = new NodeTracerProvider({\n    sampler: aspectoSampler,\n});\n\n// NodeSDK\nimport { NodeSDK } from '@opentelemetry/sdk-node';\nconst sdk = new NodeSDK({\n    traceExporter: // add your trace exporter here\n    sampler: aspectoSampler,\n});\n\n```\n\n## Configuration\n\nYou can configure the sampler via one or more of the following:\n- `options` variable. for example: `new AspectoSampler({optionName: optionValue})`.\nThis enables setting config options dynamically.\n- Environment variables\n- Add `aspecto.json` configuration file to the root directory, next to service's `package.json` file\n\nValues are evaluated in the following priority:\n1) `options` object\n2) environment variables\n3) config file\n4) default values\n\nAspecto auth is required, service name and env are recommended.\n\n| Option Name | Environment Variable | Type | Default | Description |\n| --- | --- | --- | --- | --- |\n| `disableAspecto` | `DISABLE_ASPECTO` |  boolean | `false` | Disable the sampler and don't apply any sampling logic (sample nothing) |\n| `env` | `NODE_ENV` | string | - | Set environment for matching sampling rules |\n| `aspectoAuth` | `ASPECTO_AUTH` | UUID | - | [Aspecto token](https://app.aspecto.io/app/integration/api-key) for authentication to read sampling configuration  |\n| `serviceName` | `OTEL_SERVICE_NAME` | string | - | Set service name for matching sampling rules |\n| `samplingRatio` | `ASPECTO_SAMPLING_RATIO` | number | `1.0` | This option is used as a fallback if no specific sampling rule is matched, and before remote sampling rule configuration is fetched. It controls how many of the traces starting in this service should be sampled. Set to number in the range [0.0, 1.0] where `0.0` is no sampling, and `1.0` is sample all. |\n| `requireConfigForTraces` | `ASPECTO_REQUIRE_CONFIG_FOR_TRACES` | boolean | `false` | When `true`, the Sampler will not trace anything until the remote sampling configuration arrives (a few hundred ms). Can be used to enforce sampling configuration is always applied, with the cost of losing traces generated during service startup. |\n\n### Getting Help\n\nFor any assistance or question, feel free to [Contact Us](https://www.aspecto.io/contact-us/).\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/aspecto-io/aspecto-opentelemetry-js/issues"},"_id":"@aspecto/opentelemetry-sampler@0.0.0-2023-07-27--11-15","_nodeVersion":"18.17.0","_npmVersion":"lerna/3.22.1/node@v18.17.0+x64 (linux)","dist":{"integrity":"sha512-vksTECxYavId9JCZ8MGsl6TYz/VzP/tPSs1bHBEy47ztUAiRPr5Tvdgv1p4WjXjq3p2l47ZSCVcwV+OzkbSxzQ==","shasum":"51fc8e6a68db45d91dad7772436ca5d8cc0ee306","tarball":"https://registry.npmjs.org/@aspecto/opentelemetry-sampler/-/opentelemetry-sampler-0.0.0-2023-07-27--11-15.tgz","fileCount":23,"unpackedSize":47197,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDDVTIpjge8Ee9YvVuQ47UkVCRc4uTeXkgUDu4b2++kAwIhAKBHUnCsjoTz4kbqZ1gPeS1mUSeuR/ZRhoXfOY04yAb4"}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"habmic","email":"michael@topsight.io"},{"name":"amir.aspecto","email":"amir@aspecto.io"},{"name":"aspecto-release-bot","email":"dev@aspecto.io"},{"name":"andriy-aspecto","email":"andriy@aspecto.io"},{"name":"yanivd","email":"yaniv.davi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-sampler_0.0.0-2023-07-27--11-15_1690456532247_0.45766746231920763"},"_hasShrinkwrap":false},"0.0.0-2023-07-30--08-42":{"name":"@aspecto/opentelemetry-sampler","version":"0.0.0-2023-07-30--08-42","description":"Opentelemetry sampler by Aspecto","author":{"name":"Aspecto.io"},"license":"Apache-2.0","main":"dist/src/index.js","types":"dist/src/index.d.ts","repository":{"type":"git","url":"git+https://github.com/aspecto-io/aspecto-opentelemetry-js.git"},"homepage":"https://docs.aspecto.io/v1/","publishConfig":{"access":"public"},"scripts":{"test":"echo \"Error: run tests from root\" && exit 1","watch":"tsc -w","build":"tsc","prebuild":"rm -rf ./dist","prepare":"yarn run build"},"engines":{"node":">=14.0.0"},"peerDependencies":{"@opentelemetry/api":"^1.3.0"},"dependencies":{"@aspecto/opentelemetry-base":"^0.0.140","@aspecto/opentelemetry-config":"^0.0.140","@aspecto/sampling-rules":"0.0.7","@opentelemetry/sdk-trace-base":"1.13.0"},"gitHead":"5a4e49cd236790428c9bad614a3cfe601de78c9c","readme":"# Aspecto Sampler\n\nAspecto is an observability platform, powered by OpenTelemetry, that brings R&D teams complete visibility into every interaction, performance issue, and error happening within their distributed services.\n\n**If you are looking for a full OpenTelemetry distro, including all instrumentations and features, see [@aspecto/opentelemetry](https://www.npmjs.com/package/@aspecto/opentelemetry)**\n\nThis package exposes an [OpenTelemetry Sampler](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/sdk.md#sampling) which you can integrate into your own OpenTelemetry installation to apply advance sampling capabilities using Aspecto platform.\n\n## Aspecto Sampling\n\nTo configure sampling in Aspecto, [click here](https://app.aspecto.io/settings/sampling-rules).\n\nAspecto sampler fetches remote sampling rules that you configure in Aspecto platform and applies them on traces that start in a given service.\n\nIt includes the following features:\n\n### Remote Configuration\n\nSampling configuration is fetched from Aspecto platform. \n\n- Configuration is always up-to-date and consistent between all your instances.\n- Updates are automatically and immediately pushed to all samplers whenever you make a change.\n- Changing configuration does not require writing code, updating dependencies, or deploying artifacts. \n\n### Configure in UI\n\nConfigure your sampling rules in an easy-to-use UI.\n\n- No need to write code.\n- Search capabilities.\n- Turn rules on and off in a click.\n- Set up temporary rules with timeouts.\n- Same UI for multiple languages - configure your rules once and apply them for both NodeJS and Ruby (support for more languages is coming soon)\n\n### Rich Sampling Language\n\nAspecto sampling abstract away the hard parts of the sampling implementation and focus on common use cases, while still allowing advanced configuration for complex scenarios.\n\n- Create specific rules for different workspaces.\n- Easily define which service/s and environment/s are affected.\n- Add conditions based on span attributes.\n- Control the sampling rate, and priority of rules.\n\n## Install\n\n### npm\n```sh\nnpm install @aspecto/opentelemetry-sampler\n```\n\n### yarn\n```sh\nyarn add @aspecto/opentelemetry-sampler\n```\n\nSupported node version: >= 14\n\n## Usage\n\nCreate an instance of `AspectoSampler` and use it in your `TraceProvider`\n\n```js\nimport { AspectoSampler } from '@aspecto/opentelemetry-sampler';\n\n// create an instance of AspectoSampler\nconst aspectoSampler = new AspectoSampler({\n    // aspectoAuth,\n    // serviceName,\n    // env,\n    // requireConfigForTraces,\n    // samplingRatio,\n});\n\n// Now, you can now use it wherever an OpenTelemetry sampler is acceptable\n\n// NodeTracerProvider\nimport { NodeTracerProvider } from '@opentelemetry/sdk-trace-node';\nconst provider = new NodeTracerProvider({\n    sampler: aspectoSampler,\n});\n\n// NodeSDK\nimport { NodeSDK } from '@opentelemetry/sdk-node';\nconst sdk = new NodeSDK({\n    traceExporter: // add your trace exporter here\n    sampler: aspectoSampler,\n});\n\n```\n\n## Configuration\n\nYou can configure the sampler via one or more of the following:\n- `options` variable. for example: `new AspectoSampler({optionName: optionValue})`.\nThis enables setting config options dynamically.\n- Environment variables\n- Add `aspecto.json` configuration file to the root directory, next to service's `package.json` file\n\nValues are evaluated in the following priority:\n1) `options` object\n2) environment variables\n3) config file\n4) default values\n\nAspecto auth is required, service name and env are recommended.\n\n| Option Name | Environment Variable | Type | Default | Description |\n| --- | --- | --- | --- | --- |\n| `disableAspecto` | `DISABLE_ASPECTO` |  boolean | `false` | Disable the sampler and don't apply any sampling logic (sample nothing) |\n| `env` | `NODE_ENV` | string | - | Set environment for matching sampling rules |\n| `aspectoAuth` | `ASPECTO_AUTH` | UUID | - | [Aspecto token](https://app.aspecto.io/app/integration/api-key) for authentication to read sampling configuration  |\n| `serviceName` | `OTEL_SERVICE_NAME` | string | - | Set service name for matching sampling rules |\n| `samplingRatio` | `ASPECTO_SAMPLING_RATIO` | number | `1.0` | This option is used as a fallback if no specific sampling rule is matched, and before remote sampling rule configuration is fetched. It controls how many of the traces starting in this service should be sampled. Set to number in the range [0.0, 1.0] where `0.0` is no sampling, and `1.0` is sample all. |\n| `requireConfigForTraces` | `ASPECTO_REQUIRE_CONFIG_FOR_TRACES` | boolean | `false` | When `true`, the Sampler will not trace anything until the remote sampling configuration arrives (a few hundred ms). Can be used to enforce sampling configuration is always applied, with the cost of losing traces generated during service startup. |\n\n### Getting Help\n\nFor any assistance or question, feel free to [Contact Us](https://www.aspecto.io/contact-us/).\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/aspecto-io/aspecto-opentelemetry-js/issues"},"_id":"@aspecto/opentelemetry-sampler@0.0.0-2023-07-30--08-42","_nodeVersion":"18.17.0","_npmVersion":"lerna/3.22.1/node@v18.17.0+x64 (linux)","dist":{"integrity":"sha512-tpX2lNMVCg0X+IIfF9t3A847v5aTTKtGIyG07FogxNi9UsyaBrEE6+wDVAFbU97YyjXRwTU7PdXxoXQxEsmrvQ==","shasum":"3a3c299adc46e1a10ee591688baba44ca687987f","tarball":"https://registry.npmjs.org/@aspecto/opentelemetry-sampler/-/opentelemetry-sampler-0.0.0-2023-07-30--08-42.tgz","fileCount":23,"unpackedSize":47197,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBkslQMlE2FDsMQ9AY2g9yzqUcOZMq0v/TkFk2cPcJ5PAiBaDlbt3QFvhOFZ4+4sz5cL/0y2X5C2j3WxoHQ04zTE4A=="}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"habmic","email":"michael@topsight.io"},{"name":"amir.aspecto","email":"amir@aspecto.io"},{"name":"aspecto-release-bot","email":"dev@aspecto.io"},{"name":"andriy-aspecto","email":"andriy@aspecto.io"},{"name":"yanivd","email":"yaniv.davi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-sampler_0.0.0-2023-07-30--08-42_1690706576663_0.45926823255953075"},"_hasShrinkwrap":false},"0.0.142":{"name":"@aspecto/opentelemetry-sampler","version":"0.0.142","description":"Opentelemetry sampler by Aspecto","author":{"name":"Aspecto.io"},"license":"Apache-2.0","main":"dist/src/index.js","types":"dist/src/index.d.ts","repository":{"type":"git","url":"git+https://github.com/aspecto-io/aspecto-opentelemetry-js.git"},"homepage":"https://docs.aspecto.io/v1/","publishConfig":{"access":"public"},"scripts":{"test":"echo \"Error: run tests from root\" && exit 1","watch":"tsc -w","build":"tsc","prebuild":"rm -rf ./dist","prepare":"yarn run build"},"engines":{"node":">=14.0.0"},"peerDependencies":{"@opentelemetry/api":"^1.3.0"},"dependencies":{"@aspecto/opentelemetry-base":"^0.0.142","@aspecto/opentelemetry-config":"^0.0.142","@aspecto/sampling-rules":"0.0.7","@opentelemetry/sdk-trace-base":"1.13.0"},"gitHead":"e23d58a708539804a19909e5106929bd723b5496","bugs":{"url":"https://github.com/aspecto-io/aspecto-opentelemetry-js/issues"},"_id":"@aspecto/opentelemetry-sampler@0.0.142","_nodeVersion":"18.17.1","_npmVersion":"lerna/3.22.1/node@v18.17.1+x64 (linux)","dist":{"integrity":"sha512-aNLB0M7Bn03vY/I4rd4ezm7o440RGssNG9klvznOe+nWZz8LueWnfnR1p9TbbvqSW3IHDBB2EnK//gNqb9EE2A==","shasum":"ad0f50385e0f9ce2628497f7b4c45413209f1e78","tarball":"https://registry.npmjs.org/@aspecto/opentelemetry-sampler/-/opentelemetry-sampler-0.0.142.tgz","fileCount":23,"unpackedSize":47555,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBC7EGKWv2AwDDpuZyAIHCL4jM+SOfFb6rrazU/rhwcBAiEApfQslcGGAyNKxdRG4eq0p5c7oglVqEcZusc4CWY7Ii8="}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"habmic","email":"michael@topsight.io"},{"name":"amir.aspecto","email":"amir@aspecto.io"},{"name":"aspecto-release-bot","email":"dev@aspecto.io"},{"name":"andriy-aspecto","email":"andriy@aspecto.io"},{"name":"yanivd","email":"yaniv.davi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-sampler_0.0.142_1695290309536_0.9812495494179174"},"_hasShrinkwrap":false},"0.0.0-2023-10-17--11-48":{"name":"@aspecto/opentelemetry-sampler","version":"0.0.0-2023-10-17--11-48","description":"Opentelemetry sampler by Aspecto","author":{"name":"Aspecto.io"},"license":"Apache-2.0","main":"dist/src/index.js","types":"dist/src/index.d.ts","repository":{"type":"git","url":"git+https://github.com/aspecto-io/aspecto-opentelemetry-js.git"},"homepage":"https://docs.aspecto.io/v1/","publishConfig":{"access":"public"},"scripts":{"test":"echo \"Error: run tests from root\" && exit 1","watch":"tsc -w","build":"tsc","prebuild":"rm -rf ./dist","prepare":"yarn run build"},"engines":{"node":">=14.0.0"},"peerDependencies":{"@opentelemetry/api":"^1.6.0"},"dependencies":{"@aspecto/opentelemetry-base":"^0.0.142","@aspecto/opentelemetry-config":"^0.0.0-2023-10-17--11-48","@aspecto/sampling-rules":"0.0.7","@opentelemetry/sdk-trace-base":"1.17.1"},"gitHead":"5940e89221faf5791190e8bb55902b31dac3ac6a","readme":"# Aspecto Sampler\n\nAspecto is an observability platform, powered by OpenTelemetry, that brings R&D teams complete visibility into every interaction, performance issue, and error happening within their distributed services.\n\n**If you are looking for a full OpenTelemetry distro, including all instrumentations and features, see [@aspecto/opentelemetry](https://www.npmjs.com/package/@aspecto/opentelemetry)**\n\nThis package exposes an [OpenTelemetry Sampler](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/sdk.md#sampling) which you can integrate into your own OpenTelemetry installation to apply advance sampling capabilities using Aspecto platform.\n\n## Aspecto Sampling\n\nTo configure sampling in Aspecto, [click here](https://app.aspecto.io/settings/sampling-rules).\n\nAspecto sampler fetches remote sampling rules that you configure in Aspecto platform and applies them on traces that start in a given service.\n\nIt includes the following features:\n\n### Remote Configuration\n\nSampling configuration is fetched from Aspecto platform. \n\n- Configuration is always up-to-date and consistent between all your instances.\n- Updates are automatically and immediately pushed to all samplers whenever you make a change.\n- Changing configuration does not require writing code, updating dependencies, or deploying artifacts. \n\n### Configure in UI\n\nConfigure your sampling rules in an easy-to-use UI.\n\n- No need to write code.\n- Search capabilities.\n- Turn rules on and off in a click.\n- Set up temporary rules with timeouts.\n- Same UI for multiple languages - configure your rules once and apply them for both NodeJS and Ruby (support for more languages is coming soon)\n\n### Rich Sampling Language\n\nAspecto sampling abstract away the hard parts of the sampling implementation and focus on common use cases, while still allowing advanced configuration for complex scenarios.\n\n- Create specific rules for different workspaces.\n- Easily define which service/s and environment/s are affected.\n- Add conditions based on span attributes.\n- Control the sampling rate, and priority of rules.\n\n## Install\n\n### npm\n```sh\nnpm install @aspecto/opentelemetry-sampler\n```\n\n### yarn\n```sh\nyarn add @aspecto/opentelemetry-sampler\n```\n\nSupported node version: >= 14\n\n## Usage\n\nCreate an instance of `AspectoSampler` and use it in your `TraceProvider`\n\n```js\nimport { AspectoSampler } from '@aspecto/opentelemetry-sampler';\n\n// create an instance of AspectoSampler\nconst aspectoSampler = new AspectoSampler({\n    // aspectoAuth,\n    // serviceName,\n    // env,\n    // requireConfigForTraces,\n    // samplingRatio,\n});\n\n// Now, you can now use it wherever an OpenTelemetry sampler is acceptable\n\n// NodeTracerProvider\nimport { NodeTracerProvider } from '@opentelemetry/sdk-trace-node';\nconst provider = new NodeTracerProvider({\n    sampler: aspectoSampler,\n});\n\n// NodeSDK\nimport { NodeSDK } from '@opentelemetry/sdk-node';\nconst sdk = new NodeSDK({\n    traceExporter: // add your trace exporter here\n    sampler: aspectoSampler,\n});\n\n```\n\n## Configuration\n\nYou can configure the sampler via one or more of the following:\n- `options` variable. for example: `new AspectoSampler({optionName: optionValue})`.\nThis enables setting config options dynamically.\n- Environment variables\n- Add `aspecto.json` configuration file to the root directory, next to service's `package.json` file\n\nValues are evaluated in the following priority:\n1) `options` object\n2) environment variables\n3) config file\n4) default values\n\nAspecto auth is required, service name and env are recommended.\n\n| Option Name | Environment Variable | Type | Default | Description |\n| --- | --- | --- | --- | --- |\n| `disableAspecto` | `DISABLE_ASPECTO` |  boolean | `false` | Disable the sampler and don't apply any sampling logic (sample nothing) |\n| `env` | `NODE_ENV` | string | - | Set environment for matching sampling rules |\n| `aspectoAuth` | `ASPECTO_AUTH` | UUID | - | [Aspecto token](https://app.aspecto.io/app/integration/api-key) for authentication to read sampling configuration  |\n| `serviceName` | `OTEL_SERVICE_NAME` | string | - | Set service name for matching sampling rules |\n| `samplingRatio` | `ASPECTO_SAMPLING_RATIO` | number | `1.0` | This option is used as a fallback if no specific sampling rule is matched, and before remote sampling rule configuration is fetched. It controls how many of the traces starting in this service should be sampled. Set to number in the range [0.0, 1.0] where `0.0` is no sampling, and `1.0` is sample all. |\n| `requireConfigForTraces` | `ASPECTO_REQUIRE_CONFIG_FOR_TRACES` | boolean | `false` | When `true`, the Sampler will not trace anything until the remote sampling configuration arrives (a few hundred ms). Can be used to enforce sampling configuration is always applied, with the cost of losing traces generated during service startup. |\n\n### Getting Help\n\nFor any assistance or question, feel free to [Contact Us](https://www.aspecto.io/contact-us/).\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/aspecto-io/aspecto-opentelemetry-js/issues"},"_id":"@aspecto/opentelemetry-sampler@0.0.0-2023-10-17--11-48","_nodeVersion":"18.18.0","_npmVersion":"lerna/3.22.1/node@v18.18.0+x64 (linux)","dist":{"integrity":"sha512-g3heaT4bKJwYpOvyzv+B7hnr52xlXJT2uKuuPNKOUqa+5klpOxMwEeT+sb32X4Cl8WLcF1cdmBhiCYnACXGqUg==","shasum":"66ba1883af9ff141236ef57a310f4ddb3e74a3b1","tarball":"https://registry.npmjs.org/@aspecto/opentelemetry-sampler/-/opentelemetry-sampler-0.0.0-2023-10-17--11-48.tgz","fileCount":23,"unpackedSize":47587,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDlGwqsk5Uvte720soQ15yFYc0Z1qNXS7pyGK0CAozvmgIhAKaG4zDduxaZ4zgRIaDeZAK6Cron2xOuOh6M9PoYUNlF"}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"habmic","email":"michael@topsight.io"},{"name":"amir.aspecto","email":"amir@aspecto.io"},{"name":"aspecto-release-bot","email":"dev@aspecto.io"},{"name":"andriy-aspecto","email":"andriy@aspecto.io"},{"name":"yanivd","email":"yaniv.davi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-sampler_0.0.0-2023-10-17--11-48_1697543361742_0.8399948687228225"},"_hasShrinkwrap":false},"0.1.0":{"name":"@aspecto/opentelemetry-sampler","version":"0.1.0","description":"Opentelemetry sampler by Aspecto","author":{"name":"Aspecto.io"},"license":"Apache-2.0","main":"dist/src/index.js","types":"dist/src/index.d.ts","repository":{"type":"git","url":"git+https://github.com/aspecto-io/aspecto-opentelemetry-js.git"},"homepage":"https://docs.aspecto.io/v1/","publishConfig":{"access":"public"},"scripts":{"test":"echo \"Error: run tests from root\" && exit 1","watch":"tsc -w","build":"tsc","prebuild":"rm -rf ./dist","prepare":"yarn run build"},"engines":{"node":">=14.0.0"},"peerDependencies":{"@opentelemetry/api":"^1.6.0"},"dependencies":{"@aspecto/opentelemetry-base":"^0.1.0","@aspecto/opentelemetry-config":"^0.1.0","@aspecto/sampling-rules":"0.0.7","@opentelemetry/sdk-trace-base":"1.17.1"},"gitHead":"5bdbf82ff4ce1fb617273491c50bb50349aef22c","bugs":{"url":"https://github.com/aspecto-io/aspecto-opentelemetry-js/issues"},"_id":"@aspecto/opentelemetry-sampler@0.1.0","_nodeVersion":"18.18.0","_npmVersion":"lerna/3.22.1/node@v18.18.0+x64 (linux)","dist":{"integrity":"sha512-QhKJLwdLHIe0fncWCwrMShPsz1p2whaklsY8ZXUTtdOtLlCFqhfLM4sYtxyLQsBf4dV3LFkUWJwDUSOloTyayQ==","shasum":"a231d153e43788380bb8eb95064f729f9e1efe22","tarball":"https://registry.npmjs.org/@aspecto/opentelemetry-sampler/-/opentelemetry-sampler-0.1.0.tgz","fileCount":23,"unpackedSize":47731,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDp0AxRiksmiVDH99BYvNi1LmUDZIrvris/Sqlxwz6rRwIhALJt87IwuGZScBuQycK4t8ccmKyv+id/cZr6Uy4V9vd9"}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"habmic","email":"michael@topsight.io"},{"name":"amir.aspecto","email":"amir@aspecto.io"},{"name":"aspecto-release-bot","email":"dev@aspecto.io"},{"name":"andriy-aspecto","email":"andriy@aspecto.io"},{"name":"yanivd","email":"yaniv.davi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-sampler_0.1.0_1697550281124_0.22058503878629954"},"_hasShrinkwrap":false},"0.0.0-2024-05-16--14-39":{"name":"@aspecto/opentelemetry-sampler","version":"0.0.0-2024-05-16--14-39","description":"Opentelemetry sampler by Aspecto","author":{"name":"Aspecto.io"},"license":"Apache-2.0","main":"dist/src/index.js","types":"dist/src/index.d.ts","repository":{"type":"git","url":"git+https://github.com/aspecto-io/aspecto-opentelemetry-js.git"},"homepage":"https://docs.aspecto.io/v1/","publishConfig":{"access":"public"},"scripts":{"test":"echo \"Error: run tests from root\" && exit 1","watch":"tsc -w","build":"tsc","prebuild":"rm -rf ./dist","prepare":"yarn run build"},"engines":{"node":">=14.0.0"},"peerDependencies":{"@opentelemetry/api":"^1.6.0"},"dependencies":{"@aspecto/opentelemetry-base":"^0.0.0-2024-05-16--14-39","@aspecto/opentelemetry-config":"^0.0.0-2024-05-16--14-39","@aspecto/sampling-rules":"0.0.7","@opentelemetry/sdk-trace-base":"1.24.1"},"gitHead":"f964548376ceb75de433f5c76e199dd74ba2c971","readme":"# Aspecto Sampler\n\nAspecto is an observability platform, powered by OpenTelemetry, that brings R&D teams complete visibility into every interaction, performance issue, and error happening within their distributed services.\n\n**If you are looking for a full OpenTelemetry distro, including all instrumentations and features, see [@aspecto/opentelemetry](https://www.npmjs.com/package/@aspecto/opentelemetry)**\n\nThis package exposes an [OpenTelemetry Sampler](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/sdk.md#sampling) which you can integrate into your own OpenTelemetry installation to apply advance sampling capabilities using Aspecto platform.\n\n## Aspecto Sampling\n\nTo configure sampling in Aspecto, [click here](https://app.aspecto.io/settings/sampling-rules).\n\nAspecto sampler fetches remote sampling rules that you configure in Aspecto platform and applies them on traces that start in a given service.\n\nIt includes the following features:\n\n### Remote Configuration\n\nSampling configuration is fetched from Aspecto platform. \n\n- Configuration is always up-to-date and consistent between all your instances.\n- Updates are automatically and immediately pushed to all samplers whenever you make a change.\n- Changing configuration does not require writing code, updating dependencies, or deploying artifacts. \n\n### Configure in UI\n\nConfigure your sampling rules in an easy-to-use UI.\n\n- No need to write code.\n- Search capabilities.\n- Turn rules on and off in a click.\n- Set up temporary rules with timeouts.\n- Same UI for multiple languages - configure your rules once and apply them for both NodeJS and Ruby (support for more languages is coming soon)\n\n### Rich Sampling Language\n\nAspecto sampling abstract away the hard parts of the sampling implementation and focus on common use cases, while still allowing advanced configuration for complex scenarios.\n\n- Create specific rules for different workspaces.\n- Easily define which service/s and environment/s are affected.\n- Add conditions based on span attributes.\n- Control the sampling rate, and priority of rules.\n\n## Install\n\n### npm\n```sh\nnpm install @aspecto/opentelemetry-sampler\n```\n\n### yarn\n```sh\nyarn add @aspecto/opentelemetry-sampler\n```\n\nSupported node version: >= 14\n\n## Usage\n\nCreate an instance of `AspectoSampler` and use it in your `TraceProvider`\n\n```js\nimport { AspectoSampler } from '@aspecto/opentelemetry-sampler';\n\n// create an instance of AspectoSampler\nconst aspectoSampler = new AspectoSampler({\n    // aspectoAuth,\n    // serviceName,\n    // env,\n    // requireConfigForTraces,\n    // samplingRatio,\n});\n\n// Now, you can now use it wherever an OpenTelemetry sampler is acceptable\n\n// NodeTracerProvider\nimport { NodeTracerProvider } from '@opentelemetry/sdk-trace-node';\nconst provider = new NodeTracerProvider({\n    sampler: aspectoSampler,\n});\n\n// NodeSDK\nimport { NodeSDK } from '@opentelemetry/sdk-node';\nconst sdk = new NodeSDK({\n    traceExporter: // add your trace exporter here\n    sampler: aspectoSampler,\n});\n\n```\n\n## Configuration\n\nYou can configure the sampler via one or more of the following:\n- `options` variable. for example: `new AspectoSampler({optionName: optionValue})`.\nThis enables setting config options dynamically.\n- Environment variables\n- Add `aspecto.json` configuration file to the root directory, next to service's `package.json` file\n\nValues are evaluated in the following priority:\n1) `options` object\n2) environment variables\n3) config file\n4) default values\n\nAspecto auth is required, service name and env are recommended.\n\n| Option Name | Environment Variable | Type | Default | Description |\n| --- | --- | --- | --- | --- |\n| `disableAspecto` | `DISABLE_ASPECTO` |  boolean | `false` | Disable the sampler and don't apply any sampling logic (sample nothing) |\n| `env` | `NODE_ENV` | string | - | Set environment for matching sampling rules |\n| `aspectoAuth` | `ASPECTO_AUTH` | UUID | - | [Aspecto token](https://app.aspecto.io/app/integration/api-key) for authentication to read sampling configuration  |\n| `serviceName` | `OTEL_SERVICE_NAME` | string | - | Set service name for matching sampling rules |\n| `samplingRatio` | `ASPECTO_SAMPLING_RATIO` | number | `1.0` | This option is used as a fallback if no specific sampling rule is matched, and before remote sampling rule configuration is fetched. It controls how many of the traces starting in this service should be sampled. Set to number in the range [0.0, 1.0] where `0.0` is no sampling, and `1.0` is sample all. |\n| `requireConfigForTraces` | `ASPECTO_REQUIRE_CONFIG_FOR_TRACES` | boolean | `false` | When `true`, the Sampler will not trace anything until the remote sampling configuration arrives (a few hundred ms). Can be used to enforce sampling configuration is always applied, with the cost of losing traces generated during service startup. |\n\n### Getting Help\n\nFor any assistance or question, feel free to [Contact Us](https://www.aspecto.io/contact-us/).\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/aspecto-io/aspecto-opentelemetry-js/issues"},"_id":"@aspecto/opentelemetry-sampler@0.0.0-2024-05-16--14-39","_nodeVersion":"18.20.2","_npmVersion":"lerna/8.1.3/node@v18.20.2+x64 (linux)","dist":{"integrity":"sha512-r9JtmeoRDM7WZO5z1KTffkbX1No8GFij8DIMg1yt3965Ia1e2Mjc7KYkZCVxf18EotDuJiyXPjpHiJawX7eIGA==","shasum":"4229fd88ab1dbfd43008a8fb562fb54b1e26bb58","tarball":"https://registry.npmjs.org/@aspecto/opentelemetry-sampler/-/opentelemetry-sampler-0.0.0-2024-05-16--14-39.tgz","fileCount":22,"unpackedSize":47538,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCMFyqc73QmErHdUb0pDQuC5EpW0os6XRtcT1KKrspnugIhAJVbNUL5a5OdxTiVCy8hRP67S3wz6Ja8dVIzXrqg2JIS"}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"habmic","email":"michael@topsight.io"},{"name":"amir.aspecto","email":"amir@aspecto.io"},{"name":"aspecto-release-bot","email":"dev@aspecto.io"},{"name":"andriy-aspecto","email":"andriy@aspecto.io"},{"name":"yanivd","email":"yaniv.davi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-sampler_0.0.0-2024-05-16--14-39_1715870384902_0.5391917919491946"},"_hasShrinkwrap":false},"0.0.0-2024-05-21--09-06":{"name":"@aspecto/opentelemetry-sampler","version":"0.0.0-2024-05-21--09-06","description":"Opentelemetry sampler by Aspecto","author":{"name":"Aspecto.io"},"license":"Apache-2.0","main":"dist/src/index.js","types":"dist/src/index.d.ts","repository":{"type":"git","url":"git+https://github.com/aspecto-io/aspecto-opentelemetry-js.git"},"homepage":"https://docs.aspecto.io/v1/","publishConfig":{"access":"public"},"scripts":{"test":"echo \"Error: run tests from root\" && exit 1","watch":"tsc -w","build":"tsc","prebuild":"rm -rf ./dist","prepare":"yarn run build"},"engines":{"node":">=14.0.0"},"peerDependencies":{"@opentelemetry/api":"^1.6.0"},"dependencies":{"@aspecto/opentelemetry-base":"^0.0.0-2024-05-21--09-06","@aspecto/opentelemetry-config":"^0.0.0-2024-05-21--09-06","@aspecto/sampling-rules":"0.0.7","@opentelemetry/sdk-trace-base":"1.24.1"},"gitHead":"1f75f2b9b4108b2ca822871f35929058afa873d0","readme":"# Aspecto Sampler\n\nAspecto is an observability platform, powered by OpenTelemetry, that brings R&D teams complete visibility into every interaction, performance issue, and error happening within their distributed services.\n\n**If you are looking for a full OpenTelemetry distro, including all instrumentations and features, see [@aspecto/opentelemetry](https://www.npmjs.com/package/@aspecto/opentelemetry)**\n\nThis package exposes an [OpenTelemetry Sampler](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/sdk.md#sampling) which you can integrate into your own OpenTelemetry installation to apply advance sampling capabilities using Aspecto platform.\n\n## Aspecto Sampling\n\nTo configure sampling in Aspecto, [click here](https://app.aspecto.io/settings/sampling-rules).\n\nAspecto sampler fetches remote sampling rules that you configure in Aspecto platform and applies them on traces that start in a given service.\n\nIt includes the following features:\n\n### Remote Configuration\n\nSampling configuration is fetched from Aspecto platform. \n\n- Configuration is always up-to-date and consistent between all your instances.\n- Updates are automatically and immediately pushed to all samplers whenever you make a change.\n- Changing configuration does not require writing code, updating dependencies, or deploying artifacts. \n\n### Configure in UI\n\nConfigure your sampling rules in an easy-to-use UI.\n\n- No need to write code.\n- Search capabilities.\n- Turn rules on and off in a click.\n- Set up temporary rules with timeouts.\n- Same UI for multiple languages - configure your rules once and apply them for both NodeJS and Ruby (support for more languages is coming soon)\n\n### Rich Sampling Language\n\nAspecto sampling abstract away the hard parts of the sampling implementation and focus on common use cases, while still allowing advanced configuration for complex scenarios.\n\n- Create specific rules for different workspaces.\n- Easily define which service/s and environment/s are affected.\n- Add conditions based on span attributes.\n- Control the sampling rate, and priority of rules.\n\n## Install\n\n### npm\n```sh\nnpm install @aspecto/opentelemetry-sampler\n```\n\n### yarn\n```sh\nyarn add @aspecto/opentelemetry-sampler\n```\n\nSupported node version: >= 14\n\n## Usage\n\nCreate an instance of `AspectoSampler` and use it in your `TraceProvider`\n\n```js\nimport { AspectoSampler } from '@aspecto/opentelemetry-sampler';\n\n// create an instance of AspectoSampler\nconst aspectoSampler = new AspectoSampler({\n    // aspectoAuth,\n    // serviceName,\n    // env,\n    // requireConfigForTraces,\n    // samplingRatio,\n});\n\n// Now, you can now use it wherever an OpenTelemetry sampler is acceptable\n\n// NodeTracerProvider\nimport { NodeTracerProvider } from '@opentelemetry/sdk-trace-node';\nconst provider = new NodeTracerProvider({\n    sampler: aspectoSampler,\n});\n\n// NodeSDK\nimport { NodeSDK } from '@opentelemetry/sdk-node';\nconst sdk = new NodeSDK({\n    traceExporter: // add your trace exporter here\n    sampler: aspectoSampler,\n});\n\n```\n\n## Configuration\n\nYou can configure the sampler via one or more of the following:\n- `options` variable. for example: `new AspectoSampler({optionName: optionValue})`.\nThis enables setting config options dynamically.\n- Environment variables\n- Add `aspecto.json` configuration file to the root directory, next to service's `package.json` file\n\nValues are evaluated in the following priority:\n1) `options` object\n2) environment variables\n3) config file\n4) default values\n\nAspecto auth is required, service name and env are recommended.\n\n| Option Name | Environment Variable | Type | Default | Description |\n| --- | --- | --- | --- | --- |\n| `disableAspecto` | `DISABLE_ASPECTO` |  boolean | `false` | Disable the sampler and don't apply any sampling logic (sample nothing) |\n| `env` | `NODE_ENV` | string | - | Set environment for matching sampling rules |\n| `aspectoAuth` | `ASPECTO_AUTH` | UUID | - | [Aspecto token](https://app.aspecto.io/app/integration/api-key) for authentication to read sampling configuration  |\n| `serviceName` | `OTEL_SERVICE_NAME` | string | - | Set service name for matching sampling rules |\n| `samplingRatio` | `ASPECTO_SAMPLING_RATIO` | number | `1.0` | This option is used as a fallback if no specific sampling rule is matched, and before remote sampling rule configuration is fetched. It controls how many of the traces starting in this service should be sampled. Set to number in the range [0.0, 1.0] where `0.0` is no sampling, and `1.0` is sample all. |\n| `requireConfigForTraces` | `ASPECTO_REQUIRE_CONFIG_FOR_TRACES` | boolean | `false` | When `true`, the Sampler will not trace anything until the remote sampling configuration arrives (a few hundred ms). Can be used to enforce sampling configuration is always applied, with the cost of losing traces generated during service startup. |\n\n### Getting Help\n\nFor any assistance or question, feel free to [Contact Us](https://www.aspecto.io/contact-us/).\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/aspecto-io/aspecto-opentelemetry-js/issues"},"_id":"@aspecto/opentelemetry-sampler@0.0.0-2024-05-21--09-06","_nodeVersion":"18.20.2","_npmVersion":"lerna/7.4.2/node@v18.20.2+x64 (linux)","dist":{"integrity":"sha512-zxUQd7F5XV5cTrZCcz86aaRhv/1N8cJV7b2ex7mh0GruGuPoE5vafOBtozX/pJ1evxKd1DROuSIiPzuC+JglcQ==","shasum":"b60c13edce5b2bbf0dfe355af29a8a2e2e14c411","tarball":"https://registry.npmjs.org/@aspecto/opentelemetry-sampler/-/opentelemetry-sampler-0.0.0-2024-05-21--09-06.tgz","fileCount":22,"unpackedSize":47538,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDvGTqJHdmvrH/GNOCWIGvHspRQ1HajAW1XiM5ncfhHfgIgZtO7581n8rDBMC6WDMBBDxBEz1s64Kp71OGPjBP3/Ko="}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"habmic","email":"michael@topsight.io"},{"name":"amir.aspecto","email":"amir@aspecto.io"},{"name":"aspecto-release-bot","email":"dev@aspecto.io"},{"name":"andriy-aspecto","email":"andriy@aspecto.io"},{"name":"yanivd","email":"yaniv.davi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-sampler_0.0.0-2024-05-21--09-06_1716282417701_0.3341624269946777"},"_hasShrinkwrap":false},"0.2.0":{"name":"@aspecto/opentelemetry-sampler","version":"0.2.0","description":"Opentelemetry sampler by Aspecto","author":{"name":"Aspecto.io"},"license":"Apache-2.0","main":"dist/src/index.js","types":"dist/src/index.d.ts","repository":{"type":"git","url":"git+https://github.com/aspecto-io/aspecto-opentelemetry-js.git"},"homepage":"https://docs.aspecto.io/v1/","publishConfig":{"access":"public"},"scripts":{"test":"echo \"Error: run tests from root\" && exit 1","watch":"tsc -w","build":"tsc","prebuild":"rm -rf ./dist","prepare":"yarn run build"},"engines":{"node":">=14.0.0"},"peerDependencies":{"@opentelemetry/api":"^1.6.0"},"dependencies":{"@aspecto/opentelemetry-base":"^0.2.0","@aspecto/opentelemetry-config":"^0.2.0","@aspecto/sampling-rules":"0.0.7","@opentelemetry/sdk-trace-base":"1.24.1"},"gitHead":"1fb6903327c84864c384a6068bead125db0d0237","bugs":{"url":"https://github.com/aspecto-io/aspecto-opentelemetry-js/issues"},"_id":"@aspecto/opentelemetry-sampler@0.2.0","_nodeVersion":"18.20.2","_npmVersion":"lerna/7.4.2/node@v18.20.2+x64 (linux)","dist":{"integrity":"sha512-3bv0BciYx95D5gZuBNkUSCsLoujYFOwZAF9TvQ4J03ydu6UXmzsHlRnIuL8Kvwfn6SCIrg6GcikUVKv1i137VA==","shasum":"ed7772eee4c333470d900c3c030fdbe3197b7831","tarball":"https://registry.npmjs.org/@aspecto/opentelemetry-sampler/-/opentelemetry-sampler-0.2.0.tgz","fileCount":22,"unpackedSize":47484,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCoHlWfowZGc70XK+M41aGOeBmw93kI47yBFxsE98rSzgIhAI6N2Nmu51c8v+D4t//44/r1eFFEGk2fRAjhT5gzZ3r2"}]},"_npmUser":{"name":"aspecto-release-bot","email":"dev@aspecto.io"},"directories":{},"maintainers":[{"name":"habmic","email":"michael@topsight.io"},{"name":"amir.aspecto","email":"amir@aspecto.io"},{"name":"aspecto-release-bot","email":"dev@aspecto.io"},{"name":"andriy-aspecto","email":"andriy@aspecto.io"},{"name":"yanivd","email":"yaniv.davi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opentelemetry-sampler_0.2.0_1716292413604_0.7534480059155013"},"_hasShrinkwrap":false}},"time":{"created":"2022-11-22T11:42:51.510Z","0.0.0-2022-11-22--11-42":"2022-11-22T11:42:51.788Z","modified":"2024-05-21T11:53:34.023Z","0.0.0-2022-11-22--14-54":"2022-11-22T14:55:22.867Z","0.0.0-2022-11-24--17-44":"2022-11-24T17:44:52.965Z","0.0.139":"2022-11-30T05:57:00.806Z","0.0.0-2023-02-09--09-14":"2023-02-09T09:15:04.128Z","0.0.0-2023-02-28--15-21":"2023-02-28T15:21:29.412Z","0.0.0-2023-03-01--13-22":"2023-03-01T13:23:03.335Z","0.0.140":"2023-03-01T14:58:48.655Z","0.0.0-2023-07-27--11-15":"2023-07-27T11:15:32.451Z","0.0.0-2023-07-30--08-42":"2023-07-30T08:42:56.884Z","0.0.142":"2023-09-21T09:58:29.847Z","0.0.0-2023-10-17--11-48":"2023-10-17T11:49:21.925Z","0.1.0":"2023-10-17T13:44:41.361Z","0.0.0-2024-05-16--14-39":"2024-05-16T14:39:45.100Z","0.0.0-2024-05-21--09-06":"2024-05-21T09:06:57.878Z","0.2.0":"2024-05-21T11:53:33.811Z"},"maintainers":[{"name":"habmic","email":"michael@topsight.io"},{"name":"amir.aspecto","email":"amir@aspecto.io"},{"name":"aspecto-release-bot","email":"dev@aspecto.io"},{"name":"andriy-aspecto","email":"andriy@aspecto.io"},{"name":"yanivd","email":"yaniv.davi@gmail.com"}],"description":"Opentelemetry sampler by Aspecto","homepage":"https://docs.aspecto.io/v1/","repository":{"type":"git","url":"git+https://github.com/aspecto-io/aspecto-opentelemetry-js.git"},"author":{"name":"Aspecto.io"},"bugs":{"url":"https://github.com/aspecto-io/aspecto-opentelemetry-js/issues"},"license":"Apache-2.0","readme":"# Aspecto Sampler\n\nAspecto is an observability platform, powered by OpenTelemetry, that brings R&D teams complete visibility into every interaction, performance issue, and error happening within their distributed services.\n\n**If you are looking for a full OpenTelemetry distro, including all instrumentations and features, see [@aspecto/opentelemetry](https://www.npmjs.com/package/@aspecto/opentelemetry)**\n\nThis package exposes an [OpenTelemetry Sampler](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/sdk.md#sampling) which you can integrate into your own OpenTelemetry installation to apply advance sampling capabilities using Aspecto platform.\n\n## Aspecto Sampling\n\nTo configure sampling in Aspecto, [click here](https://app.aspecto.io/settings/sampling-rules).\n\nAspecto sampler fetches remote sampling rules that you configure in Aspecto platform and applies them on traces that start in a given service.\n\nIt includes the following features:\n\n### Remote Configuration\n\nSampling configuration is fetched from Aspecto platform. \n\n- Configuration is always up-to-date and consistent between all your instances.\n- Updates are automatically and immediately pushed to all samplers whenever you make a change.\n- Changing configuration does not require writing code, updating dependencies, or deploying artifacts. \n\n### Configure in UI\n\nConfigure your sampling rules in an easy-to-use UI.\n\n- No need to write code.\n- Search capabilities.\n- Turn rules on and off in a click.\n- Set up temporary rules with timeouts.\n- Same UI for multiple languages - configure your rules once and apply them for both NodeJS and Ruby (support for more languages is coming soon)\n\n### Rich Sampling Language\n\nAspecto sampling abstract away the hard parts of the sampling implementation and focus on common use cases, while still allowing advanced configuration for complex scenarios.\n\n- Create specific rules for different workspaces.\n- Easily define which service/s and environment/s are affected.\n- Add conditions based on span attributes.\n- Control the sampling rate, and priority of rules.\n\n## Install\n\n### npm\n```sh\nnpm install @aspecto/opentelemetry-sampler\n```\n\n### yarn\n```sh\nyarn add @aspecto/opentelemetry-sampler\n```\n\nSupported node version: >= 14\n\n## Usage\n\nCreate an instance of `AspectoSampler` and use it in your `TraceProvider`\n\n```js\nimport { AspectoSampler } from '@aspecto/opentelemetry-sampler';\n\n// create an instance of AspectoSampler\nconst aspectoSampler = new AspectoSampler({\n    // aspectoAuth,\n    // serviceName,\n    // env,\n    // requireConfigForTraces,\n    // samplingRatio,\n});\n\n// Now, you can now use it wherever an OpenTelemetry sampler is acceptable\n\n// NodeTracerProvider\nimport { NodeTracerProvider } from '@opentelemetry/sdk-trace-node';\nconst provider = new NodeTracerProvider({\n    sampler: aspectoSampler,\n});\n\n// NodeSDK\nimport { NodeSDK } from '@opentelemetry/sdk-node';\nconst sdk = new NodeSDK({\n    traceExporter: // add your trace exporter here\n    sampler: aspectoSampler,\n});\n\n```\n\n## Configuration\n\nYou can configure the sampler via one or more of the following:\n- `options` variable. for example: `new AspectoSampler({optionName: optionValue})`.\nThis enables setting config options dynamically.\n- Environment variables\n- Add `aspecto.json` configuration file to the root directory, next to service's `package.json` file\n\nValues are evaluated in the following priority:\n1) `options` object\n2) environment variables\n3) config file\n4) default values\n\nAspecto auth is required, service name and env are recommended.\n\n| Option Name | Environment Variable | Type | Default | Description |\n| --- | --- | --- | --- | --- |\n| `disableAspecto` | `DISABLE_ASPECTO` |  boolean | `false` | Disable the sampler and don't apply any sampling logic (sample nothing) |\n| `env` | `NODE_ENV` | string | - | Set environment for matching sampling rules |\n| `aspectoAuth` | `ASPECTO_AUTH` | UUID | - | [Aspecto token](https://app.aspecto.io/app/integration/api-key) for authentication to read sampling configuration  |\n| `serviceName` | `OTEL_SERVICE_NAME` | string | - | Set service name for matching sampling rules |\n| `samplingRatio` | `ASPECTO_SAMPLING_RATIO` | number | `1.0` | This option is used as a fallback if no specific sampling rule is matched, and before remote sampling rule configuration is fetched. It controls how many of the traces starting in this service should be sampled. Set to number in the range [0.0, 1.0] where `0.0` is no sampling, and `1.0` is sample all. |\n| `requireConfigForTraces` | `ASPECTO_REQUIRE_CONFIG_FOR_TRACES` | boolean | `false` | When `true`, the Sampler will not trace anything until the remote sampling configuration arrives (a few hundred ms). Can be used to enforce sampling configuration is always applied, with the cost of losing traces generated during service startup. |\n\n### Getting Help\n\nFor any assistance or question, feel free to [Contact Us](https://www.aspecto.io/contact-us/).\n","readmeFilename":"README.md"}