diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 82ba13b648..53d3d47385 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -71,7 +71,7 @@ jobs: if: steps.cache.outputs.cache-hit != 'true' run: | npm install --ignore-scripts - npx lerna bootstrap --no-ci --hoist --nohoist='zone.js' + npx lerna bootstrap --no-ci --hoist --nohoist='zone.js' --ignore @opentelemetry/selenium-tests - name: Build 🔧 run: | @@ -146,7 +146,7 @@ jobs: working-directory: experimental run: | npm install --ignore-scripts - npx lerna bootstrap --no-ci --hoist --nohoist='zone.js' --ignore @opentelemetry/selenium-tests + npx lerna bootstrap --no-ci --hoist --nohoist='zone.js' - name: Build 🔧 working-directory: experimental diff --git a/integration-tests/propagation-validation-server/package.json b/integration-tests/propagation-validation-server/package.json index 93617c1a6e..11ed7bfe1c 100644 --- a/integration-tests/propagation-validation-server/package.json +++ b/integration-tests/propagation-validation-server/package.json @@ -11,7 +11,7 @@ "compile": "tsc --build" }, "dependencies": { - "@opentelemetry/api": "~1.0.3", + "@opentelemetry/api": "~1.1.0", "@opentelemetry/context-async-hooks": "1.0.1", "@opentelemetry/core": "1.0.1", "@opentelemetry/sdk-trace-base": "1.0.1", diff --git a/packages/exporter-trace-otlp-grpc/package.json b/packages/exporter-trace-otlp-grpc/package.json index 1d136a0368..dba48e1593 100644 --- a/packages/exporter-trace-otlp-grpc/package.json +++ b/packages/exporter-trace-otlp-grpc/package.json @@ -48,7 +48,7 @@ }, "devDependencies": { "@babel/core": "7.16.0", - "@opentelemetry/api": "^1.0.3", + "@opentelemetry/api": "^1.1.0", "@types/mocha": "8.2.3", "@types/node": "14.17.33", "@types/sinon": "10.0.6", diff --git a/packages/exporter-trace-otlp-http/package.json b/packages/exporter-trace-otlp-http/package.json index 69d8e5a329..0b0821bcd1 100644 --- a/packages/exporter-trace-otlp-http/package.json +++ b/packages/exporter-trace-otlp-http/package.json @@ -61,7 +61,7 @@ }, "devDependencies": { "@babel/core": "7.16.0", - "@opentelemetry/api": "^1.0.3", + "@opentelemetry/api": "^1.1.0", "@types/mocha": "8.2.3", "@types/node": "14.17.33", "@types/sinon": "10.0.6", diff --git a/packages/exporter-trace-otlp-proto/package.json b/packages/exporter-trace-otlp-proto/package.json index 5fa58b260c..7e3a58e522 100644 --- a/packages/exporter-trace-otlp-proto/package.json +++ b/packages/exporter-trace-otlp-proto/package.json @@ -48,7 +48,7 @@ }, "devDependencies": { "@babel/core": "7.16.0", - "@opentelemetry/api": "^1.0.3", + "@opentelemetry/api": "^1.1.0", "@types/mocha": "8.2.3", "@types/node": "14.17.33", "@types/sinon": "10.0.6", diff --git a/packages/opentelemetry-context-async-hooks/package.json b/packages/opentelemetry-context-async-hooks/package.json index 05c5730772..6475a70d1e 100644 --- a/packages/opentelemetry-context-async-hooks/package.json +++ b/packages/opentelemetry-context-async-hooks/package.json @@ -42,7 +42,7 @@ "access": "public" }, "devDependencies": { - "@opentelemetry/api": "~1.0.3", + "@opentelemetry/api": "~1.1.0", "@types/mocha": "8.2.3", "@types/node": "14.17.33", "codecov": "3.8.3", @@ -53,6 +53,6 @@ "typescript": "4.4.4" }, "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.1.0" + "@opentelemetry/api": ">=1.0.0 <1.2.0" } } diff --git a/packages/opentelemetry-context-zone-peer-dep/package.json b/packages/opentelemetry-context-zone-peer-dep/package.json index 71029e1b78..42fd4db6eb 100644 --- a/packages/opentelemetry-context-zone-peer-dep/package.json +++ b/packages/opentelemetry-context-zone-peer-dep/package.json @@ -52,7 +52,7 @@ }, "devDependencies": { "@babel/core": "7.16.0", - "@opentelemetry/api": "~1.0.3", + "@opentelemetry/api": "~1.1.0", "@types/mocha": "8.2.3", "@types/node": "14.17.33", "@types/sinon": "10.0.6", @@ -79,7 +79,7 @@ "zone.js": "0.11.4" }, "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.1.0", + "@opentelemetry/api": ">=1.0.0 <1.2.0", "zone.js": "^0.10.2 || ^0.11.0" }, "sideEffects": false diff --git a/packages/opentelemetry-core/package.json b/packages/opentelemetry-core/package.json index fcaac4c362..1ef33933d9 100644 --- a/packages/opentelemetry-core/package.json +++ b/packages/opentelemetry-core/package.json @@ -62,7 +62,7 @@ "access": "public" }, "devDependencies": { - "@opentelemetry/api": "~1.0.3", + "@opentelemetry/api": "~1.1.0", "@types/mocha": "8.2.3", "@types/node": "14.17.33", "@types/sinon": "10.0.6", @@ -86,7 +86,7 @@ "webpack": "4.46.0" }, "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.1.0" + "@opentelemetry/api": ">=1.0.0 <1.2.0" }, "dependencies": { "@opentelemetry/semantic-conventions": "1.0.1" diff --git a/packages/opentelemetry-exporter-jaeger/package.json b/packages/opentelemetry-exporter-jaeger/package.json index d40f4d9c90..9194c1d987 100644 --- a/packages/opentelemetry-exporter-jaeger/package.json +++ b/packages/opentelemetry-exporter-jaeger/package.json @@ -42,7 +42,7 @@ "access": "public" }, "devDependencies": { - "@opentelemetry/api": "^1.0.3", + "@opentelemetry/api": "^1.1.0", "@opentelemetry/resources": "1.0.1", "@types/mocha": "8.2.3", "@types/node": "14.17.33", diff --git a/packages/opentelemetry-exporter-zipkin/package.json b/packages/opentelemetry-exporter-zipkin/package.json index 8f450ed956..2034e0a9fc 100644 --- a/packages/opentelemetry-exporter-zipkin/package.json +++ b/packages/opentelemetry-exporter-zipkin/package.json @@ -59,7 +59,7 @@ }, "devDependencies": { "@babel/core": "7.16.0", - "@opentelemetry/api": "^1.0.3", + "@opentelemetry/api": "^1.1.0", "@types/mocha": "8.2.3", "@types/node": "14.17.33", "@types/sinon": "10.0.6", diff --git a/packages/opentelemetry-propagator-b3/package.json b/packages/opentelemetry-propagator-b3/package.json index 830a0002f9..c143e3c7a2 100644 --- a/packages/opentelemetry-propagator-b3/package.json +++ b/packages/opentelemetry-propagator-b3/package.json @@ -52,10 +52,10 @@ "@opentelemetry/core": "1.0.1" }, "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.1.0" + "@opentelemetry/api": ">=1.0.0 <1.2.0" }, "devDependencies": { - "@opentelemetry/api": "~1.0.3", + "@opentelemetry/api": "~1.1.0", "@types/mocha": "8.2.3", "@types/node": "14.17.33", "codecov": "3.8.3", diff --git a/packages/opentelemetry-propagator-jaeger/package.json b/packages/opentelemetry-propagator-jaeger/package.json index aca7f476e7..90ea96fb05 100644 --- a/packages/opentelemetry-propagator-jaeger/package.json +++ b/packages/opentelemetry-propagator-jaeger/package.json @@ -49,7 +49,7 @@ "access": "public" }, "devDependencies": { - "@opentelemetry/api": "~1.0.3", + "@opentelemetry/api": "~1.1.0", "@types/mocha": "8.2.3", "@types/node": "14.17.33", "@types/sinon": "10.0.6", @@ -72,7 +72,7 @@ "webpack": "4.46.0" }, "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.1.0" + "@opentelemetry/api": ">=1.0.0 <1.2.0" }, "dependencies": { "@opentelemetry/core": "1.0.1" diff --git a/packages/opentelemetry-resources/package.json b/packages/opentelemetry-resources/package.json index f0c3f71a31..2a2840a639 100644 --- a/packages/opentelemetry-resources/package.json +++ b/packages/opentelemetry-resources/package.json @@ -57,7 +57,7 @@ "access": "public" }, "devDependencies": { - "@opentelemetry/api": "~1.0.3", + "@opentelemetry/api": "~1.1.0", "@types/mocha": "8.2.3", "@types/node": "14.17.33", "@types/sinon": "10.0.6", @@ -82,7 +82,7 @@ "webpack-merge": "5.8.0" }, "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.1.0" + "@opentelemetry/api": ">=1.0.0 <1.2.0" }, "dependencies": { "@opentelemetry/core": "1.0.1", diff --git a/packages/opentelemetry-sdk-trace-base/package.json b/packages/opentelemetry-sdk-trace-base/package.json index a2f38bb6ad..dd96d1e58f 100644 --- a/packages/opentelemetry-sdk-trace-base/package.json +++ b/packages/opentelemetry-sdk-trace-base/package.json @@ -60,7 +60,7 @@ "access": "public" }, "devDependencies": { - "@opentelemetry/api": "~1.0.3", + "@opentelemetry/api": "~1.1.0", "@types/mocha": "8.2.3", "@types/node": "14.17.33", "@types/sinon": "10.0.6", @@ -83,7 +83,7 @@ "webpack": "4.46.0" }, "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.1.0" + "@opentelemetry/api": ">=1.0.0 <1.2.0" }, "dependencies": { "@opentelemetry/core": "1.0.1", diff --git a/packages/opentelemetry-sdk-trace-base/src/BasicTracerProvider.ts b/packages/opentelemetry-sdk-trace-base/src/BasicTracerProvider.ts index b8bbbbec91..b7aab0949c 100644 --- a/packages/opentelemetry-sdk-trace-base/src/BasicTracerProvider.ts +++ b/packages/opentelemetry-sdk-trace-base/src/BasicTracerProvider.ts @@ -15,12 +15,13 @@ */ import { - TracerProvider, - trace, context, + diag, propagation, TextMapPropagator, - diag, + trace, + TracerOptions, + TracerProvider, } from '@opentelemetry/api'; import { CompositePropagator, @@ -90,10 +91,10 @@ export class BasicTracerProvider implements TracerProvider { } } - getTracer(name: string, version?: string): Tracer { - const key = `${name}@${version || ''}`; + getTracer(name: string, version?: string, options?: TracerOptions): Tracer { + const key = `${name}@${version || ''}:${options?.schemaUrl || ''}`; if (!this._tracers.has(key)) { - this._tracers.set(key, new Tracer({ name, version }, this._config, this)); + this._tracers.set(key, new Tracer({ name, version, schemaUrl: options?.schemaUrl }, this._config, this)); } // eslint-disable-next-line @typescript-eslint/no-non-null-assertion diff --git a/packages/opentelemetry-sdk-trace-node/package.json b/packages/opentelemetry-sdk-trace-node/package.json index b3c8c9431e..7825f39934 100644 --- a/packages/opentelemetry-sdk-trace-node/package.json +++ b/packages/opentelemetry-sdk-trace-node/package.json @@ -43,7 +43,7 @@ "access": "public" }, "devDependencies": { - "@opentelemetry/api": "~1.0.3", + "@opentelemetry/api": "~1.1.0", "@opentelemetry/resources": "1.0.1", "@opentelemetry/semantic-conventions": "1.0.1", "@types/mocha": "8.2.3", @@ -59,7 +59,7 @@ "typescript": "4.4.4" }, "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.1.0" + "@opentelemetry/api": ">=1.0.0 <1.2.0" }, "dependencies": { "@opentelemetry/context-async-hooks": "1.0.1", diff --git a/packages/opentelemetry-sdk-trace-web/package.json b/packages/opentelemetry-sdk-trace-web/package.json index 7e6ce6b66f..8ce5be94b5 100644 --- a/packages/opentelemetry-sdk-trace-web/package.json +++ b/packages/opentelemetry-sdk-trace-web/package.json @@ -54,7 +54,7 @@ }, "devDependencies": { "@babel/core": "7.16.0", - "@opentelemetry/api": "~1.0.3", + "@opentelemetry/api": "~1.1.0", "@opentelemetry/context-zone": "1.0.1", "@opentelemetry/propagator-b3": "1.0.1", "@opentelemetry/resources": "1.0.1", @@ -86,7 +86,7 @@ "webpack-merge": "5.8.0" }, "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.1.0" + "@opentelemetry/api": ">=1.0.0 <1.2.0" }, "dependencies": { "@opentelemetry/core": "1.0.1", diff --git a/packages/opentelemetry-shim-opentracing/package.json b/packages/opentelemetry-shim-opentracing/package.json index 4fd7c83dc1..0ca010cfa3 100644 --- a/packages/opentelemetry-shim-opentracing/package.json +++ b/packages/opentelemetry-shim-opentracing/package.json @@ -40,7 +40,7 @@ "access": "public" }, "devDependencies": { - "@opentelemetry/api": "~1.0.3", + "@opentelemetry/api": "~1.1.0", "@opentelemetry/propagator-b3": "1.0.1", "@opentelemetry/propagator-jaeger": "1.0.1", "@opentelemetry/sdk-trace-base": "1.0.1", @@ -54,7 +54,7 @@ "typescript": "4.4.4" }, "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.1.0" + "@opentelemetry/api": ">=1.0.0 <1.2.0" }, "dependencies": { "@opentelemetry/core": "1.0.1", diff --git a/selenium-tests/package.json b/selenium-tests/package.json index 6f01491f5b..b3e6d4e576 100644 --- a/selenium-tests/package.json +++ b/selenium-tests/package.json @@ -36,7 +36,7 @@ "@babel/plugin-proposal-decorators": "7.16.4", "@babel/plugin-transform-runtime": "7.16.4", "@babel/preset-env": "7.16.4", - "@opentelemetry/api": "^1.0.3", + "@opentelemetry/api": "^1.1.0", "babel-loader": "8.2.3", "babel-polyfill": "6.26.0", "browserstack-local": "1.4.8", @@ -53,7 +53,7 @@ "webpack-merge": "5.8.0" }, "peerDependencies": { - "@opentelemetry/api": "^1.0.3" + "@opentelemetry/api": "^1.1.0" }, "dependencies": { "@opentelemetry/context-zone-peer-dep": "1.0.1",