Skip to content

Commit

Permalink
Merge branch 'main' into fix-esm-semconvs
Browse files Browse the repository at this point in the history
  • Loading branch information
vmarchaud authored May 1, 2021
2 parents 81f2aea + 329cf92 commit 0358b20
Show file tree
Hide file tree
Showing 58 changed files with 464 additions and 295 deletions.
59 changes: 23 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,46 +89,25 @@ Please note that versions of Node.JS v8 prior to `v8.5.0` will NOT work, because
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.
This release isn't guaranteed to conform to a specific version of the specification, and future
releases will not attempt to maintain backwards compatibility with the alpha release.

| Component | Initial Version | Release Date |
|----------------------------|-----------------|------------------|
| Tracing API | Alpha v0.1.0 | October 14 2019 |
| Tracing SDK (Node and Web) | Alpha v0.1.0 | October 14 2019 |
| Jaeger Trace Exporter | Alpha v0.1.0 | October 14 2019 |
| Trace Context Propagation | Alpha v0.1.0 | October 14 2019 |
| Zipkin Trace Exporter | Alpha v0.1.0 | October 14 2019 |
| OpenTracing Bridge | Alpha v0.1.0 | October 14 2019 |
| Metrics API | Alpha v0.2.0 | November 04 2019 |
| Metrics SDK | Alpha v0.2.0 | November 04 2019 |
| Prometheus Metric Exporter | Alpha v0.3.0 | December 13 2019 |
| Resources | Beta v0.5.0 | March 16 2020 |
| Metrics SDK (Complete) | Beta v0.5.0 | March 16 2020 |
| OpenCensus Bridge | Unknown | Unknown |
| Support for Tags/Baggage | Unknown | Unknown |

## Feature Status

Last updated March 2020
As of [`v0.19.0`][feature-status-release]:

| Feature | API Status | Specification Target | SDK Status |
|---------------------|------------|----------------------|-------------|
| Tracing | Beta | v0.3 | Beta |
| Metrics | Beta | v0.3 | Beta |
| Context | Beta | v0.3 | Beta |
| Propagation | Beta | v0.3 | Beta |
| Baggage | Alpha | v0.3 | Development |
| OpenTracing Bridge | N/A | v0.3 | Beta |
| Resources | N/A | v0.3 | Beta |
| Feature | Status |
|---------------------|-------------|
| B3 Propagation | Beta |
| Zipkin Export | Beta |
| Jaeger Propagation | Beta |
| Jaeger Export | Beta |
| OpenTracing Bridge | Beta |
| Resources | Beta |
| Tracing | Beta |
| W3C Baggage | Beta |
| W3C Trace Context | Beta |
| Metrics API | Development |
| Metrics SDK | Development |

See the [project
milestones](https://github.com/open-telemetry/opentelemetry-js/milestones)
for details on upcoming releases. The dates and features described here are
estimates, and subject to change.
For a more detailed breakdown of feature support see the [specification compliance matrix][compliance-matrix].

## Contributing

Expand Down Expand Up @@ -245,6 +224,12 @@ To request automatic tracing support for a module not on this list, please [file

## Upgrade guidelines

### 0.19.x to x

- `HttpBaggage` renamed to `HttpBaggagePropagator`

- `HttpTraceContext` renamed to `HttpTraceContextPropagator`

### 0.18.x to 0.19.0

- API is now a peer dependency. This means that users will need to include `@opentelemetry/api` as a dependency of their project in order to use the SDK. NPM version 7+ (Node 15+) should do this automatically.
Expand Down Expand Up @@ -415,6 +400,8 @@ Apache 2.0 - See [LICENSE][license-url] for more information.
[good-first-issues]: https://github.com/open-telemetry/OpenTelemetry-js/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22

[docs]: https://open-telemetry.github.io/opentelemetry-js
[feature-status-release]: https://github.com/open-telemetry/opentelemetry-js/releases/tag/v0.19.0
[compliance-matrix]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/spec-compliance-matrix.md

[otel-metrics]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-metrics
[otel-node]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-node
Expand Down
2 changes: 1 addition & 1 deletion backwards-compatability/node10/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@opentelemetry/tracing": "0.19.0"
},
"devDependencies": {
"@types/node": "10.17.58",
"@types/node": "10.17.59",
"typescript": "4.2.4"
},
"author": "OpenTelemetry Authors",
Expand Down
2 changes: 1 addition & 1 deletion backwards-compatability/node12/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@opentelemetry/tracing": "0.19.0"
},
"devDependencies": {
"@types/node": "12.20.10",
"@types/node": "12.20.11",
"typescript": "4.2.4"
},
"author": "OpenTelemetry Authors",
Expand Down
4 changes: 2 additions & 2 deletions benchmark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Beginning B3Propagator Benchmark...
#Inject x 2,018,725 ops/sec ±3.49% (100 runs sampled)
#Extract x 2,040,891 ops/sec ±1.75% (100 runs sampled)
Beginning HttpTraceContext Benchmark...
Beginning HttpTraceContextPropagator Benchmark...
2 tests completed.
#Inject x 3,987,007 ops/sec ±1.87% (100 runs sampled)
Expand Down Expand Up @@ -112,7 +112,7 @@ Beginning B3Propagator Benchmark...
#Inject x 5,086,366 ops/sec ±3.18% (100 runs sampled)
#Extract x 4,859,557 ops/sec ±3.80% (100 runs sampled)
Beginning HttpTraceContext Benchmark...
Beginning HttpTraceContextPropagator Benchmark...
2 tests completed.
#Inject x 13,660,710 ops/sec ±1.84% (100 runs sampled)
Expand Down
4 changes: 2 additions & 2 deletions benchmark/propagator.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ const setups = [
}
},
{
name: 'HttpTraceContext',
propagator: new opentelemetry.HttpTraceContext(),
name: 'HttpTraceContextPropagator',
propagator: new opentelemetry.HttpTraceContextPropagator(),
injectCarrier: {},
extractCarrier: {
traceparent: '00-d4cda95b652f4a1592b449d5929fda1b-6e0c63257de34c92-00'
Expand Down
2 changes: 1 addition & 1 deletion getting-started/traced-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@opentelemetry/exporter-zipkin": "0.19.0",
"@opentelemetry/node": "0.19.0",
"@opentelemetry/instrumentation": "0.19.0",
"@opentelemetry/instrumentation-express": "^0.15.0",
"@opentelemetry/instrumentation-express": "^0.16.0",
"@opentelemetry/instrumentation-http": "0.19.0",
"@opentelemetry/tracing": "0.19.0",
"axios": "^0.21.0",
Expand Down
2 changes: 1 addition & 1 deletion getting-started/ts-example/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@types/express": "4.17.11",
"@types/node": "14.14.41",
"@types/node": "14.14.43",
"ts-node": "8.10.2"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion getting-started/ts-example/monitored-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@types/express": "4.17.11",
"@types/node": "14.14.41",
"@types/node": "14.14.43",
"ts-node": "8.10.2"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions getting-started/ts-example/traced-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
"license": "Apache-2.0",
"devDependencies": {
"@types/express": "4.17.11",
"@types/node": "14.14.41",
"@types/node": "14.14.43",
"ts-node": "9.1.1"
},
"dependencies": {
"@opentelemetry/core": "0.19.0",
"@opentelemetry/exporter-zipkin": "0.19.0",
"@opentelemetry/instrumentation": "0.19.0",
"@opentelemetry/node": "0.19.0",
"@opentelemetry/instrumentation-express": "^0.15.0",
"@opentelemetry/instrumentation-express": "^0.16.0",
"@opentelemetry/instrumentation-http": "0.19.0",
"@opentelemetry/tracing": "0.19.0",
"axios": "^0.21.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const axios = require("axios");
const { HttpTraceContext } = require("@opentelemetry/core");
const { HttpTraceContextPropagator } = require("@opentelemetry/core");
const { BasicTracerProvider } = require("@opentelemetry/tracing");
const { context, propagation, setSpan, trace, ROOT_CONTEXT } = require("@opentelemetry/api");
const {
Expand All @@ -8,7 +8,7 @@ const {
const bodyParser = require("body-parser");

// set global propagator
propagation.setGlobalPropagator(new HttpTraceContext());
propagation.setGlobalPropagator(new HttpTraceContextPropagator());

// set global context manager
context.setGlobalContextManager(new AsyncHooksContextManager());
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"@typescript-eslint/parser": "4.22.0",
"beautify-benchmark": "0.2.4",
"benchmark": "2.1.4",
"eslint": "7.24.0",
"eslint": "7.25.0",
"eslint-config-airbnb-base": "14.2.1",
"eslint-plugin-header": "3.1.1",
"eslint-plugin-import": "2.22.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/opentelemetry-api-metrics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"devDependencies": {
"@opentelemetry/api": "^1.0.0-rc.0",
"@types/mocha": "8.2.2",
"@types/node": "14.14.41",
"@types/node": "14.14.43",
"@types/webpack-env": "1.16.0",
"codecov": "3.8.1",
"gts": "3.1.0",
Expand All @@ -71,7 +71,7 @@
"karma-webpack": "5.0.0",
"mocha": "7.2.0",
"nyc": "15.1.0",
"ts-loader": "8.1.0",
"ts-loader": "8.2.0",
"ts-mocha": "8.0.0",
"typescript": "4.2.4",
"webpack": "4.46.0"
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 @@ -42,7 +42,7 @@
"devDependencies": {
"@opentelemetry/api": "^1.0.0-rc.0",
"@types/mocha": "8.2.2",
"@types/node": "14.14.41",
"@types/node": "14.14.43",
"@types/shimmer": "1.0.1",
"codecov": "3.8.1",
"gts": "3.1.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/opentelemetry-context-zone-peer-dep/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@
"access": "public"
},
"devDependencies": {
"@babel/core": "7.13.16",
"@babel/core": "7.14.0",
"@opentelemetry/api": "^1.0.0-rc.0",
"@types/mocha": "8.2.2",
"@types/node": "14.14.41",
"@types/node": "14.14.43",
"@types/sinon": "9.0.11",
"@types/webpack-env": "1.16.0",
"@types/zone.js": "0.5.12",
Expand All @@ -66,7 +66,7 @@
"nyc": "15.1.0",
"rimraf": "3.0.2",
"sinon": "10.0.0",
"ts-loader": "8.1.0",
"ts-loader": "8.2.0",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "4.2.4",
Expand Down
6 changes: 3 additions & 3 deletions packages/opentelemetry-context-zone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
"access": "public"
},
"devDependencies": {
"@babel/core": "7.13.16",
"@babel/core": "7.14.0",
"@types/mocha": "8.2.2",
"@types/node": "14.14.41",
"@types/node": "14.14.43",
"@types/sinon": "9.0.11",
"@types/webpack-env": "1.16.0",
"babel-loader": "8.2.2",
Expand All @@ -59,7 +59,7 @@
"nyc": "15.1.0",
"rimraf": "3.0.2",
"sinon": "10.0.0",
"ts-loader": "8.1.0",
"ts-loader": "8.2.0",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "4.2.4",
Expand Down
12 changes: 6 additions & 6 deletions packages/opentelemetry-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This package provides default implementations of the OpenTelemetry API for trace
- [OpenTelemetry Core](#opentelemetry-core)
- [Built-in Implementations](#built-in-implementations)
- [Built-in Propagators](#built-in-propagators)
- [HttpTraceContext Propagator](#httptracecontext-propagator)
- [HttpTraceContextPropagator Propagator](#httptracecontext-propagator)
- [Composite Propagator](#composite-propagator)
- [Baggage Propagator](#baggage-propagator)
- [Built-in Sampler](#built-in-sampler)
Expand All @@ -25,16 +25,16 @@ This package provides default implementations of the OpenTelemetry API for trace

### Built-in Propagators

#### HttpTraceContext Propagator
#### HttpTraceContextPropagator Propagator

OpenTelemetry provides a text-based approach to propagate context to remote services using the [W3C Trace Context](https://www.w3.org/TR/trace-context/) HTTP headers.

```js
const api = require("@opentelemetry/api");
const { HttpTraceContext } = require("@opentelemetry/core");
const { HttpTraceContextPropagator } = require("@opentelemetry/core");

/* Set Global Propagator */
api.propagation.setGlobalPropagator(new HttpTraceContext());
api.propagation.setGlobalPropagator(new HttpTraceContextPropagator());
```

#### Composite Propagator
Expand All @@ -57,10 +57,10 @@ Provides a text-based approach to propagate [baggage](https://w3c.github.io/bagg

```js
const api = require("@opentelemetry/api");
const { HttpBaggage } = require("@opentelemetry/core");
const { HttpBaggagePropagator } = require("@opentelemetry/core");

/* Set Global Propagator */
api.propagation.setGlobalPropagator(new HttpBaggage());
api.propagation.setGlobalPropagator(new HttpBaggagePropagator());
```

### Built-in Sampler
Expand Down
6 changes: 3 additions & 3 deletions packages/opentelemetry-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
"@opentelemetry/api": "^1.0.0-rc.0",
"@opentelemetry/propagator-b3": "0.19.0",
"@types/mocha": "8.2.2",
"@types/node": "14.14.41",
"@types/semver": "7.3.4",
"@types/node": "14.14.43",
"@types/semver": "7.3.5",
"@types/sinon": "9.0.11",
"@types/webpack-env": "1.16.0",
"codecov": "3.8.1",
Expand All @@ -75,7 +75,7 @@
"nyc": "15.1.0",
"rimraf": "3.0.2",
"sinon": "10.0.0",
"ts-loader": "8.1.0",
"ts-loader": "8.2.0",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "4.2.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const MAX_TOTAL_LENGTH = 8192;
* Based on the Baggage specification:
* https://w3c.github.io/baggage/
*/
export class HttpBaggage implements TextMapPropagator {
export class HttpBaggagePropagator implements TextMapPropagator {
inject(context: Context, carrier: unknown, setter: TextMapSetter) {
const baggage = getBaggage(context);
if (!baggage || isInstrumentationSuppressed(context)) return;
Expand Down
27 changes: 0 additions & 27 deletions packages/opentelemetry-core/src/context/propagation/types.ts

This file was deleted.

Loading

0 comments on commit 0358b20

Please sign in to comment.