From b51d79840eeb515902e5e4c240bd2e7f829c2399 Mon Sep 17 00:00:00 2001 From: Jonathan Lee Date: Thu, 21 Aug 2025 11:37:10 -0700 Subject: [PATCH 1/7] move xray sampler out of incubating --- .../sampler-aws-xray}/.eslintignore | 0 .../sampler-aws-xray}/.eslintrc.js | 0 .../sampler-aws-xray}/LICENSE | 0 .../sampler-aws-xray}/README.md | 9 ++++++--- .../sampler-aws-xray}/package.json | 5 ++--- .../sampler-aws-xray}/src/aws-xray-sampling-client.ts | 0 .../sampler-aws-xray}/src/fallback-sampler.ts | 0 .../sampler-aws-xray}/src/index.ts | 0 .../sampler-aws-xray}/src/rate-limiter.ts | 0 .../sampler-aws-xray}/src/rate-limiting-sampler.ts | 0 .../sampler-aws-xray}/src/remote-sampler.ts | 0 .../sampler-aws-xray}/src/rule-cache.ts | 0 .../sampler-aws-xray}/src/sampling-rule-applier.ts | 0 .../sampler-aws-xray}/src/sampling-rule.ts | 0 .../sampler-aws-xray}/src/semconv.ts | 0 .../sampler-aws-xray}/src/statistics.ts | 0 .../sampler-aws-xray}/src/types.ts | 0 .../sampler-aws-xray}/src/utils.ts | 0 .../test/aws-xray-sampling-client.test.ts | 0 .../test/data/get-sampling-rules-response-sample-2.json | 0 .../get-sampling-rules-response-sample-sample-all.json | 0 .../test/data/get-sampling-rules-response-sample.json | 0 .../test/data/get-sampling-targets-response-sample.json | 0 ...st-remote-sampler_sampling-rules-response-sample.json | 0 ...-remote-sampler_sampling-targets-response-sample.json | 0 .../sampler-aws-xray}/test/fallback-sampler.test.ts | 0 .../sampler-aws-xray}/test/rate-limiter.test.ts | 0 .../sampler-aws-xray}/test/rate-limiting-sampler.test.ts | 0 .../sampler-aws-xray}/test/remote-sampler.test.ts | 0 .../sampler-aws-xray}/test/rule-cache.test.ts | 0 .../sampler-aws-xray}/test/sampling-rule-applier.test.ts | 0 .../sampler-aws-xray}/test/sampling-rule.test.ts | 0 .../sampler-aws-xray}/test/statistics.test.ts | 0 .../sampler-aws-xray}/test/utils.test.ts | 0 .../sampler-aws-xray}/tsconfig.esm.json | 0 .../sampler-aws-xray}/tsconfig.json | 0 36 files changed, 8 insertions(+), 6 deletions(-) rename {incubator/opentelemetry-sampler-aws-xray => packages/sampler-aws-xray}/.eslintignore (100%) rename {incubator/opentelemetry-sampler-aws-xray => packages/sampler-aws-xray}/.eslintrc.js (100%) rename {incubator/opentelemetry-sampler-aws-xray => packages/sampler-aws-xray}/LICENSE (100%) rename {incubator/opentelemetry-sampler-aws-xray => packages/sampler-aws-xray}/README.md (85%) rename {incubator/opentelemetry-sampler-aws-xray => packages/sampler-aws-xray}/package.json (94%) rename {incubator/opentelemetry-sampler-aws-xray => packages/sampler-aws-xray}/src/aws-xray-sampling-client.ts (100%) rename {incubator/opentelemetry-sampler-aws-xray => packages/sampler-aws-xray}/src/fallback-sampler.ts (100%) rename {incubator/opentelemetry-sampler-aws-xray => packages/sampler-aws-xray}/src/index.ts (100%) rename {incubator/opentelemetry-sampler-aws-xray => packages/sampler-aws-xray}/src/rate-limiter.ts (100%) rename {incubator/opentelemetry-sampler-aws-xray => packages/sampler-aws-xray}/src/rate-limiting-sampler.ts (100%) rename {incubator/opentelemetry-sampler-aws-xray => packages/sampler-aws-xray}/src/remote-sampler.ts (100%) rename {incubator/opentelemetry-sampler-aws-xray => packages/sampler-aws-xray}/src/rule-cache.ts (100%) rename {incubator/opentelemetry-sampler-aws-xray => packages/sampler-aws-xray}/src/sampling-rule-applier.ts (100%) rename {incubator/opentelemetry-sampler-aws-xray => packages/sampler-aws-xray}/src/sampling-rule.ts (100%) rename {incubator/opentelemetry-sampler-aws-xray => packages/sampler-aws-xray}/src/semconv.ts (100%) rename {incubator/opentelemetry-sampler-aws-xray => packages/sampler-aws-xray}/src/statistics.ts (100%) rename {incubator/opentelemetry-sampler-aws-xray => packages/sampler-aws-xray}/src/types.ts (100%) rename {incubator/opentelemetry-sampler-aws-xray => packages/sampler-aws-xray}/src/utils.ts (100%) rename {incubator/opentelemetry-sampler-aws-xray => packages/sampler-aws-xray}/test/aws-xray-sampling-client.test.ts (100%) rename {incubator/opentelemetry-sampler-aws-xray => packages/sampler-aws-xray}/test/data/get-sampling-rules-response-sample-2.json (100%) rename {incubator/opentelemetry-sampler-aws-xray => packages/sampler-aws-xray}/test/data/get-sampling-rules-response-sample-sample-all.json (100%) rename {incubator/opentelemetry-sampler-aws-xray => packages/sampler-aws-xray}/test/data/get-sampling-rules-response-sample.json (100%) rename {incubator/opentelemetry-sampler-aws-xray => packages/sampler-aws-xray}/test/data/get-sampling-targets-response-sample.json (100%) rename {incubator/opentelemetry-sampler-aws-xray => packages/sampler-aws-xray}/test/data/test-remote-sampler_sampling-rules-response-sample.json (100%) rename {incubator/opentelemetry-sampler-aws-xray => packages/sampler-aws-xray}/test/data/test-remote-sampler_sampling-targets-response-sample.json (100%) rename {incubator/opentelemetry-sampler-aws-xray => packages/sampler-aws-xray}/test/fallback-sampler.test.ts (100%) rename {incubator/opentelemetry-sampler-aws-xray => packages/sampler-aws-xray}/test/rate-limiter.test.ts (100%) rename {incubator/opentelemetry-sampler-aws-xray => packages/sampler-aws-xray}/test/rate-limiting-sampler.test.ts (100%) rename {incubator/opentelemetry-sampler-aws-xray => packages/sampler-aws-xray}/test/remote-sampler.test.ts (100%) rename {incubator/opentelemetry-sampler-aws-xray => packages/sampler-aws-xray}/test/rule-cache.test.ts (100%) rename {incubator/opentelemetry-sampler-aws-xray => packages/sampler-aws-xray}/test/sampling-rule-applier.test.ts (100%) rename {incubator/opentelemetry-sampler-aws-xray => packages/sampler-aws-xray}/test/sampling-rule.test.ts (100%) rename {incubator/opentelemetry-sampler-aws-xray => packages/sampler-aws-xray}/test/statistics.test.ts (100%) rename {incubator/opentelemetry-sampler-aws-xray => packages/sampler-aws-xray}/test/utils.test.ts (100%) rename {incubator/opentelemetry-sampler-aws-xray => packages/sampler-aws-xray}/tsconfig.esm.json (100%) rename {incubator/opentelemetry-sampler-aws-xray => packages/sampler-aws-xray}/tsconfig.json (100%) diff --git a/incubator/opentelemetry-sampler-aws-xray/.eslintignore b/packages/sampler-aws-xray/.eslintignore similarity index 100% rename from incubator/opentelemetry-sampler-aws-xray/.eslintignore rename to packages/sampler-aws-xray/.eslintignore diff --git a/incubator/opentelemetry-sampler-aws-xray/.eslintrc.js b/packages/sampler-aws-xray/.eslintrc.js similarity index 100% rename from incubator/opentelemetry-sampler-aws-xray/.eslintrc.js rename to packages/sampler-aws-xray/.eslintrc.js diff --git a/incubator/opentelemetry-sampler-aws-xray/LICENSE b/packages/sampler-aws-xray/LICENSE similarity index 100% rename from incubator/opentelemetry-sampler-aws-xray/LICENSE rename to packages/sampler-aws-xray/LICENSE diff --git a/incubator/opentelemetry-sampler-aws-xray/README.md b/packages/sampler-aws-xray/README.md similarity index 85% rename from incubator/opentelemetry-sampler-aws-xray/README.md rename to packages/sampler-aws-xray/README.md index ad8402ae12..0bbb47fda9 100644 --- a/incubator/opentelemetry-sampler-aws-xray/README.md +++ b/packages/sampler-aws-xray/README.md @@ -1,10 +1,13 @@ # AWS X-Ray Remote Sampler -> This component is still in development and has not been released as an npm package. +This module provides the remote/centralized sampler for AWS X-Ray. -[component owners](https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/.github/component_owners.yml): @jj22ee, @yiyuan-he +## Status + +| Maturity | [Component Owner](../../.github/component_owners.yml) | Compatibility | +| -------------------------------------- | ----------------------------------------------------- | --------------------- | +| [Stable](../../CONTRIBUTING.md#stable) | @jj22ee @yiyuan-he | API 1.0+
SDK 2.0+ | -This module provides the remote/centralized sampler for AWS X-Ray. ## Usage diff --git a/incubator/opentelemetry-sampler-aws-xray/package.json b/packages/sampler-aws-xray/package.json similarity index 94% rename from incubator/opentelemetry-sampler-aws-xray/package.json rename to packages/sampler-aws-xray/package.json index 70b9409204..96c25e6dab 100644 --- a/incubator/opentelemetry-sampler-aws-xray/package.json +++ b/packages/sampler-aws-xray/package.json @@ -1,8 +1,7 @@ { "name": "@opentelemetry/sampler-aws-xray", - "version": "0.34.0", - "private": true, - "description": "OpenTelemetry remote sampler for AWS X-Ray", + "version": "0.1.0", + "description": "OpenTelemetry Remote Sampler for AWS X-Ray", "keywords": [ "aws", "sampler", diff --git a/incubator/opentelemetry-sampler-aws-xray/src/aws-xray-sampling-client.ts b/packages/sampler-aws-xray/src/aws-xray-sampling-client.ts similarity index 100% rename from incubator/opentelemetry-sampler-aws-xray/src/aws-xray-sampling-client.ts rename to packages/sampler-aws-xray/src/aws-xray-sampling-client.ts diff --git a/incubator/opentelemetry-sampler-aws-xray/src/fallback-sampler.ts b/packages/sampler-aws-xray/src/fallback-sampler.ts similarity index 100% rename from incubator/opentelemetry-sampler-aws-xray/src/fallback-sampler.ts rename to packages/sampler-aws-xray/src/fallback-sampler.ts diff --git a/incubator/opentelemetry-sampler-aws-xray/src/index.ts b/packages/sampler-aws-xray/src/index.ts similarity index 100% rename from incubator/opentelemetry-sampler-aws-xray/src/index.ts rename to packages/sampler-aws-xray/src/index.ts diff --git a/incubator/opentelemetry-sampler-aws-xray/src/rate-limiter.ts b/packages/sampler-aws-xray/src/rate-limiter.ts similarity index 100% rename from incubator/opentelemetry-sampler-aws-xray/src/rate-limiter.ts rename to packages/sampler-aws-xray/src/rate-limiter.ts diff --git a/incubator/opentelemetry-sampler-aws-xray/src/rate-limiting-sampler.ts b/packages/sampler-aws-xray/src/rate-limiting-sampler.ts similarity index 100% rename from incubator/opentelemetry-sampler-aws-xray/src/rate-limiting-sampler.ts rename to packages/sampler-aws-xray/src/rate-limiting-sampler.ts diff --git a/incubator/opentelemetry-sampler-aws-xray/src/remote-sampler.ts b/packages/sampler-aws-xray/src/remote-sampler.ts similarity index 100% rename from incubator/opentelemetry-sampler-aws-xray/src/remote-sampler.ts rename to packages/sampler-aws-xray/src/remote-sampler.ts diff --git a/incubator/opentelemetry-sampler-aws-xray/src/rule-cache.ts b/packages/sampler-aws-xray/src/rule-cache.ts similarity index 100% rename from incubator/opentelemetry-sampler-aws-xray/src/rule-cache.ts rename to packages/sampler-aws-xray/src/rule-cache.ts diff --git a/incubator/opentelemetry-sampler-aws-xray/src/sampling-rule-applier.ts b/packages/sampler-aws-xray/src/sampling-rule-applier.ts similarity index 100% rename from incubator/opentelemetry-sampler-aws-xray/src/sampling-rule-applier.ts rename to packages/sampler-aws-xray/src/sampling-rule-applier.ts diff --git a/incubator/opentelemetry-sampler-aws-xray/src/sampling-rule.ts b/packages/sampler-aws-xray/src/sampling-rule.ts similarity index 100% rename from incubator/opentelemetry-sampler-aws-xray/src/sampling-rule.ts rename to packages/sampler-aws-xray/src/sampling-rule.ts diff --git a/incubator/opentelemetry-sampler-aws-xray/src/semconv.ts b/packages/sampler-aws-xray/src/semconv.ts similarity index 100% rename from incubator/opentelemetry-sampler-aws-xray/src/semconv.ts rename to packages/sampler-aws-xray/src/semconv.ts diff --git a/incubator/opentelemetry-sampler-aws-xray/src/statistics.ts b/packages/sampler-aws-xray/src/statistics.ts similarity index 100% rename from incubator/opentelemetry-sampler-aws-xray/src/statistics.ts rename to packages/sampler-aws-xray/src/statistics.ts diff --git a/incubator/opentelemetry-sampler-aws-xray/src/types.ts b/packages/sampler-aws-xray/src/types.ts similarity index 100% rename from incubator/opentelemetry-sampler-aws-xray/src/types.ts rename to packages/sampler-aws-xray/src/types.ts diff --git a/incubator/opentelemetry-sampler-aws-xray/src/utils.ts b/packages/sampler-aws-xray/src/utils.ts similarity index 100% rename from incubator/opentelemetry-sampler-aws-xray/src/utils.ts rename to packages/sampler-aws-xray/src/utils.ts diff --git a/incubator/opentelemetry-sampler-aws-xray/test/aws-xray-sampling-client.test.ts b/packages/sampler-aws-xray/test/aws-xray-sampling-client.test.ts similarity index 100% rename from incubator/opentelemetry-sampler-aws-xray/test/aws-xray-sampling-client.test.ts rename to packages/sampler-aws-xray/test/aws-xray-sampling-client.test.ts diff --git a/incubator/opentelemetry-sampler-aws-xray/test/data/get-sampling-rules-response-sample-2.json b/packages/sampler-aws-xray/test/data/get-sampling-rules-response-sample-2.json similarity index 100% rename from incubator/opentelemetry-sampler-aws-xray/test/data/get-sampling-rules-response-sample-2.json rename to packages/sampler-aws-xray/test/data/get-sampling-rules-response-sample-2.json diff --git a/incubator/opentelemetry-sampler-aws-xray/test/data/get-sampling-rules-response-sample-sample-all.json b/packages/sampler-aws-xray/test/data/get-sampling-rules-response-sample-sample-all.json similarity index 100% rename from incubator/opentelemetry-sampler-aws-xray/test/data/get-sampling-rules-response-sample-sample-all.json rename to packages/sampler-aws-xray/test/data/get-sampling-rules-response-sample-sample-all.json diff --git a/incubator/opentelemetry-sampler-aws-xray/test/data/get-sampling-rules-response-sample.json b/packages/sampler-aws-xray/test/data/get-sampling-rules-response-sample.json similarity index 100% rename from incubator/opentelemetry-sampler-aws-xray/test/data/get-sampling-rules-response-sample.json rename to packages/sampler-aws-xray/test/data/get-sampling-rules-response-sample.json diff --git a/incubator/opentelemetry-sampler-aws-xray/test/data/get-sampling-targets-response-sample.json b/packages/sampler-aws-xray/test/data/get-sampling-targets-response-sample.json similarity index 100% rename from incubator/opentelemetry-sampler-aws-xray/test/data/get-sampling-targets-response-sample.json rename to packages/sampler-aws-xray/test/data/get-sampling-targets-response-sample.json diff --git a/incubator/opentelemetry-sampler-aws-xray/test/data/test-remote-sampler_sampling-rules-response-sample.json b/packages/sampler-aws-xray/test/data/test-remote-sampler_sampling-rules-response-sample.json similarity index 100% rename from incubator/opentelemetry-sampler-aws-xray/test/data/test-remote-sampler_sampling-rules-response-sample.json rename to packages/sampler-aws-xray/test/data/test-remote-sampler_sampling-rules-response-sample.json diff --git a/incubator/opentelemetry-sampler-aws-xray/test/data/test-remote-sampler_sampling-targets-response-sample.json b/packages/sampler-aws-xray/test/data/test-remote-sampler_sampling-targets-response-sample.json similarity index 100% rename from incubator/opentelemetry-sampler-aws-xray/test/data/test-remote-sampler_sampling-targets-response-sample.json rename to packages/sampler-aws-xray/test/data/test-remote-sampler_sampling-targets-response-sample.json diff --git a/incubator/opentelemetry-sampler-aws-xray/test/fallback-sampler.test.ts b/packages/sampler-aws-xray/test/fallback-sampler.test.ts similarity index 100% rename from incubator/opentelemetry-sampler-aws-xray/test/fallback-sampler.test.ts rename to packages/sampler-aws-xray/test/fallback-sampler.test.ts diff --git a/incubator/opentelemetry-sampler-aws-xray/test/rate-limiter.test.ts b/packages/sampler-aws-xray/test/rate-limiter.test.ts similarity index 100% rename from incubator/opentelemetry-sampler-aws-xray/test/rate-limiter.test.ts rename to packages/sampler-aws-xray/test/rate-limiter.test.ts diff --git a/incubator/opentelemetry-sampler-aws-xray/test/rate-limiting-sampler.test.ts b/packages/sampler-aws-xray/test/rate-limiting-sampler.test.ts similarity index 100% rename from incubator/opentelemetry-sampler-aws-xray/test/rate-limiting-sampler.test.ts rename to packages/sampler-aws-xray/test/rate-limiting-sampler.test.ts diff --git a/incubator/opentelemetry-sampler-aws-xray/test/remote-sampler.test.ts b/packages/sampler-aws-xray/test/remote-sampler.test.ts similarity index 100% rename from incubator/opentelemetry-sampler-aws-xray/test/remote-sampler.test.ts rename to packages/sampler-aws-xray/test/remote-sampler.test.ts diff --git a/incubator/opentelemetry-sampler-aws-xray/test/rule-cache.test.ts b/packages/sampler-aws-xray/test/rule-cache.test.ts similarity index 100% rename from incubator/opentelemetry-sampler-aws-xray/test/rule-cache.test.ts rename to packages/sampler-aws-xray/test/rule-cache.test.ts diff --git a/incubator/opentelemetry-sampler-aws-xray/test/sampling-rule-applier.test.ts b/packages/sampler-aws-xray/test/sampling-rule-applier.test.ts similarity index 100% rename from incubator/opentelemetry-sampler-aws-xray/test/sampling-rule-applier.test.ts rename to packages/sampler-aws-xray/test/sampling-rule-applier.test.ts diff --git a/incubator/opentelemetry-sampler-aws-xray/test/sampling-rule.test.ts b/packages/sampler-aws-xray/test/sampling-rule.test.ts similarity index 100% rename from incubator/opentelemetry-sampler-aws-xray/test/sampling-rule.test.ts rename to packages/sampler-aws-xray/test/sampling-rule.test.ts diff --git a/incubator/opentelemetry-sampler-aws-xray/test/statistics.test.ts b/packages/sampler-aws-xray/test/statistics.test.ts similarity index 100% rename from incubator/opentelemetry-sampler-aws-xray/test/statistics.test.ts rename to packages/sampler-aws-xray/test/statistics.test.ts diff --git a/incubator/opentelemetry-sampler-aws-xray/test/utils.test.ts b/packages/sampler-aws-xray/test/utils.test.ts similarity index 100% rename from incubator/opentelemetry-sampler-aws-xray/test/utils.test.ts rename to packages/sampler-aws-xray/test/utils.test.ts diff --git a/incubator/opentelemetry-sampler-aws-xray/tsconfig.esm.json b/packages/sampler-aws-xray/tsconfig.esm.json similarity index 100% rename from incubator/opentelemetry-sampler-aws-xray/tsconfig.esm.json rename to packages/sampler-aws-xray/tsconfig.esm.json diff --git a/incubator/opentelemetry-sampler-aws-xray/tsconfig.json b/packages/sampler-aws-xray/tsconfig.json similarity index 100% rename from incubator/opentelemetry-sampler-aws-xray/tsconfig.json rename to packages/sampler-aws-xray/tsconfig.json From 6f428ec50f0e290fcb44d0a075fde40bf5859159 Mon Sep 17 00:00:00 2001 From: Jonathan Lee Date: Thu, 21 Aug 2025 11:51:07 -0700 Subject: [PATCH 2/7] update release-please and package-lock --- .release-please-manifest.json | 1 + package-lock.json | 94 +++++++++++++++++++++++++- packages/sampler-aws-xray/package.json | 2 +- release-please-config.json | 1 + 4 files changed, 95 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 64982fd4ec..b96672d407 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -15,6 +15,7 @@ "packages/id-generator-aws-xray": "2.0.0", "packages/propagation-utils": "0.31.3", "packages/redis-common": "0.38.0", + "packages/sampler-aws-xray": "0.0.1", "packages/sql-common": "0.41.0", "packages/contrib-test-utils": "0.49.0", "packages/winston-transport": "0.14.1", diff --git a/package-lock.json b/package-lock.json index 78752d0c0a..0685139970 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9298,6 +9298,10 @@ "@opentelemetry/api": ">=1.3.0 <1.10.0" } }, + "node_modules/@opentelemetry/sampler-aws-xray": { + "resolved": "packages/sampler-aws-xray", + "link": true + }, "node_modules/@opentelemetry/sdk-logs": { "version": "0.203.0", "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.203.0.tgz", @@ -33041,7 +33045,7 @@ "@aws-sdk/client-kinesis": "^3.85.0", "@aws-sdk/client-lambda": "^3.85.0", "@aws-sdk/client-s3": "^3.85.0", - "@aws-sdk/client-secrets-manager": "3.85.0", + "@aws-sdk/client-secrets-manager": "^3.85.0", "@aws-sdk/client-sns": "^3.85.0", "@aws-sdk/client-sqs": "^3.85.0", "@aws-sdk/types": "^3.370.0", @@ -36519,6 +36523,53 @@ "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", "dev": true }, + "packages/sampler-aws-xray": { + "name": "@opentelemetry/sampler-aws-xray", + "version": "0.0.1", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/core": "^2.0.0", + "@opentelemetry/resources": "^2.0.0", + "@opentelemetry/sdk-trace-base": "^2.0.0", + "@opentelemetry/semantic-conventions": "^1.27.0" + }, + "devDependencies": { + "@opentelemetry/api": "^1.9.0", + "@opentelemetry/sdk-trace-node": "^2.0.0", + "@types/mocha": "10.0.10", + "@types/node": "18.18.14", + "@types/sinon": "17.0.4", + "@typescript-eslint/eslint-plugin": "5.62.0", + "@typescript-eslint/parser": "5.62.0", + "eslint": "8.7.0", + "expect": "29.2.0", + "nock": "13.3.3", + "nyc": "17.1.0", + "sinon": "15.2.0", + "typescript": "5.0.4" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.9.0" + } + }, + "packages/sampler-aws-xray/node_modules/@types/node": { + "version": "18.18.14", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.14.tgz", + "integrity": "sha512-iSOeNeXYNYNLLOMDSVPvIFojclvMZ/HDY2dU17kUlcsOsSQETbWIslJbYLZgA+ox8g2XQwSHKTkght1a5X26lQ==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "packages/sampler-aws-xray/node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, "packages/sql-common": { "name": "@opentelemetry/sql-common", "version": "0.41.0", @@ -43821,7 +43872,7 @@ "@aws-sdk/client-kinesis": "^3.85.0", "@aws-sdk/client-lambda": "^3.85.0", "@aws-sdk/client-s3": "^3.85.0", - "@aws-sdk/client-secrets-manager": "3.85.0", + "@aws-sdk/client-secrets-manager": "^3.85.0", "@aws-sdk/client-sns": "^3.85.0", "@aws-sdk/client-sqs": "^3.85.0", "@aws-sdk/types": "^3.370.0", @@ -46699,6 +46750,45 @@ "@opentelemetry/semantic-conventions": "^1.29.0" } }, + "@opentelemetry/sampler-aws-xray": { + "version": "file:packages/sampler-aws-xray", + "requires": { + "@opentelemetry/api": "^1.9.0", + "@opentelemetry/core": "^2.0.0", + "@opentelemetry/resources": "^2.0.0", + "@opentelemetry/sdk-trace-base": "^2.0.0", + "@opentelemetry/sdk-trace-node": "^2.0.0", + "@opentelemetry/semantic-conventions": "^1.27.0", + "@types/mocha": "10.0.10", + "@types/node": "18.18.14", + "@types/sinon": "17.0.4", + "@typescript-eslint/eslint-plugin": "5.62.0", + "@typescript-eslint/parser": "5.62.0", + "eslint": "8.7.0", + "expect": "29.2.0", + "nock": "13.3.3", + "nyc": "17.1.0", + "sinon": "15.2.0", + "typescript": "5.0.4" + }, + "dependencies": { + "@types/node": { + "version": "18.18.14", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.14.tgz", + "integrity": "sha512-iSOeNeXYNYNLLOMDSVPvIFojclvMZ/HDY2dU17kUlcsOsSQETbWIslJbYLZgA+ox8g2XQwSHKTkght1a5X26lQ==", + "dev": true, + "requires": { + "undici-types": "~5.26.4" + } + }, + "undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + } + } + }, "@opentelemetry/sdk-logs": { "version": "0.203.0", "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.203.0.tgz", diff --git a/packages/sampler-aws-xray/package.json b/packages/sampler-aws-xray/package.json index 96c25e6dab..310b518500 100644 --- a/packages/sampler-aws-xray/package.json +++ b/packages/sampler-aws-xray/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/sampler-aws-xray", - "version": "0.1.0", + "version": "0.0.1", "description": "OpenTelemetry Remote Sampler for AWS X-Ray", "keywords": [ "aws", diff --git a/release-please-config.json b/release-please-config.json index 19fa95ede8..3b1e3943d4 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -22,6 +22,7 @@ "packages/id-generator-aws-xray": {}, "packages/propagation-utils": {}, "packages/redis-common": {}, + "packages/sampler-aws-xray": {}, "packages/sql-common": {}, "packages/contrib-test-utils": {}, "packages/winston-transport": {}, From afd20a8e80fcf0581621e82fd46ace3dee86b86e Mon Sep 17 00:00:00 2001 From: Jonathan Lee Date: Thu, 21 Aug 2025 12:16:35 -0700 Subject: [PATCH 3/7] Update readme, package.json, and fix lint --- packages/sampler-aws-xray/README.md | 2 +- packages/sampler-aws-xray/package.json | 16 +++++++++++++--- packages/sampler-aws-xray/src/remote-sampler.ts | 2 +- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/packages/sampler-aws-xray/README.md b/packages/sampler-aws-xray/README.md index 0bbb47fda9..27e0d7aff7 100644 --- a/packages/sampler-aws-xray/README.md +++ b/packages/sampler-aws-xray/README.md @@ -6,7 +6,7 @@ This module provides the remote/centralized sampler for AWS X-Ray. | Maturity | [Component Owner](../../.github/component_owners.yml) | Compatibility | | -------------------------------------- | ----------------------------------------------------- | --------------------- | -| [Stable](../../CONTRIBUTING.md#stable) | @jj22ee @yiyuan-he | API 1.0+
SDK 2.0+ | +| [Beta](../../CONTRIBUTING.md#beta) | @jj22ee @yiyuan-he | API 1.0+
SDK 2.0+ | ## Usage diff --git a/packages/sampler-aws-xray/package.json b/packages/sampler-aws-xray/package.json index 310b518500..07765fa024 100644 --- a/packages/sampler-aws-xray/package.json +++ b/packages/sampler-aws-xray/package.json @@ -10,6 +10,7 @@ "AWS", "X-Ray" ], + "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/sampler-aws-xray#readme", "license": "Apache-2.0", "author": "OpenTelemetry Authors", "bugs": { @@ -18,17 +19,26 @@ "main": "build/src/index.js", "types": "build/src/index.d.ts", "files": [ + "build/esm/**/*.js", + "build/esm/**/*.js.map", + "build/esm/**/*.d.ts", "build/src/**/*.js", "build/src/**/*.js.map", "build/src/**/*.d.ts", - "doc", "LICENSE", "README.md" ], - "repository": "open-telemetry/opentelemetry-js-contrib", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "https://github.com/open-telemetry/opentelemetry-js-contrib.git", + "directory": "packages/sampler-aws-xray" + }, "scripts": { "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json", - "compile": "tsc -p .", + "compile": "tsc --build tsconfig.json tsconfig.esm.json", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/sampler-aws-xray", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", diff --git a/packages/sampler-aws-xray/src/remote-sampler.ts b/packages/sampler-aws-xray/src/remote-sampler.ts index d6876bf60e..e68c9d0004 100644 --- a/packages/sampler-aws-xray/src/remote-sampler.ts +++ b/packages/sampler-aws-xray/src/remote-sampler.ts @@ -46,8 +46,8 @@ import { DEFAULT_TARGET_POLLING_INTERVAL_SECONDS, RuleCache, } from './rule-cache'; - import { SamplingRuleApplier } from './sampling-rule-applier'; +/** @knipignore */ import { PACKAGE_NAME } from './version'; // 5 minute default sampling rules polling interval From fec2ba52a6b7229801a34247385b2503c73b4878 Mon Sep 17 00:00:00 2001 From: Jonathan Lee Date: Thu, 21 Aug 2025 13:39:36 -0700 Subject: [PATCH 4/7] update @opentelemetry/api version compatibility --- package-lock.json | 21 ++++++++++++++++++--- packages/sampler-aws-xray/README.md | 2 +- packages/sampler-aws-xray/package.json | 4 ++-- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0685139970..3504c77302 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36534,7 +36534,7 @@ "@opentelemetry/semantic-conventions": "^1.27.0" }, "devDependencies": { - "@opentelemetry/api": "^1.9.0", + "@opentelemetry/api": "^1.1.0", "@opentelemetry/sdk-trace-node": "^2.0.0", "@types/mocha": "10.0.10", "@types/node": "18.18.14", @@ -36552,7 +36552,16 @@ "node": "^18.19.0 || >=20.6.0" }, "peerDependencies": { - "@opentelemetry/api": "^1.9.0" + "@opentelemetry/api": "^1.1.0" + } + }, + "packages/sampler-aws-xray/node_modules/@opentelemetry/api": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.1.0.tgz", + "integrity": "sha512-hf+3bwuBwtXsugA2ULBc95qxrOqP2pOekLz34BJhcAKawt94vfeNyUKpYc0lZQ/3sCP6LqRa7UAdHA7i5UODzQ==", + "dev": true, + "engines": { + "node": ">=8.0.0" } }, "packages/sampler-aws-xray/node_modules/@types/node": { @@ -46753,7 +46762,7 @@ "@opentelemetry/sampler-aws-xray": { "version": "file:packages/sampler-aws-xray", "requires": { - "@opentelemetry/api": "^1.9.0", + "@opentelemetry/api": "^1.1.0", "@opentelemetry/core": "^2.0.0", "@opentelemetry/resources": "^2.0.0", "@opentelemetry/sdk-trace-base": "^2.0.0", @@ -46772,6 +46781,12 @@ "typescript": "5.0.4" }, "dependencies": { + "@opentelemetry/api": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.1.0.tgz", + "integrity": "sha512-hf+3bwuBwtXsugA2ULBc95qxrOqP2pOekLz34BJhcAKawt94vfeNyUKpYc0lZQ/3sCP6LqRa7UAdHA7i5UODzQ==", + "dev": true + }, "@types/node": { "version": "18.18.14", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.14.tgz", diff --git a/packages/sampler-aws-xray/README.md b/packages/sampler-aws-xray/README.md index 27e0d7aff7..95fda2099b 100644 --- a/packages/sampler-aws-xray/README.md +++ b/packages/sampler-aws-xray/README.md @@ -6,7 +6,7 @@ This module provides the remote/centralized sampler for AWS X-Ray. | Maturity | [Component Owner](../../.github/component_owners.yml) | Compatibility | | -------------------------------------- | ----------------------------------------------------- | --------------------- | -| [Beta](../../CONTRIBUTING.md#beta) | @jj22ee @yiyuan-he | API 1.0+
SDK 2.0+ | +| [Beta](../../CONTRIBUTING.md#beta) | @jj22ee @yiyuan-he | API 1.1+
SDK 2.0+ | ## Usage diff --git a/packages/sampler-aws-xray/package.json b/packages/sampler-aws-xray/package.json index 07765fa024..40e37b5db5 100644 --- a/packages/sampler-aws-xray/package.json +++ b/packages/sampler-aws-xray/package.json @@ -49,7 +49,7 @@ "watch": "tsc --build --watch tsconfig.json tsconfig.esm.json" }, "peerDependencies": { - "@opentelemetry/api": "^1.9.0" + "@opentelemetry/api": "^1.1.0" }, "dependencies": { "@opentelemetry/core": "^2.0.0", @@ -58,7 +58,7 @@ "@opentelemetry/semantic-conventions": "^1.27.0" }, "devDependencies": { - "@opentelemetry/api": "^1.9.0", + "@opentelemetry/api": "^1.1.0", "@opentelemetry/sdk-trace-node": "^2.0.0", "@types/mocha": "10.0.10", "@types/node": "18.18.14", From 2e67e6d8400bed5966c4180b550fc8b795c2fad7 Mon Sep 17 00:00:00 2001 From: Jonathan Lee Date: Thu, 21 Aug 2025 14:03:32 -0700 Subject: [PATCH 5/7] update packages/sampler-aws-xray in component_owners --- .github/component_owners.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/component_owners.yml b/.github/component_owners.yml index 3324c301db..daf13c4254 100644 --- a/.github/component_owners.yml +++ b/.github/component_owners.yml @@ -16,7 +16,7 @@ components: # Unmaintained packages/resource-detector-instana: - kirrg001 - incubator/opentelemetry-sampler-aws-xray: + packages/sampler-aws-xray: - jj22ee - yiyuan-he packages/auto-configuration-propagators: From 10e9b6e1910876b12d7181e93d5be98c8e8689e8 Mon Sep 17 00:00:00 2001 From: Jonathan Lee Date: Sat, 13 Sep 2025 00:25:50 -0700 Subject: [PATCH 6/7] change initial version to 0.1.0 --- .release-please-manifest.json | 2 +- package-lock.json | 2 +- packages/sampler-aws-xray/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 30d94c1c8b..ec63ce8776 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -15,7 +15,7 @@ "packages/id-generator-aws-xray": "2.0.1", "packages/propagation-utils": "0.31.5", "packages/redis-common": "0.38.0", - "packages/sampler-aws-xray": "0.0.1", + "packages/sampler-aws-xray": "0.1.0", "packages/sql-common": "0.41.0", "packages/contrib-test-utils": "0.51.0", "packages/winston-transport": "0.16.0", diff --git a/package-lock.json b/package-lock.json index a49e67158a..885b27b91f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37203,7 +37203,7 @@ }, "packages/sampler-aws-xray": { "name": "@opentelemetry/sampler-aws-xray", - "version": "0.0.1", + "version": "0.1.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/core": "^2.0.0", diff --git a/packages/sampler-aws-xray/package.json b/packages/sampler-aws-xray/package.json index fe5df0f069..09fa70b7cb 100644 --- a/packages/sampler-aws-xray/package.json +++ b/packages/sampler-aws-xray/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/sampler-aws-xray", - "version": "0.0.1", + "version": "0.1.0", "description": "OpenTelemetry Remote Sampler for AWS X-Ray", "keywords": [ "aws", From 719395e9981e3febc986e6a2e8a9687a6d97fcc4 Mon Sep 17 00:00:00 2001 From: Jonathan Lee Date: Sat, 13 Sep 2025 01:06:25 -0700 Subject: [PATCH 7/7] fix lint for .eslintrc.js --- packages/sampler-aws-xray/.eslintrc.js | 29 +++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/packages/sampler-aws-xray/.eslintrc.js b/packages/sampler-aws-xray/.eslintrc.js index e198dc0f4d..81c16c7416 100644 --- a/packages/sampler-aws-xray/.eslintrc.js +++ b/packages/sampler-aws-xray/.eslintrc.js @@ -1,8 +1,23 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "commonjs": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + commonjs: true, + node: true, + }, + ...require('../../eslint.config.js'), +};