Skip to content

Commit

Permalink
Merge branch 'main' into fix/core-window
Browse files Browse the repository at this point in the history
  • Loading branch information
obecny authored Oct 21, 2021
2 parents 85c0366 + 9df2132 commit 5d78863
Show file tree
Hide file tree
Showing 242 changed files with 2,539 additions and 2,705 deletions.
25 changes: 23 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,29 @@ Before creating a pull request, please make sure:

## Which problem is this PR solving?

-
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

## Short description of the changes

-
## Type of change

Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

## How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

- [ ] Test A

## Checklist:

- [ ] Followed the style guidelines of this project
- [ ] Unit tests have been added
- [ ] Documentation has been updated
4 changes: 2 additions & 2 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
with:
path: |
experimental/node_modules
experimental/packages/*/node_modules
experimental/*/*/node_modules
key: node-tests-experimental-${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles('experimental/**/package.json') }}

- name: Bootstrap
Expand Down Expand Up @@ -143,7 +143,7 @@ jobs:
with:
path: |
experimental/node_modules
experimental/packages/*/node_modules
experimental/*/*/node_modules
key: browser-tests-experimental-${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles('**/package.json') }}

- name: Bootstrap
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/w3c-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
package-lock.json
packages/*/package-lock.json
benchmark/*/package-lock.json
backwards-compatability/*/package-lock.json
metapackages/*/package-lock.json
packages/*/package-lock.json
integration-tests/*/package-lock.json
Expand Down
8 changes: 4 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "packages/opentelemetry-exporter-otlp-grpc/protos"]
path = packages/opentelemetry-exporter-otlp-grpc/protos
[submodule "experimental/packages/opentelemetry-exporter-otlp-proto/protos"]
path = experimental/packages/opentelemetry-exporter-otlp-proto/protos
url = https:/open-telemetry/opentelemetry-proto.git
[submodule "packages/opentelemetry-exporter-otlp-proto/protos"]
path = packages/opentelemetry-exporter-otlp-proto/protos
[submodule "experimental/packages/opentelemetry-exporter-otlp-grpc/protos"]
path = experimental/packages/opentelemetry-exporter-otlp-grpc/protos
url = https:/open-telemetry/opentelemetry-proto.git
92 changes: 92 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,96 @@ All notable changes to this project will be documented in this file.

## Unreleased

## 1.0.0

No changes

## 0.26.0

### :boom: Breaking Change

* `opentelemetry-exporter-collector-grpc`, `opentelemetry-exporter-otlp-grpc`, `opentelemetry-exporter-otlp-http`, `opentelemetry-exporter-otlp-proto`
* [#2476](https:/open-telemetry/opentelemetry-js/pull/2476) chore!: rename collector exporters ([@dyladan](https:/dyladan))
* `opentelemetry-core`, `opentelemetry-instrumentation-grpc`, `opentelemetry-sdk-trace-base`, `opentelemetry-shim-opentracing`
* [#2429](https:/open-telemetry/opentelemetry-js/pull/2429) fix!: remove 'Http' from W3C propagator names ([@aabmass](https:/aabmass))

### :rocket: (Enhancement)

* `opentelemetry-core`, `opentelemetry-sdk-trace-base`
* [#2430](https:/open-telemetry/opentelemetry-js/pull/2430) feat(opentelemetry-sdk-trace-base): implemented general limits of attributes ([@banothurameshnaik](https:/banothurameshnaik))
* [#2418](https:/open-telemetry/opentelemetry-js/pull/2418) feat(opentelemetry-sdk-trace-base): implemented option to limit length of values of attributes ([@banothurameshnaik](https:/banothurameshnaik))
* `opentelemetry-instrumentation`
* [#2450](https:/open-telemetry/opentelemetry-js/pull/2450) fix: handle missing package.json file when checking for version ([@nozik](https:/nozik))
* `opentelemetry-semantic-conventions`
* [#2456](https:/open-telemetry/opentelemetry-js/pull/2456) feat: upgrade semantic conventions to the latest 1.6.1 version ([@weyert](https:/weyert))
* `opentelemetry-exporter-collector-proto`, `opentelemetry-exporter-collector`
* [#2438](https:/open-telemetry/opentelemetry-js/pull/2438) feat: OTEL_EXPORTER_OTLP_ENDPOINT append version and signal ([@longility](https:/longility))

### :bug: (Bug Fix)

* Other
* [#2494](https:/open-telemetry/opentelemetry-js/pull/2494) fix: remove setting http.route in http span attributes ([@mustafain117](https:/mustafain117))
* `opentelemetry-instrumentation-fetch`
* [#2426](https:/open-telemetry/opentelemetry-js/pull/2426) fix(opentelemetry-instrumentation-fetch): fixed override of headers ([@philipszalla](https:/philipszalla))
* `opentelemetry-sdk-trace-base`
* [#2434](https:/open-telemetry/opentelemetry-js/pull/2434) fix: ReferenceError when OTEL_TRACES_SAMPLER used without OTEL_TRACES_SAMPLER_ARG ([@hermanbanken](https:/hermanbanken))

### :books: (Refine Doc)

* [#2478](https:/open-telemetry/opentelemetry-js/pull/2478) Update links to packages moved to experimental ([@jessitron](https:/jessitron))
* [#2463](https:/open-telemetry/opentelemetry-js/pull/2463) docs(README): Fix links in README.md ([@JamesJHPark](https:/JamesJHPark))
* [#2437](https:/open-telemetry/opentelemetry-js/pull/2437) docs(examples): updated examples readme links ([@banothurameshnaik](https:/banothurameshnaik))
* [#2421](https:/open-telemetry/opentelemetry-js/pull/2421) docs(website): support GH page links to canonical src ([@chalin](https:/chalin))
* [#2408](https:/open-telemetry/opentelemetry-js/pull/2408) docs: make link to exporters filter only exporters ([@Rauno56](https:/Rauno56))
* [#2297](https:/open-telemetry/opentelemetry-js/pull/2297) eslint configuration for getting-started examples ([@alisabzevari](https:/alisabzevari))

### :house: (Internal)

* `opentelemetry-exporter-otlp-http`
* [#2490](https:/open-telemetry/opentelemetry-js/pull/2490) chore: mark otlp exporters experimental ([@dyladan](https:/dyladan))
* [#2491](https:/open-telemetry/opentelemetry-js/pull/2491) fix: remove usage of serviceName property in tests for otel collector ([@mustafain117](https:/mustafain117))
* `opentelemetry-sdk-node`
* [#2473](https:/open-telemetry/opentelemetry-js/pull/2473) chore: move sdk-node to experimental ([@dyladan](https:/dyladan))
* [#2453](https:/open-telemetry/opentelemetry-js/pull/2453) chore(sdk-node): fix lint warnings ([@alisabzevari](https:/alisabzevari))
* Other
* [#2469](https:/open-telemetry/opentelemetry-js/pull/2469) Drop website_docs folder ([@chalin](https:/chalin))
* [#2474](https:/open-telemetry/opentelemetry-js/pull/2474) chore: move missed test file to its package ([@dyladan](https:/dyladan))
* [#2435](https:/open-telemetry/opentelemetry-js/pull/2435) chore: simplify unit test cache ([@dyladan](https:/dyladan))
* `opentelemetry-context-zone`, `opentelemetry-core`, `opentelemetry-exporter-collector-grpc`, `opentelemetry-exporter-collector-proto`, `opentelemetry-exporter-collector`, `opentelemetry-exporter-prometheus`, `opentelemetry-exporter-zipkin`, `opentelemetry-instrumentation-fetch`, `opentelemetry-instrumentation-grpc`, `opentelemetry-instrumentation-http`, `opentelemetry-instrumentation-xml-http-request`, `opentelemetry-propagator-b3`, `opentelemetry-propagator-jaeger`, `opentelemetry-resources`, `opentelemetry-sdk-metrics-base`, `opentelemetry-sdk-node`, `opentelemetry-sdk-trace-base`, `opentelemetry-sdk-trace-web`
* [#2462](https:/open-telemetry/opentelemetry-js/pull/2462) chore: split stable and experimental packages into groups using directories ([@dyladan](https:/dyladan))
* `opentelemetry-instrumentation-http`
* [#2126](https:/open-telemetry/opentelemetry-js/pull/2126) feat(instrumentation-http): add diag debug on http request events ([@Asafb26](https:/Asafb26))
* [#2455](https:/open-telemetry/opentelemetry-js/pull/2455) chore(instrumentation-http): fix lint warnings ([@alisabzevari](https:/alisabzevari))
* `opentelemetry-instrumentation-fetch`
* [#2454](https:/open-telemetry/opentelemetry-js/pull/2454) chore(instrumentation-fetch): fix lint warnings ([@alisabzevari](https:/alisabzevari))
* `opentelemetry-exporter-collector`
* [#2452](https:/open-telemetry/opentelemetry-js/pull/2452) chore(exporter-collector): fix lint warnings ([@alisabzevari](https:/alisabzevari))
* `opentelemetry-sdk-trace-base`, `opentelemetry-sdk-trace-node`
* [#2446](https:/open-telemetry/opentelemetry-js/pull/2446) chore(sdk-trace): fix lint warnings ([@alisabzevari](https:/alisabzevari))
* `opentelemetry-exporter-prometheus`, `opentelemetry-exporter-zipkin`, `opentelemetry-shim-opentracing`
* [#2447](https:/open-telemetry/opentelemetry-js/pull/2447) chore(exporter): fix lint warnings ([@alisabzevari](https:/alisabzevari))

### Committers: 18

* Aaron Abbott ([@aabmass](https:/aabmass))
* Ali Sabzevari ([@alisabzevari](https:/alisabzevari))
* Asaf Ben Aharon ([@Asafb26](https:/Asafb26))
* Banothu Ramesh Naik ([@banothurameshnaik](https:/banothurameshnaik))
* Daniel Dyla ([@dyladan](https:/dyladan))
* Gerhard Stöbich ([@Flarna](https:/Flarna))
* Herman ([@hermanbanken](https:/hermanbanken))
* James ([@JamesJHPark](https:/JamesJHPark))
* Jessica Kerr ([@jessitron](https:/jessitron))
* Long Mai ([@longility](https:/longility))
* Mustafain Ali Khan ([@mustafain117](https:/mustafain117))
* Patrice Chalin ([@chalin](https:/chalin))
* Philip Szalla ([@philipszalla](https:/philipszalla))
* Ran Nozik ([@nozik](https:/nozik))
* Rauno Viskus ([@Rauno56](https:/Rauno56))
* Siim Kallas ([@seemk](https:/seemk))
* Weyert de Boer ([@weyert](https:/weyert))
* legendecas ([@legendecas](https:/legendecas))

## 0.25.0

### :boom: Breaking Change
Expand All @@ -20,6 +110,8 @@ All notable changes to this project will be documented in this file.

### :bug: (Bug Fix)

* `opentelemetry-instrumentation-grpc`, `opentelemetry-instrumentation-http`, `opentelemetry-instrumentation-jaeger`, `opentelemetry-exporter-zipkin`, `opentelemetry-sdk-trace-base`
* [#2499](https:/open-telemetry/opentelemetry-js/pull/2499) fix: 2389- replaced logger unformatted strings with template literals ([@PaurushGarg](https:/PaurushGarg))
* `opentelemetry-instrumentation-fetch`
* [#2411](https:/open-telemetry/opentelemetry-js/pull/2411) fix(instrumentation-fetch): `fetch(string, Request)` silently drops request body ([@t2t2](https:/t2t2))
* `opentelemetry-sdk-trace-base`
Expand Down
63 changes: 44 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
---
<p align="center">
<strong>
<a href="https://github.com/open-telemetry/opentelemetry-js/blob/main/getting-started/README.md">Getting Started</a>
<a href="https://opentelemetry.io/docs/js/getting_started/">Getting Started</a>
&nbsp;&nbsp;&bull;&nbsp;&nbsp;
<a href="https://open-telemetry.github.io/opentelemetry-js-api">API Reference</a>
&nbsp;&nbsp;&bull;&nbsp;&nbsp;
Expand Down Expand Up @@ -47,23 +47,25 @@ This is the JavaScript version of [OpenTelemetry](https://opentelemetry.io/), a

## Compatibility Matrix

| API Version | Core version | Contrib Version |
| ----------- |--------------|-------------------------|
| 1.0.x | 0.25.x | ------ |
| 1.0.x | 0.24.x | 0.24.x |
| 1.0.x | 0.23.x | 0.23.x |
| 1.0.x | 0.22.x | 0.22.x |
| 0.21.x | 0.21.x | 0.21.x |
| 0.20.x | 0.20.x | 0.20.x |
| v1.0.0-rc.3 | 0.19.x | 0.16.x |
| 0.18.x | 0.18.x | 0.14.x |
| | 0.17.x | ------ |
| | 0.16.x | ------ |
| | 0.15.x | 0.13.x |
| | 0.14.x | 0.12.x |
| | 0.13.x | ------ |
| | 0.12.x | 0.11.x |
| | 0.11.x | 0.10.x |
| API Version | Core version | Experimental Packages | Contrib Version |
| ----------- |--------------| --------------------- |-------------------------|
| 1.0.x | 1.x | 0.26.x | ------ |
| 1.0.x | 0.26.x | ----- | ------ |
| 1.0.x | 0.25.x | ----- | ------ |
| 1.0.x | 0.24.x | ----- | 0.24.x |
| 1.0.x | 0.23.x | ----- | 0.23.x |
| 1.0.x | 0.22.x | ----- | 0.22.x |
| 0.21.x | 0.21.x | ----- | 0.21.x |
| 0.20.x | 0.20.x | ----- | 0.20.x |
| v1.0.0-rc.3 | 0.19.x | ----- | 0.16.x |
| 0.18.x | 0.18.x | ----- | 0.14.x |
| | 0.17.x | ----- | ------ |
| | 0.16.x | ----- | ------ |
| | 0.15.x | ----- | 0.13.x |
| | 0.14.x | ----- | 0.12.x |
| | 0.13.x | ----- | ------ |
| | 0.12.x | ----- | 0.11.x |
| | 0.11.x | ----- | 0.10.x |

## Versioning

Expand Down Expand Up @@ -129,7 +131,7 @@ process.on('SIGTERM', () => {
node -r ./tracing.js app.js
```

The above example will emit auto-instrumented telemetry about your Node.js application to the console. For a more in-depth example, see the [Getting Started Guide](https://github.com/open-telemetry/opentelemetry-js/blob/main/getting-started/README.md). For more information about automatic instrumentation see [@opentelemetry/sdk-trace-node][otel-node], which provides auto-instrumentation for Node.js applications. If the automatic instrumentation does not suit your needs, or you would like to create manual traces, see [@opentelemetry/sdk-trace-base][otel-tracing]
The above example will emit auto-instrumented telemetry about your Node.js application to the console. For a more in-depth example, see the [Getting Started Guide](https://opentelemetry.io/docs/js/getting_started/). For more information about automatic instrumentation see [@opentelemetry/sdk-trace-node][otel-node], which provides auto-instrumentation for Node.js applications. If the automatic instrumentation does not suit your needs, or you would like to create manual traces, see [@opentelemetry/sdk-trace-base][otel-tracing]

### Library Author

Expand Down Expand Up @@ -284,6 +286,29 @@ To request automatic tracing support for a module not on this list, please [file

## Upgrade guidelines

### 0.26.x to 0.27.x

Metric types are renamed:

- `@openetelemetry/api-metrics`
- `Meter`
- `createValueRecorder` => `createHistogram`
- `createValueObserver` => `createObservableGauge`
- `createSumObserver` => `createObservableCounter`
- `createUpDownSumObserver` => `createObservableUpDownCounter`
- `ValueRecorder` => `Histogram`
- `ValueObserver` => `ObservableGauge`
- `SumObserver` => `ObservableCounter`
- `UpDownSumObserver` => `ObservableUpDownCounter`
- `ObserverResult` => `ObservableResult`
- `Observation.observer` => `Observation.observable`
- `@opentelemetry/sdk-metrics-base`
- `MetricKind`
- `VALUE_RECORDER` => `HISTOGRAM`
- `SUM_OBSERVER` => `OBSERVABLE_COUNTER`
- `UP_DOWN_SUM_OBSERVER` => `OBSERVABLE_UP_DOWN_COUNTER`
- `VALUE_OBSERVER` => `OBSERVABLE_GAUGE`

### 0.25.x to 1.x.y

Collector exporter packages and types are renamed:
Expand Down
2 changes: 1 addition & 1 deletion doc/processor-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ const meter = new MeterProvider({
interval: 1000,
}).getMeter('example-custom-processor');

const requestsLatency = meter.createValueRecorder('requests', {
const requestsLatency = meter.createHistogram('requests', {
monotonic: true,
description: 'Average latency'
});
Expand Down
26 changes: 13 additions & 13 deletions examples/metrics/metrics/observer.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,29 @@ const exporter = new PrometheusExporter(
const meter = new MeterProvider({
exporter,
interval: 2000,
}).getMeter('example-observer');
}).getMeter('example-meter');

meter.createValueObserver('cpu_core_usage', {
description: 'Example of a sync value observer with callback',
}, async (observerResult) => { // this callback is called once per each interval
meter.createObservableGauge('cpu_core_usage', {
description: 'Example of a sync observable gauge with callback',
}, async (observableResult) => { // this callback is called once per each interval
await new Promise((resolve) => {
setTimeout(()=> {resolve()}, 50);
});
observerResult.observe(getRandomValue(), { core: '1' });
observerResult.observe(getRandomValue(), { core: '2' });
observableResult.observe(getRandomValue(), { core: '1' });
observableResult.observe(getRandomValue(), { core: '2' });
});

// no callback as they will be updated in batch observer
const tempMetric = meter.createValueObserver('cpu_temp_per_app', {
description: 'Example of sync value observer used with async batch observer',
const tempMetric = meter.createObservableGauge('cpu_temp_per_app', {
description: 'Example of sync observable gauge used with async batch observer',
});

// no callback as they will be updated in batch observer
const cpuUsageMetric = meter.createValueObserver('cpu_usage_per_app', {
description: 'Example of sync value observer used with async batch observer',
const cpuUsageMetric = meter.createObservableGauge('cpu_usage_per_app', {
description: 'Example of sync observable gauge used with async batch observer',
});

meter.createBatchObserver((observerBatchResult) => {
meter.createBatchObserver((batchObserverResult) => {
Promise.all([
someAsyncMetrics(),
// simulate waiting
Expand All @@ -52,11 +52,11 @@ meter.createBatchObserver((observerBatchResult) => {
}),
]).then(([apps, waiting]) => {
apps.forEach(app => {
observerBatchResult.observe({ app: app.name, core: '1' }, [
batchObserverResult.observe({ app: app.name, core: '1' }, [
tempMetric.observation(app.core1.temp),
cpuUsageMetric.observation(app.core1.usage),
]);
observerBatchResult.observe({ app: app.name, core: '2' }, [
batchObserverResult.observe({ app: app.name, core: '2' }, [
tempMetric.observation(app.core2.temp),
cpuUsageMetric.observation(app.core2.usage),
]);
Expand Down
Loading

0 comments on commit 5d78863

Please sign in to comment.