diff --git a/.circleci/config.yml b/.circleci/config.yml index 3764a844a51..350ee4946b4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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: @@ -213,6 +213,6 @@ workflows: - node8 - node10 - node12 - - node13 + - node14 - node12-browsers diff --git a/.gitmodules b/.gitmodules index 50b83a59cdb..bebf3ea829e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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 diff --git a/README.md b/README.md index d330f482441..6a1eee3042e 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/examples/opentracing-shim/shim.js b/examples/opentracing-shim/shim.js index 993445ab268..38e6db223d6 100644 --- a/examples/opentracing-shim/shim.js +++ b/examples/opentracing-shim/shim.js @@ -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')); } diff --git a/packages/opentelemetry-node/src/instrumentation/PluginLoader.ts b/packages/opentelemetry-node/src/instrumentation/PluginLoader.ts index 5517134bc7c..be278696a82 100644 --- a/packages/opentelemetry-node/src/instrumentation/PluginLoader.ts +++ b/packages/opentelemetry-node/src/instrumentation/PluginLoader.ts @@ -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; diff --git a/packages/opentelemetry-plugin-grpc/src/grpc.ts b/packages/opentelemetry-plugin-grpc/src/grpc.ts index f53cd493aea..44efeb2a938 100644 --- a/packages/opentelemetry-plugin-grpc/src/grpc.ts +++ b/packages/opentelemetry-plugin-grpc/src/grpc.ts @@ -297,6 +297,10 @@ export class GrpcPlugin extends BasePlugin { }); 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, diff --git a/packages/opentelemetry-plugin-xml-http-request/src/xhr.ts b/packages/opentelemetry-plugin-xml-http-request/src/xhr.ts index b4009d68618..88eec64ae62 100644 --- a/packages/opentelemetry-plugin-xml-http-request/src/xhr.ts +++ b/packages/opentelemetry-plugin-xml-http-request/src/xhr.ts @@ -316,6 +316,7 @@ export class XMLHttpRequestPlugin extends BasePlugin { } const currentSpan = this._tracer.startSpan(url, { + kind: api.SpanKind.CLIENT, attributes: { [AttributeNames.COMPONENT]: this.component, [AttributeNames.HTTP_METHOD]: method, diff --git a/packages/opentelemetry-plugin-xml-http-request/test/xhr.test.ts b/packages/opentelemetry-plugin-xml-http-request/test/xhr.test.ts index 52693d840ae..270762ca216 100644 --- a/packages/opentelemetry-plugin-xml-http-request/test/xhr.test.ts +++ b/packages/opentelemetry-plugin-xml-http-request/test/xhr.test.ts @@ -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;