diff --git a/CHANGELOG.md b/CHANGELOG.md
index b2ba2d0c7f0..9b2a5bc5aa8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,8 @@ All notable changes to this project will be documented in this file.
### :rocket: (Enhancement)
+* feat(sdk-trace): re-export sdk-trace-base in sdk-trace-node and web [#3319](https://github.com/open-telemetry/opentelemetry-js/pull/3319) @legendecas
+
### :bug: (Bug Fix)
* fix(resources): fix EnvDetector throwing errors when attribute values contain spaces
diff --git a/README.md b/README.md
index d0d7dd65eb2..2c3e786c40e 100644
--- a/README.md
+++ b/README.md
@@ -394,13 +394,13 @@ Collector exporter packages and types are renamed:
[PR-1925](https://github.com/open-telemetry/opentelemetry-js/pull/1925) feat(diag-logger): part 2 - breaking changes - remove api.Logger, api.NoopLogger, core.LogLevel, core.ConsoleLogger
-- These PR's remove the previous ```Logger``` and ```LogLevel``` implementations and change the way you should use the replacement ```DiagLogger``` and ```DiagLogLevel```, below are simple examples of how to change your existing usages.
+- These PR's remove the previous `Logger` and `LogLevel` implementations and change the way you should use the replacement `DiagLogger` and `DiagLogLevel`, below are simple examples of how to change your existing usages.
#### Setting the global diagnostic logger
-The new global [```api.diag```](https://github.com/open-telemetry/opentelemetry-js-api/blob/main/src/api/diag.ts) provides the ability to set the global diagnostic logger ```setLogger()``` and logging level ```setLogLevel()```, it is also a ```DiagLogger``` implementation and should be directly to log diagnostic messages.
+The new global [`api.diag`](https://github.com/open-telemetry/opentelemetry-js/blob/main/api/src/api/diag.ts) provides the ability to set the global diagnostic logger `setLogger()` and logging level `setLogLevel()`, it is also a `DiagLogger` implementation and should be directly to log diagnostic messages.
-All included logger references have been removed in preference to using the global ```api.diag``` directly, so you no longer need to pass around the logger instance via function parameters or included as part of the configuration for a component.
+All included logger references have been removed in preference to using the global `api.diag` directly, so you no longer need to pass around the logger instance via function parameters or included as part of the configuration for a component.
```javascript
import { diag, DiagConsoleLogger, DiagLogLevel } from "@opentelemetry/api";
diff --git a/api/README.md b/api/README.md
index 363cfac1367..dc44969675e 100644
--- a/api/README.md
+++ b/api/README.md
@@ -15,7 +15,7 @@
-
+
@@ -132,9 +132,9 @@ Apache 2.0 - See [LICENSE][license-url] for more information.
[opentelemetry-js]: https://github.com/open-telemetry/opentelemetry-js
[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions
-[license-url]: https://github.com/open-telemetry/opentelemetry-js-api/blob/main/LICENSE
+[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/api/LICENSE
[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat
[npm-url]: https://www.npmjs.com/package/@opentelemetry/api
[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fapi.svg
-[docs-tracing]: https://github.com/open-telemetry/opentelemetry-js-api/blob/main/docs/tracing.md
-[docs-sdk-registration]: https://github.com/open-telemetry/opentelemetry-js-api/blob/main/docs/sdk-registration.md
+[docs-tracing]: https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/tracing.md
+[docs-sdk-registration]: https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/sdk-registration.md
diff --git a/api/package.json b/api/package.json
index 012fd629ef4..4fb085886db 100644
--- a/api/package.json
+++ b/api/package.json
@@ -10,7 +10,7 @@
"./build/esm/platform/index.js": "./build/esm/platform/browser/index.js",
"./build/src/platform/index.js": "./build/src/platform/browser/index.js"
},
- "repository": "https://github.com/open-telemetry/opentelemetry-js-api.git",
+ "repository": "open-telemetry/opentelemetry-js",
"scripts": {
"clean": "tsc --build --clean",
"codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../",
@@ -60,7 +60,7 @@
"access": "public"
},
"devDependencies": {
- "@types/mocha": "9.1.1",
+ "@types/mocha": "10.0.0",
"@types/node": "18.6.5",
"@types/sinon": "10.0.13",
"@types/webpack-env": "1.16.3",
diff --git a/api/docs/context.md b/doc/context.md
similarity index 100%
rename from api/docs/context.md
rename to doc/context.md
diff --git a/api/docs/library-author.md b/doc/library-author.md
similarity index 100%
rename from api/docs/library-author.md
rename to doc/library-author.md
diff --git a/api/docs/propagation.md b/doc/propagation.md
similarity index 100%
rename from api/docs/propagation.md
rename to doc/propagation.md
diff --git a/api/docs/sdk-registration.md b/doc/sdk-registration.md
similarity index 100%
rename from api/docs/sdk-registration.md
rename to doc/sdk-registration.md
diff --git a/api/docs/tracing.md b/doc/tracing.md
similarity index 100%
rename from api/docs/tracing.md
rename to doc/tracing.md
diff --git a/experimental/packages/api-logs/package.json b/experimental/packages/api-logs/package.json
index 25dc6509227..44955363e62 100644
--- a/experimental/packages/api-logs/package.json
+++ b/experimental/packages/api-logs/package.json
@@ -65,7 +65,7 @@
"@opentelemetry/api": "^1.0.0"
},
"devDependencies": {
- "@types/mocha": "9.1.1",
+ "@types/mocha": "10.0.0",
"@types/node": "18.6.5",
"@types/webpack-env": "1.16.3",
"codecov": "3.8.3",
diff --git a/experimental/packages/exporter-trace-otlp-grpc/package.json b/experimental/packages/exporter-trace-otlp-grpc/package.json
index a4b177ebb01..fb00a9d7b0e 100644
--- a/experimental/packages/exporter-trace-otlp-grpc/package.json
+++ b/experimental/packages/exporter-trace-otlp-grpc/package.json
@@ -50,7 +50,7 @@
"@babel/core": "7.16.0",
"@opentelemetry/api": "^1.0.0",
"@opentelemetry/otlp-exporter-base": "0.33.0",
- "@types/mocha": "9.1.1",
+ "@types/mocha": "10.0.0",
"@types/node": "18.6.5",
"@types/sinon": "10.0.13",
"codecov": "3.8.3",
diff --git a/experimental/packages/exporter-trace-otlp-http/README.md b/experimental/packages/exporter-trace-otlp-http/README.md
index 5afdf0d9e06..ef4259fcd1e 100644
--- a/experimental/packages/exporter-trace-otlp-http/README.md
+++ b/experimental/packages/exporter-trace-otlp-http/README.md
@@ -25,8 +25,10 @@ To see documentation and sample code for the metric exporter, see the [exporter-
The OTLPTraceExporter in Web expects the endpoint to end in `/v1/traces`.
```js
-import { BatchSpanProcessor } from '@opentelemetry/sdk-trace-base';
-import { WebTracerProvider } from '@opentelemetry/sdk-trace-web';
+import {
+ BatchSpanProcessor,
+ WebTracerProvider,
+} from '@opentelemetry/sdk-trace-web';
import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-http';
const collectorOptions = {
diff --git a/experimental/packages/exporter-trace-otlp-http/package.json b/experimental/packages/exporter-trace-otlp-http/package.json
index 4abc90ed7a3..2f07cb34362 100644
--- a/experimental/packages/exporter-trace-otlp-http/package.json
+++ b/experimental/packages/exporter-trace-otlp-http/package.json
@@ -65,7 +65,7 @@
"devDependencies": {
"@babel/core": "7.16.0",
"@opentelemetry/api": "^1.0.0",
- "@types/mocha": "9.1.1",
+ "@types/mocha": "10.0.0",
"@types/node": "18.6.5",
"@types/sinon": "10.0.13",
"@types/webpack-env": "1.16.3",
diff --git a/experimental/packages/exporter-trace-otlp-proto/package.json b/experimental/packages/exporter-trace-otlp-proto/package.json
index 271246ad008..83b387d958d 100644
--- a/experimental/packages/exporter-trace-otlp-proto/package.json
+++ b/experimental/packages/exporter-trace-otlp-proto/package.json
@@ -49,7 +49,7 @@
"devDependencies": {
"@babel/core": "7.16.0",
"@opentelemetry/api": "^1.0.0",
- "@types/mocha": "9.1.1",
+ "@types/mocha": "10.0.0",
"@types/node": "18.6.5",
"@types/sinon": "10.0.13",
"codecov": "3.8.3",
diff --git a/experimental/packages/opentelemetry-api-metrics/package.json b/experimental/packages/opentelemetry-api-metrics/package.json
index 3118cdb0193..2bc05ba2d9b 100644
--- a/experimental/packages/opentelemetry-api-metrics/package.json
+++ b/experimental/packages/opentelemetry-api-metrics/package.json
@@ -64,7 +64,7 @@
"@opentelemetry/api": "^1.0.0"
},
"devDependencies": {
- "@types/mocha": "9.1.1",
+ "@types/mocha": "10.0.0",
"@types/node": "18.6.5",
"@types/webpack-env": "1.16.3",
"codecov": "3.8.3",
diff --git a/experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/package.json b/experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/package.json
index 40d8fb7a356..d0b4b2054bc 100644
--- a/experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/package.json
+++ b/experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/package.json
@@ -50,7 +50,7 @@
"@babel/core": "7.16.0",
"@opentelemetry/api": "^1.0.0",
"@opentelemetry/api-metrics": "0.33.0",
- "@types/mocha": "9.1.1",
+ "@types/mocha": "10.0.0",
"@types/node": "18.6.5",
"@types/sinon": "10.0.13",
"codecov": "3.8.3",
diff --git a/experimental/packages/opentelemetry-exporter-metrics-otlp-http/package.json b/experimental/packages/opentelemetry-exporter-metrics-otlp-http/package.json
index 245bc38e36e..8cae41c8269 100644
--- a/experimental/packages/opentelemetry-exporter-metrics-otlp-http/package.json
+++ b/experimental/packages/opentelemetry-exporter-metrics-otlp-http/package.json
@@ -65,7 +65,7 @@
"devDependencies": {
"@babel/core": "7.16.0",
"@opentelemetry/api": "^1.0.0",
- "@types/mocha": "9.1.1",
+ "@types/mocha": "10.0.0",
"@types/node": "18.6.5",
"@types/sinon": "10.0.13",
"@types/webpack-env": "1.16.3",
diff --git a/experimental/packages/opentelemetry-exporter-metrics-otlp-proto/package.json b/experimental/packages/opentelemetry-exporter-metrics-otlp-proto/package.json
index 60f678472d9..45266a7df15 100644
--- a/experimental/packages/opentelemetry-exporter-metrics-otlp-proto/package.json
+++ b/experimental/packages/opentelemetry-exporter-metrics-otlp-proto/package.json
@@ -50,7 +50,7 @@
"@babel/core": "7.16.0",
"@opentelemetry/api": "^1.0.0",
"@opentelemetry/api-metrics": "0.33.0",
- "@types/mocha": "9.1.1",
+ "@types/mocha": "10.0.0",
"@types/node": "18.6.5",
"@types/sinon": "10.0.13",
"codecov": "3.8.3",
diff --git a/experimental/packages/opentelemetry-exporter-prometheus/package.json b/experimental/packages/opentelemetry-exporter-prometheus/package.json
index 0067320ed41..e45cdd33c6f 100644
--- a/experimental/packages/opentelemetry-exporter-prometheus/package.json
+++ b/experimental/packages/opentelemetry-exporter-prometheus/package.json
@@ -44,7 +44,7 @@
},
"devDependencies": {
"@opentelemetry/api": "^1.0.0",
- "@types/mocha": "9.1.1",
+ "@types/mocha": "10.0.0",
"@types/node": "18.6.5",
"@types/sinon": "10.0.13",
"codecov": "3.8.3",
diff --git a/experimental/packages/opentelemetry-instrumentation-fetch/README.md b/experimental/packages/opentelemetry-instrumentation-fetch/README.md
index 67ecbd6082a..2b5336be0b9 100644
--- a/experimental/packages/opentelemetry-instrumentation-fetch/README.md
+++ b/experimental/packages/opentelemetry-instrumentation-fetch/README.md
@@ -16,9 +16,11 @@ npm install --save @opentelemetry/instrumentation-fetch
## Usage
```js
-'use strict';
-import { ConsoleSpanExporter, SimpleSpanProcessor } from '@opentelemetry/sdk-trace-base';
-import { WebTracerProvider } from '@opentelemetry/sdk-trace-web';
+import {
+ ConsoleSpanExporter,
+ SimpleSpanProcessor,
+ WebTracerProvider,
+} from '@opentelemetry/sdk-trace-web';
import { FetchInstrumentation } from '@opentelemetry/instrumentation-fetch';
import { ZoneContextManager } from '@opentelemetry/context-zone';
import { registerInstrumentations } from '@opentelemetry/instrumentation';
diff --git a/experimental/packages/opentelemetry-instrumentation-fetch/package.json b/experimental/packages/opentelemetry-instrumentation-fetch/package.json
index d9448b1e6e0..03b44659b2a 100644
--- a/experimental/packages/opentelemetry-instrumentation-fetch/package.json
+++ b/experimental/packages/opentelemetry-instrumentation-fetch/package.json
@@ -59,7 +59,7 @@
"@opentelemetry/context-zone": "1.7.0",
"@opentelemetry/propagator-b3": "1.7.0",
"@opentelemetry/sdk-trace-base": "1.7.0",
- "@types/mocha": "9.1.1",
+ "@types/mocha": "10.0.0",
"@types/node": "18.6.5",
"@types/sinon": "10.0.13",
"@types/webpack-env": "1.16.3",
diff --git a/experimental/packages/opentelemetry-instrumentation-grpc/package.json b/experimental/packages/opentelemetry-instrumentation-grpc/package.json
index e2bcb44f1f0..90e683e23ba 100644
--- a/experimental/packages/opentelemetry-instrumentation-grpc/package.json
+++ b/experimental/packages/opentelemetry-instrumentation-grpc/package.json
@@ -52,7 +52,7 @@
"@opentelemetry/core": "1.7.0",
"@opentelemetry/sdk-trace-base": "1.7.0",
"@opentelemetry/sdk-trace-node": "1.7.0",
- "@types/mocha": "9.1.1",
+ "@types/mocha": "10.0.0",
"@types/node": "18.6.5",
"@types/semver": "7.3.9",
"@types/sinon": "10.0.13",
diff --git a/experimental/packages/opentelemetry-instrumentation-http/README.md b/experimental/packages/opentelemetry-instrumentation-http/README.md
index 5973ceb7960..312eb73bd76 100644
--- a/experimental/packages/opentelemetry-instrumentation-http/README.md
+++ b/experimental/packages/opentelemetry-instrumentation-http/README.md
@@ -24,8 +24,11 @@ To load a specific instrumentation (HTTP in this case), specify it in the Node T
```js
const { HttpInstrumentation } = require('@opentelemetry/instrumentation-http');
-const { ConsoleSpanExporter, SimpleSpanProcessor } = require('@opentelemetry/sdk-trace-base');
-const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node');
+const {
+ ConsoleSpanExporter,
+ NodeTracerProvider,
+ SimpleSpanProcessor,
+} = require('@opentelemetry/sdk-trace-node');
const { registerInstrumentations } = require('@opentelemetry/instrumentation');
const provider = new NodeTracerProvider();
diff --git a/experimental/packages/opentelemetry-instrumentation-http/package.json b/experimental/packages/opentelemetry-instrumentation-http/package.json
index f5aed8faea0..e46808bc917 100644
--- a/experimental/packages/opentelemetry-instrumentation-http/package.json
+++ b/experimental/packages/opentelemetry-instrumentation-http/package.json
@@ -50,7 +50,7 @@
"@opentelemetry/sdk-trace-base": "1.7.0",
"@opentelemetry/sdk-trace-node": "1.7.0",
"@types/got": "9.6.12",
- "@types/mocha": "9.1.1",
+ "@types/mocha": "10.0.0",
"@types/node": "18.6.5",
"@types/request-promise-native": "1.0.18",
"@types/semver": "7.3.9",
diff --git a/experimental/packages/opentelemetry-instrumentation-xml-http-request/README.md b/experimental/packages/opentelemetry-instrumentation-xml-http-request/README.md
index c02aa030d26..8c968694603 100644
--- a/experimental/packages/opentelemetry-instrumentation-xml-http-request/README.md
+++ b/experimental/packages/opentelemetry-instrumentation-xml-http-request/README.md
@@ -16,8 +16,11 @@ npm install --save @opentelemetry/instrumentation-xml-http-request
## Usage
```js
-import { ConsoleSpanExporter, SimpleSpanProcessor } from '@opentelemetry/sdk-trace-base';
-import { WebTracerProvider } from '@opentelemetry/sdk-trace-web';
+import {
+ ConsoleSpanExporter,
+ SimpleSpanProcessor,
+ WebTracerProvider,
+} from '@opentelemetry/sdk-trace-web';
import { XMLHttpRequestInstrumentation } from '@opentelemetry/instrumentation-xml-http-request';
import { ZoneContextManager } from '@opentelemetry/context-zone';
import { registerInstrumentations } from '@opentelemetry/instrumentation';
diff --git a/experimental/packages/opentelemetry-instrumentation-xml-http-request/package.json b/experimental/packages/opentelemetry-instrumentation-xml-http-request/package.json
index fa029f09f20..715097b6929 100644
--- a/experimental/packages/opentelemetry-instrumentation-xml-http-request/package.json
+++ b/experimental/packages/opentelemetry-instrumentation-xml-http-request/package.json
@@ -59,7 +59,7 @@
"@opentelemetry/context-zone": "1.7.0",
"@opentelemetry/propagator-b3": "1.7.0",
"@opentelemetry/sdk-trace-base": "1.7.0",
- "@types/mocha": "9.1.1",
+ "@types/mocha": "10.0.0",
"@types/node": "18.6.5",
"@types/sinon": "10.0.13",
"@types/webpack-env": "1.16.3",
diff --git a/experimental/packages/opentelemetry-instrumentation/package.json b/experimental/packages/opentelemetry-instrumentation/package.json
index e3ead29861b..102389ed517 100644
--- a/experimental/packages/opentelemetry-instrumentation/package.json
+++ b/experimental/packages/opentelemetry-instrumentation/package.json
@@ -79,7 +79,7 @@
"devDependencies": {
"@babel/core": "7.16.0",
"@opentelemetry/api": "^1.0.0",
- "@types/mocha": "9.1.1",
+ "@types/mocha": "10.0.0",
"@types/node": "18.6.5",
"@types/semver": "7.3.9",
"@types/shimmer": "1.0.2",
diff --git a/experimental/packages/opentelemetry-sdk-metrics/package.json b/experimental/packages/opentelemetry-sdk-metrics/package.json
index 6931480a4fe..0dbb0f9cae9 100644
--- a/experimental/packages/opentelemetry-sdk-metrics/package.json
+++ b/experimental/packages/opentelemetry-sdk-metrics/package.json
@@ -56,7 +56,7 @@
"devDependencies": {
"@opentelemetry/api": "^1.0.0",
"@types/lodash.merge": "4.6.6",
- "@types/mocha": "9.1.1",
+ "@types/mocha": "10.0.0",
"@types/node": "18.6.5",
"@types/sinon": "10.0.13",
"codecov": "3.8.3",
diff --git a/experimental/packages/opentelemetry-sdk-node/package.json b/experimental/packages/opentelemetry-sdk-node/package.json
index 763e1be9aaa..b531360e897 100644
--- a/experimental/packages/opentelemetry-sdk-node/package.json
+++ b/experimental/packages/opentelemetry-sdk-node/package.json
@@ -64,7 +64,7 @@
"devDependencies": {
"@opentelemetry/api": ">=1.0.0 <1.3.0",
"@opentelemetry/context-async-hooks": "1.7.0",
- "@types/mocha": "9.1.1",
+ "@types/mocha": "10.0.0",
"@types/node": "18.6.5",
"@types/semver": "7.3.9",
"@types/sinon": "10.0.13",
diff --git a/experimental/packages/otlp-exporter-base/package.json b/experimental/packages/otlp-exporter-base/package.json
index 63c86f9d33f..bca5ca1f2f2 100644
--- a/experimental/packages/otlp-exporter-base/package.json
+++ b/experimental/packages/otlp-exporter-base/package.json
@@ -65,7 +65,7 @@
},
"devDependencies": {
"@opentelemetry/api": "^1.0.0",
- "@types/mocha": "9.1.1",
+ "@types/mocha": "10.0.0",
"@types/node": "18.6.5",
"@types/sinon": "10.0.13",
"codecov": "3.8.3",
diff --git a/experimental/packages/otlp-grpc-exporter-base/package.json b/experimental/packages/otlp-grpc-exporter-base/package.json
index 3f73103f335..7f29e1be4f6 100644
--- a/experimental/packages/otlp-grpc-exporter-base/package.json
+++ b/experimental/packages/otlp-grpc-exporter-base/package.json
@@ -54,7 +54,7 @@
"@opentelemetry/otlp-transformer": "0.33.0",
"@opentelemetry/resources": "1.7.0",
"@opentelemetry/sdk-trace-base": "1.7.0",
- "@types/mocha": "9.1.1",
+ "@types/mocha": "10.0.0",
"@types/node": "18.6.5",
"@types/sinon": "10.0.13",
"codecov": "3.8.3",
diff --git a/experimental/packages/otlp-proto-exporter-base/package.json b/experimental/packages/otlp-proto-exporter-base/package.json
index bdb36606388..d41a554e104 100644
--- a/experimental/packages/otlp-proto-exporter-base/package.json
+++ b/experimental/packages/otlp-proto-exporter-base/package.json
@@ -46,7 +46,7 @@
"devDependencies": {
"@babel/core": "7.16.0",
"@opentelemetry/api": "^1.0.0",
- "@types/mocha": "9.1.1",
+ "@types/mocha": "10.0.0",
"@types/node": "18.6.5",
"@types/sinon": "10.0.13",
"codecov": "3.8.3",
diff --git a/experimental/packages/otlp-transformer/package.json b/experimental/packages/otlp-transformer/package.json
index f91adbb1c26..5b24ff3971b 100644
--- a/experimental/packages/otlp-transformer/package.json
+++ b/experimental/packages/otlp-transformer/package.json
@@ -56,7 +56,7 @@
},
"devDependencies": {
"@opentelemetry/api": ">=1.0.0 <1.3.0",
- "@types/mocha": "9.1.1",
+ "@types/mocha": "10.0.0",
"@types/webpack-env": "1.16.3",
"codecov": "3.8.3",
"istanbul-instrumenter-loader": "3.0.1",
diff --git a/packages/opentelemetry-context-async-hooks/package.json b/packages/opentelemetry-context-async-hooks/package.json
index 7ab2edb96ba..7a9385f8ce3 100644
--- a/packages/opentelemetry-context-async-hooks/package.json
+++ b/packages/opentelemetry-context-async-hooks/package.json
@@ -45,7 +45,7 @@
},
"devDependencies": {
"@opentelemetry/api": ">=1.0.0 <1.3.0",
- "@types/mocha": "9.1.1",
+ "@types/mocha": "10.0.0",
"@types/node": "18.6.5",
"codecov": "3.8.3",
"mocha": "10.0.0",
diff --git a/packages/opentelemetry-context-zone-peer-dep/README.md b/packages/opentelemetry-context-zone-peer-dep/README.md
index e8c08b74c91..a505b9fbdda 100644
--- a/packages/opentelemetry-context-zone-peer-dep/README.md
+++ b/packages/opentelemetry-context-zone-peer-dep/README.md
@@ -20,8 +20,11 @@ npm install --save @opentelemetry/context-zone-peer-dep
```js
import { context, trace } from '@opentelemetry/api';
-import { ConsoleSpanExporter, SimpleSpanProcessor } from '@opentelemetry/sdk-trace-base';
-import { WebTracerProvider } from '@opentelemetry/sdk-trace-web';
+import {
+ ConsoleSpanExporter,
+ SimpleSpanProcessor,
+ WebTracerProvider,
+} from '@opentelemetry/sdk-trace-web';
import { ZoneContextManager } from '@opentelemetry/context-zone-peer-dep';
const providerWithZone = new WebTracerProvider();
diff --git a/packages/opentelemetry-context-zone-peer-dep/package.json b/packages/opentelemetry-context-zone-peer-dep/package.json
index c69038e0dea..550f3adc639 100644
--- a/packages/opentelemetry-context-zone-peer-dep/package.json
+++ b/packages/opentelemetry-context-zone-peer-dep/package.json
@@ -55,7 +55,7 @@
"devDependencies": {
"@babel/core": "7.16.0",
"@opentelemetry/api": ">=1.0.0 <1.3.0",
- "@types/mocha": "9.1.1",
+ "@types/mocha": "10.0.0",
"@types/node": "18.6.5",
"@types/sinon": "10.0.13",
"@types/webpack-env": "1.16.3",
diff --git a/packages/opentelemetry-context-zone/README.md b/packages/opentelemetry-context-zone/README.md
index 19ba5309017..0162f9645d1 100644
--- a/packages/opentelemetry-context-zone/README.md
+++ b/packages/opentelemetry-context-zone/README.md
@@ -17,8 +17,11 @@ npm install --save @opentelemetry/context-zone
```js
import { context, trace } from '@opentelemetry/api';
-import { ConsoleSpanExporter, SimpleSpanProcessor } from '@opentelemetry/sdk-trace-base';
-import { WebTracerProvider } from '@opentelemetry/sdk-trace-web';
+import {
+ ConsoleSpanExporter,
+ SimpleSpanProcessor,
+ WebTracerProvider,
+} from '@opentelemetry/sdk-trace-web';
import { ZoneContextManager } from '@opentelemetry/context-zone';
const providerWithZone = new WebTracerProvider();
diff --git a/packages/opentelemetry-context-zone/package.json b/packages/opentelemetry-context-zone/package.json
index d8eec0d82bd..acfe75bec9e 100644
--- a/packages/opentelemetry-context-zone/package.json
+++ b/packages/opentelemetry-context-zone/package.json
@@ -51,7 +51,7 @@
},
"devDependencies": {
"@babel/core": "7.16.0",
- "@types/mocha": "9.1.1",
+ "@types/mocha": "10.0.0",
"@types/node": "18.6.5",
"@types/sinon": "10.0.13",
"@types/webpack-env": "1.16.3",
diff --git a/packages/opentelemetry-core/package.json b/packages/opentelemetry-core/package.json
index 0232d624698..31412164ec4 100644
--- a/packages/opentelemetry-core/package.json
+++ b/packages/opentelemetry-core/package.json
@@ -65,7 +65,7 @@
},
"devDependencies": {
"@opentelemetry/api": ">=1.0.0 <1.3.0",
- "@types/mocha": "9.1.1",
+ "@types/mocha": "10.0.0",
"@types/node": "18.6.5",
"@types/sinon": "10.0.13",
"@types/webpack-env": "1.16.3",
diff --git a/packages/opentelemetry-exporter-jaeger/package.json b/packages/opentelemetry-exporter-jaeger/package.json
index d16251d86cf..dc926c56958 100644
--- a/packages/opentelemetry-exporter-jaeger/package.json
+++ b/packages/opentelemetry-exporter-jaeger/package.json
@@ -46,7 +46,7 @@
"devDependencies": {
"@opentelemetry/api": "^1.0.0",
"@opentelemetry/resources": "1.7.0",
- "@types/mocha": "9.1.1",
+ "@types/mocha": "10.0.0",
"@types/node": "18.6.5",
"@types/sinon": "10.0.13",
"codecov": "3.8.3",
diff --git a/packages/opentelemetry-exporter-zipkin/package.json b/packages/opentelemetry-exporter-zipkin/package.json
index 8cdc04dc7dc..15ce13dbc4d 100644
--- a/packages/opentelemetry-exporter-zipkin/package.json
+++ b/packages/opentelemetry-exporter-zipkin/package.json
@@ -62,7 +62,7 @@
"devDependencies": {
"@babel/core": "7.16.0",
"@opentelemetry/api": "^1.0.0",
- "@types/mocha": "9.1.1",
+ "@types/mocha": "10.0.0",
"@types/node": "18.6.5",
"@types/sinon": "10.0.13",
"@types/webpack-env": "1.16.3",
diff --git a/packages/opentelemetry-propagator-b3/package.json b/packages/opentelemetry-propagator-b3/package.json
index 60d74a7aeff..97e44060c84 100644
--- a/packages/opentelemetry-propagator-b3/package.json
+++ b/packages/opentelemetry-propagator-b3/package.json
@@ -58,7 +58,7 @@
},
"devDependencies": {
"@opentelemetry/api": ">=1.0.0 <1.3.0",
- "@types/mocha": "9.1.1",
+ "@types/mocha": "10.0.0",
"@types/node": "18.6.5",
"codecov": "3.8.3",
"istanbul-instrumenter-loader": "3.0.1",
diff --git a/packages/opentelemetry-propagator-jaeger/package.json b/packages/opentelemetry-propagator-jaeger/package.json
index fded1312452..c85137a3d1f 100644
--- a/packages/opentelemetry-propagator-jaeger/package.json
+++ b/packages/opentelemetry-propagator-jaeger/package.json
@@ -55,7 +55,7 @@
},
"devDependencies": {
"@opentelemetry/api": ">=1.0.0 <1.3.0",
- "@types/mocha": "9.1.1",
+ "@types/mocha": "10.0.0",
"@types/node": "18.6.5",
"@types/sinon": "10.0.13",
"@types/webpack-env": "1.16.3",
diff --git a/packages/opentelemetry-resources/package.json b/packages/opentelemetry-resources/package.json
index ed7964a0196..e834d693a18 100644
--- a/packages/opentelemetry-resources/package.json
+++ b/packages/opentelemetry-resources/package.json
@@ -62,7 +62,7 @@
},
"devDependencies": {
"@opentelemetry/api": ">=1.0.0 <1.3.0",
- "@types/mocha": "9.1.1",
+ "@types/mocha": "10.0.0",
"@types/node": "18.6.5",
"@types/sinon": "10.0.13",
"@types/webpack-env": "1.16.3",
diff --git a/packages/opentelemetry-sdk-trace-base/README.md b/packages/opentelemetry-sdk-trace-base/README.md
index c4a40cc6f50..6d7b6558943 100644
--- a/packages/opentelemetry-sdk-trace-base/README.md
+++ b/packages/opentelemetry-sdk-trace-base/README.md
@@ -57,10 +57,12 @@ Samples every trace regardless of upstream sampling decisions.
> This is used as a default Sampler
```js
-const { NodeTracerProvider } = require("@opentelemetry/sdk-trace-node");
-const { AlwaysOnSampler } = require("@opentelemetry/core");
+const {
+ AlwaysOnSampler,
+ BasicTracerProvider,
+} = require("@opentelemetry/sdk-trace-base");
-const tracerProvider = new NodeTracerProvider({
+const tracerProvider = new BasicTracerProvider({
sampler: new AlwaysOnSampler()
});
```
@@ -70,10 +72,12 @@ const tracerProvider = new NodeTracerProvider({
Doesn't sample any trace, regardless of upstream sampling decisions.
```js
-const { NodeTracerProvider } = require("@opentelemetry/sdk-trace-node");
-const { AlwaysOffSampler } = require("@opentelemetry/core");
+const {
+ AlwaysOffSampler,
+ BasicTracerProvider,
+} = require("@opentelemetry/sdk-trace-base");
-const tracerProvider = new NodeTracerProvider({
+const tracerProvider = new BasicTracerProvider({
sampler: new AlwaysOffSampler()
});
```
@@ -86,10 +90,12 @@ Any trace that would be sampled at a given percentage will also be sampled at an
The `TraceIDRatioSampler` may be used with the `ParentBasedSampler` to respect the sampled flag of an incoming trace.
```js
-const { NodeTracerProvider } = require("@opentelemetry/sdk-trace-node");
-const { TraceIdRatioBasedSampler } = require("@opentelemetry/core");
+const {
+ BasicTracerProvider,
+ TraceIdRatioBasedSampler,
+} = require("@opentelemetry/sdk-trace-base");
-const tracerProvider = new NodeTracerProvider({
+const tracerProvider = new BasicTracerProvider({
// See details of ParentBasedSampler below
sampler: new ParentBasedSampler({
// Trace ID Ratio Sampler accepts a positional argument
@@ -130,10 +136,14 @@ Optional parameters:
|present|false|false|`localParentNotSampled()`|
```js
-const { NodeTracerProvider } = require("@opentelemetry/sdk-trace-node");
-const { ParentBasedSampler, AlwaysOffSampler, TraceIdRatioBasedSampler } = require("@opentelemetry/core");
-
-const tracerProvider = new NodeTracerProvider({
+const {
+ AlwaysOffSampler,
+ BasicTracerProvider,
+ ParentBasedSampler,
+ TraceIdRatioBasedSampler,
+} = require("@opentelemetry/sdk-trace-base");
+
+const tracerProvider = new BasicTracerProvider({
sampler: new ParentBasedSampler({
// By default, the ParentBasedSampler will respect the parent span's sampling
// decision. This is configurable by providing a different sampler to use
diff --git a/packages/opentelemetry-sdk-trace-base/package.json b/packages/opentelemetry-sdk-trace-base/package.json
index 970c8b5c831..5c8e879958a 100644
--- a/packages/opentelemetry-sdk-trace-base/package.json
+++ b/packages/opentelemetry-sdk-trace-base/package.json
@@ -65,7 +65,7 @@
},
"devDependencies": {
"@opentelemetry/api": ">=1.0.0 <1.3.0",
- "@types/mocha": "9.1.1",
+ "@types/mocha": "10.0.0",
"@types/node": "18.6.5",
"@types/sinon": "10.0.13",
"@types/webpack-env": "1.16.3",
diff --git a/packages/opentelemetry-sdk-trace-node/README.md b/packages/opentelemetry-sdk-trace-node/README.md
index 417a3804054..c54d11e04af 100644
--- a/packages/opentelemetry-sdk-trace-node/README.md
+++ b/packages/opentelemetry-sdk-trace-node/README.md
@@ -117,6 +117,6 @@ Apache 2.0 - See [LICENSE][license-url] for more information.
[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions
[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE
[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat
-[def-context]: https://github.com/open-telemetry/opentelemetry-js-api/blob/main/docs/context.md
+[def-context]: https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/context.md
[npm-url]: https://www.npmjs.com/package/@opentelemetry/sdk-trace-node
[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fsdk-trace-node.svg
diff --git a/packages/opentelemetry-sdk-trace-node/package.json b/packages/opentelemetry-sdk-trace-node/package.json
index 91c1dc5035d..0c5b86ba7a8 100644
--- a/packages/opentelemetry-sdk-trace-node/package.json
+++ b/packages/opentelemetry-sdk-trace-node/package.json
@@ -48,7 +48,7 @@
"@opentelemetry/api": ">=1.0.0 <1.3.0",
"@opentelemetry/resources": "1.7.0",
"@opentelemetry/semantic-conventions": "1.7.0",
- "@types/mocha": "9.1.1",
+ "@types/mocha": "10.0.0",
"@types/node": "18.6.5",
"@types/semver": "7.3.9",
"@types/sinon": "10.0.13",
diff --git a/packages/opentelemetry-sdk-trace-node/src/index.ts b/packages/opentelemetry-sdk-trace-node/src/index.ts
index 44e347c09ea..8f6c5b9311d 100644
--- a/packages/opentelemetry-sdk-trace-node/src/index.ts
+++ b/packages/opentelemetry-sdk-trace-node/src/index.ts
@@ -16,3 +16,4 @@
export { NodeTracerConfig } from './config';
export * from './NodeTracerProvider';
+export * from '@opentelemetry/sdk-trace-base';
diff --git a/packages/opentelemetry-sdk-trace-web/README.md b/packages/opentelemetry-sdk-trace-web/README.md
index cd7e448e676..8eccf7fc135 100644
--- a/packages/opentelemetry-sdk-trace-web/README.md
+++ b/packages/opentelemetry-sdk-trace-web/README.md
@@ -31,8 +31,11 @@ npm install --save @opentelemetry/sdk-trace-web
## Usage
```js
-import { ConsoleSpanExporter, SimpleSpanProcessor } from '@opentelemetry/sdk-trace-base';
-import { WebTracerProvider } from '@opentelemetry/sdk-trace-web';
+import {
+ ConsoleSpanExporter,
+ SimpleSpanProcessor,
+ WebTracerProvider,
+} from '@opentelemetry/sdk-trace-web';
import { DocumentLoad } from '@opentelemetry/plugin-document-load';
import { ZoneContextManager } from '@opentelemetry/context-zone';
import { registerInstrumentations } from '@opentelemetry/instrumentation';
diff --git a/packages/opentelemetry-sdk-trace-web/package.json b/packages/opentelemetry-sdk-trace-web/package.json
index ace6d3108bc..3c8d18b65be 100644
--- a/packages/opentelemetry-sdk-trace-web/package.json
+++ b/packages/opentelemetry-sdk-trace-web/package.json
@@ -61,7 +61,7 @@
"@opentelemetry/propagator-b3": "1.7.0",
"@opentelemetry/resources": "1.7.0",
"@types/jquery": "3.5.8",
- "@types/mocha": "9.1.1",
+ "@types/mocha": "10.0.0",
"@types/node": "18.6.5",
"@types/sinon": "10.0.13",
"@types/webpack-env": "1.16.3",
diff --git a/packages/opentelemetry-sdk-trace-web/src/index.ts b/packages/opentelemetry-sdk-trace-web/src/index.ts
index a506be00cee..d7bfeaf382c 100644
--- a/packages/opentelemetry-sdk-trace-web/src/index.ts
+++ b/packages/opentelemetry-sdk-trace-web/src/index.ts
@@ -19,3 +19,4 @@ export * from './StackContextManager';
export * from './enums/PerformanceTimingNames';
export * from './types';
export * from './utils';
+export * from '@opentelemetry/sdk-trace-base';
diff --git a/packages/opentelemetry-semantic-conventions/package.json b/packages/opentelemetry-semantic-conventions/package.json
index 6d0cb6227ae..b9e59edd16f 100644
--- a/packages/opentelemetry-semantic-conventions/package.json
+++ b/packages/opentelemetry-semantic-conventions/package.json
@@ -49,7 +49,7 @@
"access": "public"
},
"devDependencies": {
- "@types/mocha": "9.1.1",
+ "@types/mocha": "10.0.0",
"@types/node": "18.6.5",
"@types/sinon": "10.0.13",
"codecov": "3.8.3",
diff --git a/packages/opentelemetry-shim-opentracing/package.json b/packages/opentelemetry-shim-opentracing/package.json
index 795b7a9becf..51ea010f0f6 100644
--- a/packages/opentelemetry-shim-opentracing/package.json
+++ b/packages/opentelemetry-shim-opentracing/package.json
@@ -46,7 +46,7 @@
"@opentelemetry/propagator-b3": "1.7.0",
"@opentelemetry/propagator-jaeger": "1.7.0",
"@opentelemetry/sdk-trace-base": "1.7.0",
- "@types/mocha": "9.1.1",
+ "@types/mocha": "10.0.0",
"@types/node": "18.6.5",
"codecov": "3.8.3",
"mocha": "10.0.0",