Skip to content

Commit

Permalink
Merge branch 'master' into metrics-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
obecny committed Dec 2, 2020
2 parents c7826f1 + b22ca63 commit 1e6ab7c
Show file tree
Hide file tree
Showing 34 changed files with 51 additions and 43 deletions.
2 changes: 1 addition & 1 deletion packages/opentelemetry-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"nyc": "15.1.0",
"sinon": "9.2.1",
"ts-loader": "8.0.11",
"ts-mocha": "7.0.0",
"ts-mocha": "8.0.0",
"typedoc": "0.19.2",
"typescript": "3.9.7",
"webpack": "4.44.2"
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-context-async-hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"mocha": "7.2.0",
"nyc": "15.1.0",
"rimraf": "3.0.2",
"ts-mocha": "7.0.0",
"ts-mocha": "8.0.0",
"ts-node": "9.0.0",
"typescript": "3.9.7"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-context-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"mocha": "7.2.0",
"nyc": "15.1.0",
"rimraf": "3.0.2",
"ts-mocha": "7.0.0",
"ts-mocha": "8.0.0",
"ts-node": "9.0.0",
"typescript": "3.9.7"
}
Expand Down
8 changes: 5 additions & 3 deletions packages/opentelemetry-context-zone-peer-dep/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,17 @@ npm install --save @opentelemetry/context-zone-peer-dep

```js
import { ConsoleSpanExporter, SimpleSpanProcessor } from '@opentelemetry/tracing';
import { WebTracer } from '@opentelemetry/web';
import { WebTracerProvider } from '@opentelemetry/web';
import { ZoneContextManager } from '@opentelemetry/context-zone-peer-dep';

const webTracerWithZone = new WebTracer({
const providerWithZone = new WebTracerProvider();
providerWithZone.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter()));
providerWithZone.register({
contextManager: new ZoneContextManager()
});
webTracerWithZone.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter()));

// Example how the ZoneContextManager keeps the reference to the correct context during async operations
const webTracerWithZone = providerWithZone.getTracer('default');
const span1 = webTracerWithZone.startSpan('foo1');
webTracerWithZone.withSpan(span1, () => {
console.log('Current span is span1', webTracerWithZone.getCurrentSpan() === span1);
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-context-zone-peer-dep/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"rimraf": "3.0.2",
"sinon": "9.2.1",
"ts-loader": "8.0.11",
"ts-mocha": "7.0.0",
"ts-mocha": "8.0.0",
"ts-node": "9.0.0",
"typescript": "3.9.7",
"webpack": "4.44.2",
Expand Down
8 changes: 5 additions & 3 deletions packages/opentelemetry-context-zone/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,17 @@ npm install --save @opentelemetry/context-zone

```js
import { ConsoleSpanExporter, SimpleSpanProcessor } from '@opentelemetry/tracing';
import { WebTracer } from '@opentelemetry/web';
import { WebTracerProvider } from '@opentelemetry/web';
import { ZoneContextManager } from '@opentelemetry/context-zone';

const webTracerWithZone = new WebTracer({
const providerWithZone = new WebTracerProvider();
providerWithZone.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter()));
provider.register({
contextManager: new ZoneContextManager()
});
webTracerWithZone.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter()));

// Example how the ZoneContextManager keeps the reference to the correct context during async operations
const webTracerWithZone = providerWithZone.getTracer('default');
const span1 = webTracerWithZone.startSpan('foo1');
webTracerWithZone.withSpan(span1, () => {
console.log('Current span is span1', webTracerWithZone.getCurrentSpan() === span1);
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-context-zone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"rimraf": "3.0.2",
"sinon": "9.2.1",
"ts-loader": "8.0.11",
"ts-mocha": "7.0.0",
"ts-mocha": "8.0.0",
"ts-node": "9.0.0",
"typescript": "3.9.7",
"webpack": "4.44.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"rimraf": "3.0.2",
"sinon": "9.2.1",
"ts-loader": "8.0.11",
"ts-mocha": "7.0.0",
"ts-mocha": "8.0.0",
"ts-node": "9.0.0",
"typescript": "3.9.7",
"webpack": "4.44.2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"rimraf": "3.0.2",
"sinon": "9.2.1",
"ts-loader": "8.0.11",
"ts-mocha": "7.0.0",
"ts-mocha": "8.0.0",
"ts-node": "9.0.0",
"typescript": "3.9.7"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"rimraf": "3.0.2",
"sinon": "9.2.1",
"ts-loader": "8.0.11",
"ts-mocha": "7.0.0",
"ts-mocha": "8.0.0",
"ts-node": "9.0.0",
"typescript": "3.9.7"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-exporter-collector/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"rimraf": "3.0.2",
"sinon": "9.2.1",
"ts-loader": "8.0.11",
"ts-mocha": "7.0.0",
"ts-mocha": "8.0.0",
"ts-node": "9.0.0",
"typescript": "3.9.7",
"webpack": "4.44.2",
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 @@ -53,7 +53,7 @@
"nyc": "15.1.0",
"rimraf": "3.0.2",
"sinon": "9.2.1",
"ts-mocha": "7.0.0",
"ts-mocha": "8.0.0",
"ts-node": "9.0.0",
"typescript": "3.9.7"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-exporter-prometheus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"mocha": "7.2.0",
"nyc": "15.1.0",
"rimraf": "3.0.2",
"ts-mocha": "7.0.0",
"ts-mocha": "8.0.0",
"ts-node": "9.0.0",
"typescript": "3.9.7"
},
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 @@ -69,7 +69,7 @@
"rimraf": "3.0.2",
"sinon": "9.2.1",
"ts-loader": "8.0.11",
"ts-mocha": "7.0.0",
"ts-mocha": "8.0.0",
"ts-node": "9.0.0",
"typescript": "3.9.7",
"webpack": "4.44.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-grpc-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"rimraf": "3.0.2",
"semver": "7.3.2",
"sinon": "9.2.1",
"ts-mocha": "7.0.0",
"ts-mocha": "8.0.0",
"ts-node": "9.0.0",
"typescript": "3.9.7"
},
Expand Down
16 changes: 10 additions & 6 deletions packages/opentelemetry-instrumentation-xml-http-request/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,36 @@ npm install --save @opentelemetry/instrumentation-xml-http-request

```js
import { ConsoleSpanExporter, SimpleSpanProcessor } from '@opentelemetry/tracing';
import { WebTracer } from '@opentelemetry/web';
import { WebTracerProvider } from '@opentelemetry/web';
import { XMLHttpRequestInstrumentation } from '@opentelemetry/instrumentation-xml-http-request';
import { ZoneContextManager } from '@opentelemetry/context-zone';

// this is still possible
const webTracerWithZone = new WebTracer({
contextManager: new ZoneContextManager(),
const providerWithZone = new WebTracerProvider({
plugins: [
new XMLHttpRequestInstrumentation({
propagateTraceHeaderCorsUrls: ['http://localhost:8090']
})
]
});
providerWithZone.register({
contextManager: new ZoneContextManager(),
});
const webTracerWithZone = providerWithZone.getTracer('default');
/////////////////////////////////////////

// or plugin can be also initialised separately and then set the tracer provider or meter provider
const xmlHttpRequestInstrumentation = new XMLHttpRequestInstrumentation({
propagateTraceHeaderCorsUrls: ['http://localhost:8090']
});
const webTracerWithZone = new WebTracer({
const providerWithZone = new WebTracerProvider();
providerWithZone.register({
contextManager: new ZoneContextManager(),
});
xmlHttpRequestInstrumentation.setTracerProvider(webTracerWithZone);
xmlHttpRequestInstrumentation.setTracerProvider(providerWithZone);
/////////////////////////////////////////

webTracerWithZone.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter()));
providerWithZone.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter()));

// and some test
const req = new XMLHttpRequest();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"rimraf": "3.0.2",
"sinon": "9.2.1",
"ts-loader": "8.0.11",
"ts-mocha": "7.0.0",
"ts-mocha": "8.0.0",
"ts-node": "9.0.0",
"typescript": "3.9.7",
"webpack": "4.44.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-instrumentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"rimraf": "3.0.2",
"sinon": "9.2.1",
"ts-loader": "8.0.11",
"ts-mocha": "7.0.0",
"ts-mocha": "8.0.0",
"ts-node": "9.0.0",
"typescript": "3.9.7",
"webpack": "4.44.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-metrics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"nyc": "15.1.0",
"rimraf": "3.0.2",
"sinon": "9.2.1",
"ts-mocha": "7.0.0",
"ts-mocha": "8.0.0",
"ts-node": "9.0.0",
"typescript": "3.9.7"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"nyc": "15.1.0",
"rimraf": "3.0.2",
"shimmer": "1.2.1",
"ts-mocha": "7.0.0",
"ts-mocha": "8.0.0",
"ts-node": "9.0.0",
"typescript": "3.9.7"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-plugin-fetch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"rimraf": "3.0.2",
"sinon": "9.2.1",
"ts-loader": "8.0.11",
"ts-mocha": "7.0.0",
"ts-mocha": "8.0.0",
"ts-node": "9.0.0",
"typescript": "3.9.7",
"webpack": "4.44.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-plugin-grpc-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"rimraf": "3.0.2",
"semver": "7.3.2",
"sinon": "9.2.1",
"ts-mocha": "7.0.0",
"ts-mocha": "8.0.0",
"ts-node": "9.0.0",
"typescript": "3.9.7"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-plugin-grpc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"rimraf": "3.0.2",
"semver": "7.3.2",
"sinon": "9.2.1",
"ts-mocha": "7.0.0",
"ts-mocha": "8.0.0",
"ts-node": "9.0.0",
"typescript": "3.9.7"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-plugin-http/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"rimraf": "3.0.2",
"sinon": "9.2.1",
"superagent": "6.1.0",
"ts-mocha": "7.0.0",
"ts-mocha": "8.0.0",
"ts-node": "9.0.0",
"typescript": "3.9.7"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-plugin-https/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"rimraf": "3.0.2",
"sinon": "9.2.1",
"superagent": "6.1.0",
"ts-mocha": "7.0.0",
"ts-mocha": "8.0.0",
"ts-node": "9.0.0",
"typescript": "3.9.7"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-propagator-b3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"nyc": "15.1.0",
"rimraf": "3.0.2",
"ts-loader": "8.0.11",
"ts-mocha": "7.0.0",
"ts-mocha": "8.0.0",
"typescript": "3.9.7"
}
}
2 changes: 1 addition & 1 deletion packages/opentelemetry-resource-detector-aws/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"nyc": "15.1.0",
"rimraf": "3.0.2",
"sinon": "9.2.1",
"ts-mocha": "7.0.0",
"ts-mocha": "8.0.0",
"ts-node": "9.0.0",
"typescript": "3.9.7"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-resource-detector-gcp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"nock": "12.0.3",
"nyc": "15.1.0",
"rimraf": "3.0.2",
"ts-mocha": "7.0.0",
"ts-mocha": "8.0.0",
"ts-node": "9.0.0",
"typescript": "3.9.7"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-resources/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"nyc": "15.1.0",
"rimraf": "3.0.2",
"sinon": "9.2.1",
"ts-mocha": "7.0.0",
"ts-mocha": "8.0.0",
"ts-node": "9.0.0",
"typescript": "3.9.7"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-sdk-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"semver": "7.3.2",
"sinon": "9.2.1",
"ts-loader": "8.0.11",
"ts-mocha": "7.0.0",
"ts-mocha": "8.0.0",
"typescript": "3.9.7"
}
}
2 changes: 1 addition & 1 deletion packages/opentelemetry-semantic-conventions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"nyc": "15.1.0",
"rimraf": "3.0.2",
"sinon": "9.2.1",
"ts-mocha": "7.0.0",
"ts-mocha": "8.0.0",
"ts-node": "9.0.0",
"typescript": "3.9.7"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-shim-opentracing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"mocha": "7.2.0",
"nyc": "15.1.0",
"rimraf": "3.0.2",
"ts-mocha": "7.0.0",
"ts-mocha": "8.0.0",
"ts-node": "9.0.0",
"tslint-consistent-codestyle": "1.16.0",
"tslint-microsoft-contrib": "6.2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-tracing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"rimraf": "3.0.2",
"sinon": "9.2.1",
"ts-loader": "8.0.11",
"ts-mocha": "7.0.0",
"ts-mocha": "8.0.0",
"ts-node": "9.0.0",
"typescript": "3.9.7",
"webpack": "4.44.2"
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"rimraf": "3.0.2",
"sinon": "9.2.1",
"ts-loader": "8.0.11",
"ts-mocha": "7.0.0",
"ts-mocha": "8.0.0",
"ts-node": "9.0.0",
"typescript": "3.9.7",
"webpack": "4.44.2",
Expand Down

0 comments on commit 1e6ab7c

Please sign in to comment.