Skip to content

Commit

Permalink
Merge branch 'master' into remove-observer-bind
Browse files Browse the repository at this point in the history
  • Loading branch information
legendecas committed May 2, 2020
2 parents 7897284 + 817397b commit 1851d3c
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,9 @@ jobs:
- image: node:12
environment: *node_test_env
<<: *node_unit_tests
node13:
node14:
docker:
- image: node:13
- image: node:14
environment: *node_test_env
<<: *node_unit_tests
node12-browsers:
Expand All @@ -213,6 +213,6 @@ workflows:
- node8
- node10
- node12
- node13
- node14
- node12-browsers

2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "packages/opentelemetry-exporter-collector/src/platform/node/protos"]
path = packages/opentelemetry-exporter-collector/src/platform/node/protos
url = git@github.com:open-telemetry/opentelemetry-proto.git
url = https://github.com/open-telemetry/opentelemetry-proto.git
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,25 @@ To get started tracing your own application, see the [Getting Started Guide](get

If you are a library author looking to build OpenTelemetry into your library, please see [the documentation][docs]. As a library author, it is important that you only depend on properties and methods published on the public API. If you use any properties or methods from the SDK that are not officially a part of the public API, your library may break if an [Application Owner](#application-owner) uses a different SDK implementation.

## Supported Runtimes

Platform Version | Supported
---------------- | ---------
Node.JS `v14` | ✅
Node.JS `v12` | ✅
Node.JS `v10` | ✅
Node.JS `v8` | See [Node Support](#node-support) below
Web Browsers | ✅ See [Browser Support](#browser-support) below

### Node Support
Automated tests are run using the latest release of each currently supported LTS version of Node.JS.
While Node.JS v8 is no longer supported by the Node.JS team, the latest version of Node.JS v8 is still included in our testing suite.
Please note that versions of Node.JS v8 prior to `v8.5.0` will NOT work, because OpenTelemetry Node depends on the `perf_hooks` module introduced in `v8.5.0`

### Browser Support
Automated browser tests are run in the latest version of Headless Chrome.
There is currently no list of officially supported browsers, but OpenTelemetry is developed using standard web technologies with wide support and should work in currently supported versions of major browsers.

## Release Schedule

OpenTelemetry JS is under active development.
Expand Down
2 changes: 2 additions & 0 deletions examples/opentracing-shim/shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ function shim(serviceName) {
const provider = new NodeTracerProvider();

provider.addSpanProcessor(new SimpleSpanProcessor(getExporter(serviceName)));
// Initialize the OpenTelemetry APIs to use the NodeTracerProvider bindings
provider.register();

return new TracerShim(provider.getTracer('opentracing-shim'));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export class PluginLoader {
}

this.logger.info(
`PluginLoader#load: trying loading ${name}@${version}`
`PluginLoader#load: trying to load ${name}@${version}`
);

if (!version) return exports;
Expand Down
4 changes: 4 additions & 0 deletions packages/opentelemetry-plugin-grpc/src/grpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,10 @@ export class GrpcPlugin extends BasePlugin<grpc> {
});

call.on('error', (err: grpcTypes.ServiceError) => {
span.setStatus({
code: _grpcStatusCodeToCanonicalCode(err.code),
message: err.message,
});
span.addEvent('finished with error');
span.setAttributes({
[AttributeNames.GRPC_ERROR_NAME]: err.name,
Expand Down
1 change: 1 addition & 0 deletions packages/opentelemetry-plugin-xml-http-request/src/xhr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ export class XMLHttpRequestPlugin extends BasePlugin<XMLHttpRequest> {
}

const currentSpan = this._tracer.startSpan(url, {
kind: api.SpanKind.CLIENT,
attributes: {
[AttributeNames.COMPONENT]: this.component,
[AttributeNames.HTTP_METHOD]: method,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,15 @@ describe('xhr', () => {
assert.strictEqual(span.name, url, 'span has wrong name');
});

it('span should have correct kind', () => {
const span: tracing.ReadableSpan = exportSpy.args[0][0][0];
assert.strictEqual(
span.kind,
types.SpanKind.CLIENT,
'span has wrong kind'
);
});

it('span should have correct attributes', () => {
const span: tracing.ReadableSpan = exportSpy.args[0][0][0];
const attributes = span.attributes;
Expand Down

0 comments on commit 1851d3c

Please sign in to comment.