Skip to content

Commit

Permalink
feat: add support for API 1.1.x (#2737)
Browse files Browse the repository at this point in the history
  • Loading branch information
dyladan authored Jan 31, 2022
1 parent ce5f7f7 commit ee2342b
Show file tree
Hide file tree
Showing 19 changed files with 37 additions and 36 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/exporter-trace-otlp-grpc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/exporter-trace-otlp-http/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/exporter-trace-otlp-proto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions packages/opentelemetry-context-async-hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
}
}
4 changes: 2 additions & 2 deletions packages/opentelemetry-context-zone-peer-dep/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions packages/opentelemetry-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-exporter-jaeger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-exporter-zipkin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions packages/opentelemetry-propagator-b3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions packages/opentelemetry-propagator-jaeger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions packages/opentelemetry-resources/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions packages/opentelemetry-sdk-trace-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
13 changes: 7 additions & 6 deletions packages/opentelemetry-sdk-trace-base/src/BasicTracerProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@
*/

import {
TracerProvider,
trace,
context,
diag,
propagation,
TextMapPropagator,
diag,
trace,
TracerOptions,
TracerProvider,
} from '@opentelemetry/api';
import {
CompositePropagator,
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions packages/opentelemetry-sdk-trace-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions packages/opentelemetry-sdk-trace-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions packages/opentelemetry-shim-opentracing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions selenium-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit ee2342b

Please sign in to comment.