diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index f50009ef60..5cadb10953 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -84,7 +84,7 @@ body: "start": "node -r tracing.js app.js" }, "dependencies": { - "@opentelemetry/api": "^1.2.0", + "@opentelemetry/api": "^1.3.0", "@opentelemetry/sdk-trace-base": "~1.3.1", ... } diff --git a/.github/workflows/close-stale.yml b/.github/workflows/close-stale.yml index 122ab1c931..c26c21ca56 100644 --- a/.github/workflows/close-stale.yml +++ b/.github/workflows/close-stale.yml @@ -7,7 +7,7 @@ jobs: stale: runs-on: ubuntu-latest steps: - - uses: actions/stale@v5 + - uses: actions/stale@v6 with: days-before-stale: 60 days-before-close: 14 diff --git a/.github/workflows/peer-api.yml b/.github/workflows/peer-api.yml index 47daa6f20f..d3239068d5 100644 --- a/.github/workflows/peer-api.yml +++ b/.github/workflows/peer-api.yml @@ -10,7 +10,7 @@ jobs: peer-api-check: runs-on: ubuntu-latest container: - image: node:14 + image: node:18 steps: - name: Checkout uses: actions/checkout@v3 diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 21c99fbf5e..618e168e1e 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -47,16 +47,19 @@ jobs: - name: Build 🔧 run: | - npm run compile + npx lerna run compile - name: Unit tests - run: npm run test + run: | + # TODO(legendecas): webpack https://stackoverflow.com/questions/69692842/error-message-error0308010cdigital-envelope-routinesunsupported + if [ "${{ matrix.node_version }}" = "18" ]; then + export NODE_OPTIONS=--openssl-legacy-provider + fi + npm run test - name: Report Coverage run: npm run codecov if: ${{ matrix.node_version == '14' }} node-windows-tests: - strategy: - fail-fast: false runs-on: windows-latest env: NPM_CONFIG_UNSAFE_PERM: true @@ -90,22 +93,23 @@ jobs: - name: Build 🔧 run: | - npm run compile + npm config set script-shell "C:\\Program Files\\git\\bin\\bash.exe" + npx lerna run compile - name: Unit tests run: npm run test browser-tests: runs-on: ubuntu-latest - container: - image: circleci/node:16-browsers env: NPM_CONFIG_UNSAFE_PERM: true steps: - - name: Permission Setup - run: sudo chmod -R 777 /github /__w - name: Checkout uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + - name: restore lerna id: cache uses: actions/cache@v3 @@ -126,8 +130,6 @@ jobs: - name: Build 🔧 run: | - npm run compile - # run additional compilation variants npx lerna run compile - name: Unit tests @@ -136,15 +138,14 @@ jobs: run: npm run codecov:browser webworker-tests: runs-on: ubuntu-latest - container: - image: circleci/node:16-browsers env: NPM_CONFIG_UNSAFE_PERM: true steps: - - name: Permission Setup - run: sudo chmod -R 777 /github /__w - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v3.0.2 + - uses: actions/setup-node@v3 + with: + node-version: 16 - name: restore lerna id: cache @@ -166,11 +167,37 @@ jobs: - name: Build 🔧 run: | - npm run compile - # run additional compilation variants npx lerna run compile - name: Unit tests run: npm run test:webworker - name: Report Coverage run: npm run codecov:webworker + api-eol-node-test: + strategy: + fail-fast: false + matrix: + node_version: + - "8" + - "10" + - "12" + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node_version }} + + - name: Build + working-directory: ./api + run: | + npm install --ignore-scripts + npm install @types/mocha@^7 mocha@^7 ts-loader@^8 ts-mocha@^8 + node ../scripts/version-update.js + tsc --build tsconfig.json tsconfig.esm.json + + - name: Test + working-directory: ./api + run: npm test diff --git a/.github/workflows/w3c-integration-test.yml b/.github/workflows/w3c-integration-test.yml index c2be63b9df..971ea6ee7f 100644 --- a/.github/workflows/w3c-integration-test.yml +++ b/.github/workflows/w3c-integration-test.yml @@ -13,6 +13,10 @@ jobs: - name: Checkout 🛎️ uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '16' + - name: restore lock files uses: actions/cache@master # must use unreleased master to cache multiple paths id: cache diff --git a/CHANGELOG.md b/CHANGELOG.md index bc6d92008d..ab76cfe617 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,25 +2,97 @@ All notable changes to this project will be documented in this file. +For API changes, see the [API CHANGELOG](api/CHANGELOG.md). +For experimental package changes, see the [experimental CHANGELOG](experimental/CHANGELOG.md). + ## Unreleased ### :boom: Breaking Change ### :rocket: (Enhancement) +* feat(api): add `getActiveBaggage` API [#3385](https://github.com/open-telemetry/opentelemetry-js/pull/3385) + ### :bug: (Bug Fix) -* fix(instrumentation-xhr): http.url attribute should be absolute [#3200](https://github.com/open-telemetry/opentelemetry-js/pull/3200) @t2t2 +* fix(sdk-metrics): use default Resource to comply with semantic conventions [#3411](https://github.com/open-telemetry/opentelemetry-js/pull/3411) @pichlermarc + * Metrics exported by the SDK now contain the following resource attributes by default: + * `service.name` + * `telemetry.sdk.name` + * `telemetry.sdk.language` + * `telemetry.sdk.version` ### :books: (Refine Doc) ### :house: (Internal) +## 1.8.0 + +* `@opentelemetry/sdk-metrics` has been promoted to stable +* `@opentelemetry/api-metrics` has been merged into `@opentelemetry/api` and deprecated + +### :boom: Breaking Change + +* feat(api): merge api-metrics into api [#3374](https://github.com/open-telemetry/opentelemetry-js/pull/3374) @legendecas + +### :rocket: (Enhancement) + +* feat(sdk-trace): re-export sdk-trace-base in sdk-trace-node and web [#3319](https://github.com/open-telemetry/opentelemetry-js/pull/3319) @legendecas +* feat: enable tree shaking [#3329](https://github.com/open-telemetry/opentelemetry-js/pull/3329) @pkanal + +### :bug: (Bug Fix) + +* fix(sdk-trace): enforce consistent span durations + [#3327](https://github.com/open-telemetry/opentelemetry-js/pull/3327) @dyladan +* fix(resources): fix EnvDetector throwing errors when attribute values contain spaces + [#3295](https://github.com/open-telemetry/opentelemetry-js/issues/3295) +* fix(trace): fix an issue which caused negative span durations in web based spans + [#3359](https://github.com/open-telemetry/opentelemetry-js/pull/3359) @dyladan +* fix(resources): strict OTEL_RESOURCE_ATTRIBUTES baggage octet decoding + [#3341](https://github.com/open-telemetry/opentelemetry-js/pull/3341) @legendecas + +### :books: (Refine Doc) + +* doc: Added Metrics documentation [#3360](https://github.com/open-telemetry/opentelemetry-js/pull/3360) @weyert +* docs(api): fix counter negative value wording [#3396](https://github.com/open-telemetry/opentelemetry-js/pull/3396) @legendecas + +### :house: (Internal) + +* ci: run browser tests without circle [#3328](https://github.com/open-telemetry/opentelemetry-js/pull/3328) @dyladan + +## Metrics API 1.0.0 + +Metrics API is now stable and generally available. +There are no changes between 1.0.0 and the previous 0.33.0 version. + +### :boom: Breaking Change + +* Add semver check to metrics API [#3357](https://github.com/open-telemetry/opentelemetry-js/pull/3357) @dyladan + * Previously API versions were only considered compatible if the API was exactly the same + +## 1.7.0 + +### :bug: (Bug Fix) + +* fix(sdk-trace-base): make span start times resistant to hrtime clock drift + [#3129](https://github.com/open-telemetry/opentelemetry-js/issues/3129) + +* fix(sdk-trace-base): validate maxExportBatchSize in BatchSpanProcessorBase + [#3232](https://github.com/open-telemetry/opentelemetry-js/issues/3232) + +### :books: (Refine Doc) + +* docs(metrics): add missing metrics packages to SDK reference documentation [#3239](https://github.com/open-telemetry/opentelemetry-js/pull/3239) @dyladan + +### :house: (Internal) + +* deps: update markdownlint-cli to 0.32.2 [#3253](https://github.com/open-telemetry/opentelemetry-js/pull/3253) @pichlermarc + ## 1.6.0 ### :rocket: (Enhancement) -* perf(opentelemetry-core): improve hexToBase64 performance [#3178](https://github.com/open-telemetry/opentelemetry-js/pull/3178) +* perf(opentelemetry-core): improve hexToBase64 performance [#3178](https://github.com/open-telemetry/opentelemetry-js/pull/3178) @seemk * feat(sdk-trace-base): move Sampler declaration into sdk-trace-base [#3088](https://github.com/open-telemetry/opentelemetry-js/pull/3088) @legendecas * fix(grpc-instrumentation): added grpc attributes in instrumentation [#3127](https://github.com/open-telemetry/opentelemetry-js/pull/3127) @andrewzenkov * feat: support latest `@opentelemetry/api` [#3177](https://github.com/open-telemetry/opentelemetry-js/pull/3177) @dyladan @@ -35,8 +107,6 @@ All notable changes to this project will be documented in this file. * chore: update trace-web example and rename it to opentelemetry-web [#3145](https://github.com/open-telemetry/opentelemetry-js/pull/3145) @pichlermarc * chore: update https example [#3152](https://github.com/open-telemetry/opentelemetry-js/pull/3152) @pichlermarc -### :house: (Internal) - ## 1.5.0 ### :rocket: (Enhancement) diff --git a/README.md b/README.md index f52b0a4ad2..c4561df9c0 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,7 @@ Getting Started • - API Reference - • - SDK Reference + API and SDK Reference
@@ -41,42 +39,15 @@ This is the JavaScript version of [OpenTelemetry](https://opentelemetry.io/), a framework for collecting traces and metrics from applications. -## Compatibility Matrix - -| API Version | Core version | Experimental Packages | -| ----------- | ------------ | --------------------- | -| 1.2.x | 1.6.x | 0.32.x | -| 1.1.x | 1.5.x | 0.31.x | -| 1.1.x | 1.4.x | 0.30.x | -| 1.1.x | 1.2.x, 1.3.x | 0.29.x | -| 1.1.x | 1.1.x | 0.28.x | -| 1.0.x | 1.0.x | 0.26.x, 0.27.x | -| 1.0.x | 0.26.x | ----- | -| 1.0.x | 0.25.x | ----- | -| 1.0.x | 0.24.x | ----- | -| 1.0.x | 0.23.x | ----- | -| 1.0.x | 0.22.x | ----- | -| 0.21.x | 0.21.x | ----- | -| 0.20.x | 0.20.x | ----- | -| v1.0.0-rc.3 | 0.19.x | ----- | -| 0.18.x | 0.18.x | ----- | -| | 0.17.x | ----- | -| | 0.16.x | ----- | -| | 0.15.x | ----- | -| | 0.14.x | ----- | -| | 0.13.x | ----- | -| | 0.12.x | ----- | -| | 0.11.x | ----- | - -## Versioning - -The current version for each package can be found in the respective `package.json` file for that module. For additional details see the [versioning and stability][spec-versioning] document in the specification. +## Quick Start -## Quick start +The following describes how to set up tracing for a basic web application. +For more detailed documentation, see the website at
+
+API Reference
+ •
+Documentation
+
+
+
+
+
+