diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml
index 79dea2c71..8b5d8c65c 100644
--- a/.github/workflows/benchmark.yml
+++ b/.github/workflows/benchmark.yml
@@ -4,20 +4,37 @@ on:
push:
branches: [ main ]
+permissions:
+ contents: read
+
jobs:
benchmark-tests:
+ permissions:
+ contents: write # required for pushing benchmark results to gh-pages
strategy:
fail-fast: false
matrix:
node_version:
- "22"
- runs-on: self-hosted
+ runs-on: oracle-bare-metal-64cpu-512gb-x86-64
+ container:
+ image: ubuntu:24.04
timeout-minutes: 10
env:
NPM_CONFIG_UNSAFE_PERM: true
steps:
+ # Apt packages:
+ # - git: Needed for 'npm run submodule'
+ - name: Setup container environment
+ run: |
+ apt-get update && apt-get install --fix-missing -y git
+
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v5
+
+ # Avoid "detected dubious ownership in repository" error when running
+ # `npm run submodule`.
+ - run: git config --global --add safe.directory $GITHUB_WORKSPACE
- uses: actions/setup-node@v4
with:
diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml
index cc2f2582c..67771cab8 100644
--- a/.github/workflows/changelog.yml
+++ b/.github/workflows/changelog.yml
@@ -10,13 +10,15 @@ on:
branches:
- main
- next
+permissions:
+ contents: read
jobs:
changelog:
runs-on: ubuntu-latest
if: ${{ !contains(github.event.pull_request.labels.*.name, 'dependencies') && !contains(github.event.pull_request.labels.*.name, 'Skip Changelog')}}
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v5
- name: Check for CHANGELOG changes
run: |
diff --git a/.github/workflows/close-stale.yml b/.github/workflows/close-stale.yml
index 209d230ac..56194a5fa 100644
--- a/.github/workflows/close-stale.yml
+++ b/.github/workflows/close-stale.yml
@@ -3,8 +3,14 @@ on:
schedule:
- cron: '30 6 * * 1'
+permissions:
+ contents: read
+
jobs:
stale:
+ permissions:
+ issues: write # required for closing stale issues
+ pull-requests: write # required for closing stale PRs
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 33a35892f..fe9da0d7a 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -6,13 +6,18 @@ on:
branches: [ main ]
pull_request:
+permissions:
+ contents: read
+
jobs:
CodeQL-Build:
+ permissions:
+ security-events: write
runs-on: ubuntu-latest
steps:
- name: Checkout repository
- uses: actions/checkout@v4
+ uses: actions/checkout@v5
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
diff --git a/.github/workflows/create-or-update-release-pr.yml b/.github/workflows/create-or-update-release-pr.yml
index 9d701cc6f..ba24179b5 100644
--- a/.github/workflows/create-or-update-release-pr.yml
+++ b/.github/workflows/create-or-update-release-pr.yml
@@ -18,6 +18,9 @@ on:
- all # all release packages, including API, excluding semconv
- semconv # only semantic convention package
+permissions:
+ contents: read
+
jobs:
create-or-update-release-pr:
runs-on: ubuntu-latest
@@ -27,7 +30,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v5
with:
repository: opentelemetrybot/opentelemetry-js
ref: main
diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml
index e16921427..a89f8c1ae 100644
--- a/.github/workflows/docs.yaml
+++ b/.github/workflows/docs.yaml
@@ -4,12 +4,17 @@ on:
release:
types: [published]
+permissions:
+ contents: read
+
jobs:
build-and-deploy:
+ permissions:
+ contents: write # required for deploying documentation to gh-pages
runs-on: ubuntu-latest
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v5
- uses: actions/setup-node@v4
with:
diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml
index 1dcd0e07a..519eb60bb 100644
--- a/.github/workflows/e2e.yml
+++ b/.github/workflows/e2e.yml
@@ -5,6 +5,9 @@ on:
branches: [main]
pull_request:
+permissions:
+ contents: read
+
jobs:
e2e-tests:
strategy:
@@ -16,10 +19,10 @@ jobs:
- "20.6.0"
- "20"
- "22"
- - "23"
+ - "24"
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v5
- uses: actions/setup-node@v4
with:
@@ -41,7 +44,7 @@ jobs:
if: ${{
matrix.node_version == '20' ||
matrix.node_version == '22' ||
- matrix.node_version == '23'
+ matrix.node_version == '24'
}}
- name: Bootstrap
@@ -70,4 +73,4 @@ jobs:
working-directory: e2e-tests
- name: verify exported telemetry
run: npm run verify
- working-directory: e2e-tests
\ No newline at end of file
+ working-directory: e2e-tests
diff --git a/.github/workflows/fossa.yml b/.github/workflows/fossa.yml
index 3beaa09b7..f86b5a993 100644
--- a/.github/workflows/fossa.yml
+++ b/.github/workflows/fossa.yml
@@ -12,9 +12,9 @@ jobs:
fossa:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+ - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- - uses: fossas/fossa-action@93a52ecf7c3ac7eb40f5de77fd69b1a19524de94 # v1.5.0
+ - uses: fossas/fossa-action@3ebcea1862c6ffbd5cf1b4d0bd6b3fe7bd6f2cac # v1.7.0
with:
api-key: ${{secrets.FOSSA_API_KEY}}
team: OpenTelemetry
diff --git a/.github/workflows/label-releases.yml b/.github/workflows/label-releases.yml
deleted file mode 100644
index 29c5357f7..000000000
--- a/.github/workflows/label-releases.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-on:
- pull_request_target:
- branches:
- - main
-
-jobs:
- label-release:
- if: ${{ startsWith(github.event.pull_request.title, 'release:') }}
- runs-on: ubuntu-latest
- steps:
- - run: echo this is a release PR
- - run: gh pr edit ${{ github.event.pull_request.number }} --add-label release
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 605fc5770..949549e3d 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -7,13 +7,16 @@ on:
pull_request:
merge_group:
+permissions:
+ contents: read
+
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v5
- uses: actions/setup-node@v4
with:
cache: 'npm'
diff --git a/.github/workflows/ossf-scorecard.yml b/.github/workflows/ossf-scorecard.yml
index ec787a529..4dad75803 100644
--- a/.github/workflows/ossf-scorecard.yml
+++ b/.github/workflows/ossf-scorecard.yml
@@ -19,11 +19,11 @@ jobs:
# Needed for GitHub OIDC token if publish_results is true
id-token: write
steps:
- - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+ - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- - uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
+ - uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
with:
results_file: results.sarif
results_format: sarif
@@ -42,6 +42,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard (optional).
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
- name: "Upload to code-scanning"
- uses: github/codeql-action/upload-sarif@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
+ uses: github/codeql-action/upload-sarif@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3.29.11
with:
sarif_file: results.sarif
diff --git a/.github/workflows/peer-api.yml b/.github/workflows/peer-api.yml
index 332395ed7..9af3cf168 100644
--- a/.github/workflows/peer-api.yml
+++ b/.github/workflows/peer-api.yml
@@ -7,6 +7,9 @@ on:
pull_request:
merge_group:
+permissions:
+ contents: read
+
jobs:
peer-api-check:
runs-on: ubuntu-latest
@@ -14,7 +17,7 @@ jobs:
image: node:22
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v5
- name: Install lerna
run: npm install -g lerna@6.6.2
diff --git a/.github/workflows/publish-to-npm.yml b/.github/workflows/publish-to-npm.yml
index 7817fa00a..60f9cba97 100644
--- a/.github/workflows/publish-to-npm.yml
+++ b/.github/workflows/publish-to-npm.yml
@@ -3,6 +3,9 @@ name: Publish packages to NPM
on:
workflow_dispatch:
+permissions:
+ contents: read
+
jobs:
release-to-npm:
runs-on: ubuntu-latest
@@ -11,7 +14,7 @@ jobs:
id-token: write
steps:
- name: Checkout Repository
- uses: actions/checkout@v4
+ uses: actions/checkout@v5
with:
fetch-depth: 0
diff --git a/.github/workflows/sbom.yml b/.github/workflows/sbom.yml
index a99ad66a1..9fe3daab6 100644
--- a/.github/workflows/sbom.yml
+++ b/.github/workflows/sbom.yml
@@ -12,7 +12,7 @@ jobs:
NPM_CONFIG_UNSAFE_PERM: true
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v5
- uses: actions/setup-node@v4
with:
@@ -65,7 +65,7 @@ jobs:
contents: write
steps:
- name: Download artifact from generate-sboms
- uses: actions/download-artifact@v4
+ uses: actions/download-artifact@v5
with:
name: SBOM.zip
- name: Upload release asset
diff --git a/.github/workflows/survey-on-merged-pr.yml b/.github/workflows/survey-on-merged-pr.yml
index c507b623e..8b74370ac 100644
--- a/.github/workflows/survey-on-merged-pr.yml
+++ b/.github/workflows/survey-on-merged-pr.yml
@@ -4,6 +4,9 @@ on:
pull_request_target:
types: [closed]
+permissions:
+ contents: read
+
env:
PR_NUM: ${{ github.event.pull_request.number }}
SURVEY_URL: https://docs.google.com/forms/d/e/1FAIpQLSf2FfCsW-DimeWzdQgfl0KDzT2UEAqu69_f7F2BVPSxVae1cQ/viewform?entry.1540511742=open-telemetry/opentelemetry-js
@@ -17,7 +20,7 @@ jobs:
pull-requests: write
if: github.event.pull_request.merged == true
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v5
- name: Check if user is a member of the org
id: check-membership
run: |
diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml
index 4d04b9e0b..f4bac27d1 100644
--- a/.github/workflows/unit-test.yml
+++ b/.github/workflows/unit-test.yml
@@ -6,6 +6,9 @@ on:
pull_request:
merge_group:
+permissions:
+ contents: read
+
jobs:
node-tests:
strategy:
@@ -17,14 +20,13 @@ jobs:
- "20.6.0"
- "20"
- "22"
- - "23"
- "24"
runs-on: ubuntu-latest
env:
NPM_CONFIG_UNSAFE_PERM: true
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v5
- uses: actions/setup-node@v4
with:
@@ -46,7 +48,6 @@ jobs:
if: ${{
matrix.node_version == '20' ||
matrix.node_version == '22' ||
- matrix.node_version == '23' ||
matrix.node_version == '24'
}}
@@ -57,13 +58,13 @@ jobs:
run: npm run compile
- run: npm test
- if: ${{ matrix.node_version != '23' && matrix.node_version != '24' }}
- # Node.js >= 23 type stripping conflicts with mocha usage of ts-node.
+ if: ${{ matrix.node_version != '22' && matrix.node_version != '24' }}
+ # Node.js type stripping conflicts with mocha usage of ts-node.
# See https://github.com/open-telemetry/opentelemetry-js/issues/5415
- run: npm test
env:
NODE_OPTIONS: '--no-experimental-strip-types'
- if: ${{ matrix.node_version == '23' || matrix.node_version == '24' }}
+ if: ${{ matrix.node_version == '22' || matrix.node_version == '24' }}
- name: Report Coverage
uses: codecov/codecov-action@v5
@@ -77,7 +78,7 @@ jobs:
NPM_CONFIG_UNSAFE_PERM: true
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v5
- uses: actions/setup-node@v4
with:
@@ -98,13 +99,15 @@ jobs:
- name: Unit tests
run: npm run test
+ env:
+ NODE_OPTIONS: '--no-experimental-strip-types'
browser-tests:
runs-on: ubuntu-latest
env:
NPM_CONFIG_UNSAFE_PERM: true
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v5
- uses: actions/setup-node@v4
with:
@@ -133,7 +136,7 @@ jobs:
NPM_CONFIG_UNSAFE_PERM: true
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v5
- uses: actions/setup-node@v4
with:
cache: 'npm'
diff --git a/.github/workflows/w3c-integration-test.yml b/.github/workflows/w3c-integration-test.yml
index bb2be0645..2086a24cb 100644
--- a/.github/workflows/w3c-integration-test.yml
+++ b/.github/workflows/w3c-integration-test.yml
@@ -7,12 +7,15 @@ on:
pull_request:
merge_group:
+permissions:
+ contents: read
+
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
- uses: actions/checkout@v4
+ uses: actions/checkout@v5
- uses: actions/setup-node@v4
with:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5db2c1ad0..604a48bf1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,17 +5,23 @@ 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).
-For semantic convention package changes, see the [semconv CHANGELOG](packages/semantic-conventions/CHANGELOG.md).
+For semantic convention package changes, see the [semconv CHANGELOG](semantic-conventions/CHANGELOG.md).
For notes on migrating to 2.x / 0.200.x see [the upgrade guide](doc/upgrade-to-2.x.md).
## Unreleased
+* feat(instrumentation-http): Added support for redacting specific url query string values and url credentials in instrumentations [#5743](https://github.com/open-telemetry/opentelemetry-js/pull/5743) @rads-1996
+
### :boom: Breaking Changes
### :rocket: Features
+* feat(opentelemetry-resources): add schema url [#5070](https://github.com/open-telemetry/opentelemetry-js/pull/5753) @c-ehrlich
+
### :bug: Bug Fixes
+* fix(sdk-metrics): Remove invalid default value for `startTime` param to ExponentialHistogramAccumulation. This only impacted the closurescript compiler. [#5763](https://github.com/open-telemetry/opentelemetry-js/pull/5763) @trentm
+
### :books: Documentation
### :house: Internal
@@ -30,6 +36,7 @@ For notes on migrating to 2.x / 0.200.x see [the upgrade guide](doc/upgrade-to-2
* fix(resource): do not trigger `Accessing resource attributes before async attributes settled` warning when detecting resources [#5546](https://github.com/open-telemetry/opentelemetry-js/pull/5546) @dyladan
* verbose logging of detected resource removed
* fix(resource): use dynamic import over require to improve ESM compliance [#5298](https://github.com/open-telemetry/opentelemetry-js/pull/5298) @xiaoxiangmoe
+* fix(core): `getNumberFromEnv` should return number | undefined [#5874](https://github.com/open-telemetry/opentelemetry-js/pull/5874) @shubham-vunet
### :books: Documentation
diff --git a/README.md b/README.md
index 98f35bf63..c12f7e8f0 100644
--- a/README.md
+++ b/README.md
@@ -58,7 +58,7 @@ npm install --save @opentelemetry/sdk-node
npm install --save @opentelemetry/auto-instrumentations-node
```
-**Note:** `auto-instrumentations-node` is a meta package from [opentelemetry-js-contrib](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/metapackages/auto-instrumentations-node) that provides a simple way to initialize multiple Node.js instrumentations.
+**Note:** `auto-instrumentations-node` is a meta package from [opentelemetry-js-contrib](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/auto-instrumentations-node) that provides a simple way to initialize multiple Node.js instrumentations.
### Set up Tracing
@@ -134,7 +134,7 @@ Previous versions of node *may* work, but they are not tested by OpenTelemetry a
Rather than define versions of specific browsers / runtimes, OpenTelemetry sets the minimum supported version based on the
underlying language features used.
-The current minumum language feature support is set as [ECMAScript 2020](https://262.ecma-international.org/11.0/) that are available
+The current minumum language feature support is set as [ECMAScript 2022](https://262.ecma-international.org/13.0/) that are available
in all modern browsers / runtimes.
This means that if you are targeting or your end-users are using a browser / runtime that does not support ES2022, you will need
@@ -225,9 +225,7 @@ instructions to build and make changes to this project, see the
We have a weekly SIG meeting! See the [community page](https://github.com/open-telemetry/community#javascript-sdk) for meeting details and notes.
-### Community members
-
-#### Maintainers ([@open-telemetry/javascript-maintainers](https://github.com/orgs/open-telemetry/teams/javascript-maintainers))
+### Maintainers
- [Amir Blum](https://github.com/blumamir), Odigos
- [Chengzhong Wu](https://github.com/legendecas), Bloomberg
@@ -236,9 +234,9 @@ We have a weekly SIG meeting! See the [community page](https://github.com/open-t
- [Marc Pichler](https://github.com/pichlermarc), Dynatrace
- [Trent Mick](https://github.com/trentm), Elastic
-*Find more about the maintainer role in the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#maintainer).*
+For more information about the maintainer role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#maintainer).
-#### Approvers ([@open-telemetry/javascript-approvers](https://github.com/orgs/open-telemetry/teams/javascript-approvers))
+### Approvers
- [David Luna](https://github.com/david-luna), Elastic
- [Hector Hernandez](https://github.com/hectorhdzg), Microsoft
@@ -249,17 +247,17 @@ We have a weekly SIG meeting! See the [community page](https://github.com/open-t
- [Purvi Kanal](https://github.com/pkanal), Honeycomb
- [Svetlana Brennan](https://github.com/svetlanabrennan), New Relic
-*Find more about the approver role in the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#approver).*
+For more information about the approver role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#approver).
-#### Triagers ([@open-telemetry/javascript-triagers](https://github.com/orgs/open-telemetry/teams/javascript-triagers))
+### Triagers
Members of this team have triager permissions for opentelemetry-js.git and opentelemetry-js-contrib.git.
- [Jackson Weber](https://github.com/JacksonWeber), Microsoft
-*Find more about the triager role in the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#triager).*
+For more information about the triager role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#triager).
-#### Contrib Triagers ([@open-telemetry/javascript-contrib-triagers](https://github.com/orgs/open-telemetry/teams/javascript-contrib-triagers))
+### Contrib Triagers
Members of this team have triager permissions for opentelemetry-js-contrib.git.
Typically, members of this are [component owners](https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/.github/component_owners.yml) of one or more packages in the contrib repo.
@@ -279,33 +277,33 @@ Typically, members of this are [component owners](https://github.com/open-teleme
- [Motti](https://github.com/mottibec)
- [Punya Biswal](https://github.com/punya), Google
- [Siim Kallas](https://github.com/seemk), Splunk
-- [Trivikram Kamat](https://github.com/trivikr), AWS
- [t2t2](https://github.com/t2t2), Splunk
+- [Trivikram Kamat](https://github.com/trivikr), AWS
-*Find more about the triager role in the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#triager).*
+For more information about the triager role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#triager).
-#### Emeriti
+### Emeriti
-- [Bartlomiej Obecny](https://github.com/obecny), LightStep, Maintainer
-- [Daniel Khan](https://github.com/dkhan), Dynatrace, Maintainer
-- [Mayur Kale](https://github.com/mayurkale22), Google, Maintainer
+- [Bartlomiej Obecny](https://github.com/obecny), Maintainer
+- [Brandon Gonzalez](https://github.com/bg451), Approver
+- [Daniel Khan](https://github.com/dkhan), Maintainer
+- [Gerhard Stöbich](https://github.com/Flarna), Approver
+- [Haddas Bronfman](https://github.com/haddasbronfman), Approver
+- [John Bley](https://github.com/johnbley), Approver
+- [Mark Wolff](https://github.com/markwolff), Approver
+- [Mayur Kale](https://github.com/mayurkale22), Maintainer
+- [Naseem K. Ullah](https://github.com/naseemkullah), Approver
+- [Olivier Albertini](https://github.com/OlivierAlbertini), Approver
- [Rauno Viskus](https://github.com/rauno56), Maintainer
+- [Roch Devost](https://github.com/rochdev), Approver
- [Valentin Marchaud](https://github.com/vmarchaud), Maintainer
-- [Brandon Gonzalez](https://github.com/bg451), LightStep, Approver
-- [Roch Devost](https://github.com/rochdev), DataDog, Approver
-- [John Bley](https://github.com/johnbley), Splunk, Approver
-- [Mark Wolff](https://github.com/markwolff), Microsoft, Approver
-- [Olivier Albertini](https://github.com/OlivierAlbertini), Ville de Montréal, Approver
-- [Gerhard Stöbich](https://github.com/Flarna), Dynatrace, Approver
-- [Haddas Bronfman](https://github.com/haddasbronfman), Cisco, Approver
-- [Naseem K. Ullah](https://github.com/naseemkullah), Transit, Approver
-*Find more about the emeritus role in [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#emeritus-maintainerapprovertriager).*
+For more information about the emeritus role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#emeritus-maintainerapprovertriager).
-#### Thanks to all the people who already contributed
+### Thanks to all of our contributors!
-
+
## Packages
diff --git a/api/CHANGELOG.md b/api/CHANGELOG.md
index ed7432844..7f01f8dc2 100644
--- a/api/CHANGELOG.md
+++ b/api/CHANGELOG.md
@@ -9,10 +9,13 @@ All notable changes to this project will be documented in this file.
### :rocket: (Enhancement)
+* feat(api): improve isValidSpanId, isValidTraceId performance [#5714](https://github.com/open-telemetry/opentelemetry-js/pull/5714) @seemk
* feat(diag): change types in `DiagComponentLogger` from `any` to `unknown`[#5478](https://github.com/open-telemetry/opentelemetry-js/pull/5478) @loganrosen
### :bug: (Bug Fix)
+fix(api): prioritize `esnext` export condition as it is more specific [#5458](https://github.com/open-telemetry/opentelemetry-js/pull/5458)
+
### :books: (Refine Doc)
### :house: (Internal)
diff --git a/api/package.json b/api/package.json
index 3f852b9dc..f5846489a 100644
--- a/api/package.json
+++ b/api/package.json
@@ -14,14 +14,14 @@
},
"exports": {
".": {
- "module": "./build/esm/index.js",
"esnext": "./build/esnext/index.js",
+ "module": "./build/esm/index.js",
"types": "./build/src/index.d.ts",
"default": "./build/src/index.js"
},
"./experimental": {
- "module": "./build/esm/experimental/index.js",
"esnext": "./build/esnext/experimental/index.js",
+ "module": "./build/esm/experimental/index.js",
"types": "./build/src/experimental/index.d.ts",
"default": "./build/src/experimental/index.js"
}
@@ -29,7 +29,7 @@
"repository": "open-telemetry/opentelemetry-js",
"scripts": {
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
- "precompile": "cross-var lerna run version --scope $npm_package_name --include-dependencies",
+ "precompile": "lerna run version --scope @opentelemetry/api --include-dependencies",
"compile": "tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
"lint:fix": "eslint . --ext .ts --fix",
"lint": "eslint . --ext .ts",
@@ -79,7 +79,6 @@
"@types/webpack": "5.28.5",
"@types/webpack-env": "1.16.3",
"babel-plugin-istanbul": "7.0.0",
- "cross-var": "1.1.0",
"dpdm": "3.13.1",
"karma": "6.4.4",
"karma-chrome-launcher": "3.1.0",
@@ -93,10 +92,10 @@
"mocha": "11.1.0",
"nyc": "17.1.0",
"sinon": "18.0.1",
- "ts-loader": "9.5.2",
+ "ts-loader": "9.5.4",
"typescript": "5.0.4",
"unionfs": "4.5.4",
- "webpack": "5.99.9"
+ "webpack": "5.101.3"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/api",
"sideEffects": false
diff --git a/api/src/diag/ComponentLogger.ts b/api/src/diag/ComponentLogger.ts
index 838de4f25..9e53201b9 100644
--- a/api/src/diag/ComponentLogger.ts
+++ b/api/src/diag/ComponentLogger.ts
@@ -15,7 +15,7 @@
*/
import { getGlobal } from '../internal/global-utils';
-import { ComponentLoggerOptions, DiagLogger, DiagLogFunction } from './types';
+import { ComponentLoggerOptions, DiagLogger } from './types';
/**
* Component Logger which is meant to be used as part of any component which
@@ -65,6 +65,5 @@ function logProxy(
return;
}
- args.unshift(namespace);
- return logger[funcName](...(args as Parameters));
+ return logger[funcName](namespace, ...args);
}
diff --git a/api/src/experimental/trace/SugaredTracer.ts b/api/src/experimental/trace/SugaredTracer.ts
index c4f5cdc64..d7f27cf9e 100644
--- a/api/src/experimental/trace/SugaredTracer.ts
+++ b/api/src/experimental/trace/SugaredTracer.ts
@@ -14,7 +14,13 @@
* limitations under the License.
*/
import { SugaredSpanOptions } from './SugaredOptions';
-import { context, Context, Span, SpanStatusCode, Tracer } from '../../';
+import {
+ context as contextApi,
+ Context,
+ Span,
+ SpanStatusCode,
+ Tracer,
+} from '../../';
const defaultOnException = (e: Error, span: Span) => {
span.recordException(e);
@@ -174,7 +180,7 @@ function massageParams ReturnType>(
fn = arg3 as F;
}
opts = opts ?? {};
- ctx = ctx ?? context.active();
+ ctx = ctx ?? contextApi.active();
return { opts, ctx, fn };
}
diff --git a/api/src/platform/browser/globalThis.ts b/api/src/platform/browser/globalThis.ts
index 82491def9..105d77ce9 100644
--- a/api/src/platform/browser/globalThis.ts
+++ b/api/src/platform/browser/globalThis.ts
@@ -25,7 +25,7 @@
*/
/** only globals that common to node and browsers are allowed */
-// eslint-disable-next-line node/no-unsupported-features/es-builtins, no-undef
+// eslint-disable-next-line n/no-unsupported-features/es-builtins, no-undef
export const _globalThis: typeof globalThis =
typeof globalThis === 'object'
? globalThis
diff --git a/api/src/platform/node/globalThis.ts b/api/src/platform/node/globalThis.ts
index 36e97e273..14c5b4458 100644
--- a/api/src/platform/node/globalThis.ts
+++ b/api/src/platform/node/globalThis.ts
@@ -15,5 +15,5 @@
*/
/** only globals that common to node and browsers are allowed */
-// eslint-disable-next-line node/no-unsupported-features/es-builtins
+// eslint-disable-next-line n/no-unsupported-features/es-builtins
export const _globalThis = typeof globalThis === 'object' ? globalThis : global;
diff --git a/api/src/trace/spancontext-utils.ts b/api/src/trace/spancontext-utils.ts
index 1e22b24d9..2819d0c09 100644
--- a/api/src/trace/spancontext-utils.ts
+++ b/api/src/trace/spancontext-utils.ts
@@ -18,21 +18,43 @@ import { NonRecordingSpan } from './NonRecordingSpan';
import { Span } from './span';
import { SpanContext } from './span_context';
-const VALID_TRACEID_REGEX = /^([0-9a-f]{32})$/i;
-const VALID_SPANID_REGEX = /^[0-9a-f]{16}$/i;
+// Valid characters (0-9, a-f, A-F) are marked as 1.
+const isHex = new Uint8Array([
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1,
+]);
+
+function isValidHex(id: string, length: number): boolean {
+ // As of 1.9.0 the id was allowed to be a non-string value,
+ // even though it was not possible in the types.
+ if (typeof id !== 'string' || id.length !== length) return false;
+
+ let r = 0;
+ for (let i = 0; i < id.length; i += 4) {
+ r +=
+ (isHex[id.charCodeAt(i)] | 0) +
+ (isHex[id.charCodeAt(i + 1)] | 0) +
+ (isHex[id.charCodeAt(i + 2)] | 0) +
+ (isHex[id.charCodeAt(i + 3)] | 0);
+ }
+
+ return r === length;
+}
/**
* @since 1.0.0
*/
export function isValidTraceId(traceId: string): boolean {
- return VALID_TRACEID_REGEX.test(traceId) && traceId !== INVALID_TRACEID;
+ return isValidHex(traceId, 32) && traceId !== INVALID_TRACEID;
}
/**
* @since 1.0.0
*/
export function isValidSpanId(spanId: string): boolean {
- return VALID_SPANID_REGEX.test(spanId) && spanId !== INVALID_SPANID;
+ return isValidHex(spanId, 16) && spanId !== INVALID_SPANID;
}
/**
diff --git a/api/test/common/trace/spancontext-utils.test.ts b/api/test/common/trace/spancontext-utils.test.ts
index 1d8e20d6a..5232306a6 100644
--- a/api/test/common/trace/spancontext-utils.test.ts
+++ b/api/test/common/trace/spancontext-utils.test.ts
@@ -37,6 +37,17 @@ describe('spancontext-utils', function () {
assert.ok(!context.isSpanContextValid(spanContext));
});
+ it('should return false when traceId is malformed', function () {
+ // 0x4141 is not a hex character, but doing a bitwise AND with 0xFF
+ // would yield a valid character 'A'.
+ const spanContext = {
+ traceId: 'd4cda95b652f4a1592b449d5929fda1\u4141',
+ spanId: '6e0c63257de34c92',
+ traceFlags: TraceFlags.NONE,
+ };
+ assert.ok(!context.isSpanContextValid(spanContext));
+ });
+
it('should return false when spanId is invalid', function () {
const spanContext = {
traceId: 'd4cda95b652f4a1592b449d5929fda1b',
diff --git a/api/test/tree-shaking/tree-shaking.test.ts b/api/test/tree-shaking/tree-shaking.test.ts
index 293d3f39a..51bf41005 100644
--- a/api/test/tree-shaking/tree-shaking.test.ts
+++ b/api/test/tree-shaking/tree-shaking.test.ts
@@ -85,6 +85,11 @@ describe('tree-shaking', function () {
},
});
+ if (compiler == null) {
+ this.fail('Compiler was null');
+ return;
+ }
+
const fs = new Union();
fs.use(mfs as any).use(realFs as unknown as IFS);
diff --git a/doc/contributing/dependencies.md b/doc/contributing/dependencies.md
index b21af2b86..9715f2aff 100644
--- a/doc/contributing/dependencies.md
+++ b/doc/contributing/dependencies.md
@@ -11,7 +11,7 @@ This section refers to `"dependencies"` and `"devDependencies"` entries in `pack
**Example:** `^1.2.3` might inadvertently lead to version `1.2.6` which includes unintended breaking changes).
> [!NOTE]
-> As this approach might leave our project with outdated tooling, we adopt `renovate-bot`. This automated dependency update tool proactively opens pull requests upon the release of new patch/minor/major versions. The complete configuration for renovate-bot can be found in [renovate.json](../renovate.json) file.
+> As this approach might leave our project with outdated tooling, we adopt `renovate-bot`. This automated dependency update tool proactively opens pull requests upon the release of new patch/minor/major versions. The complete configuration for renovate-bot can be found in [renovate.json](../../renovate.json) file.
## @opentelemetry/* dependencies
diff --git a/e2e-tests/package.json b/e2e-tests/package.json
index c5f1cf1d3..1e15caa21 100644
--- a/e2e-tests/package.json
+++ b/e2e-tests/package.json
@@ -2,7 +2,7 @@
"name": "@opentelemetry/e2e-test",
"private": true,
"description": "End-to-end tests for OpenTelemetry JS",
- "version": "0.1.0",
+ "version": "0.2.0",
"scripts": {
"test:e2e": "npm run stop-collector; npm run run-collector && npm run export-telemetry && npm run verify || npm run stop-collector",
"lint": "eslint . --ext .mjs",
@@ -15,13 +15,13 @@
},
"dependencies": {
"@opentelemetry/api": "^1.3.0",
- "@opentelemetry/api-logs": "0.202.0",
- "@opentelemetry/exporter-logs-otlp-proto": "0.202.0",
- "@opentelemetry/exporter-metrics-otlp-proto": "0.202.0",
- "@opentelemetry/exporter-trace-otlp-proto": "0.202.0",
- "@opentelemetry/sdk-logs": "0.202.0",
+ "@opentelemetry/api-logs": "0.203.0",
+ "@opentelemetry/exporter-logs-otlp-proto": "0.203.0",
+ "@opentelemetry/exporter-metrics-otlp-proto": "0.203.0",
+ "@opentelemetry/exporter-trace-otlp-proto": "0.203.0",
+ "@opentelemetry/sdk-logs": "0.203.0",
"@opentelemetry/sdk-metrics": "2.0.1",
- "@opentelemetry/sdk-node": "0.202.0",
+ "@opentelemetry/sdk-node": "0.203.0",
"@opentelemetry/sdk-trace-base": "2.0.1"
}
}
diff --git a/eslint.base.js b/eslint.base.js
index 59cb99a07..255c6d748 100644
--- a/eslint.base.js
+++ b/eslint.base.js
@@ -2,7 +2,7 @@ module.exports = {
plugins: [
"@typescript-eslint",
"header",
- "node",
+ "n",
"prettier"
],
extends: ["eslint:recommended", "plugin:prettier/recommended"],
@@ -19,7 +19,7 @@ module.exports = {
"prefer-rest-params": "off",
"no-console": "error",
"no-shadow": "off",
- "node/no-deprecated-api": ["warn"],
+ "n/no-deprecated-api": ["warn"],
"header/header": ["error", "block", [{
pattern: / \* Copyright The OpenTelemetry Authors[\r\n]+ \*[\r\n]+ \* Licensed under the Apache License, Version 2\.0 \(the \"License\"\);[\r\n]+ \* you may not use this file except in compliance with the License\.[\r\n]+ \* You may obtain a copy of the License at[\r\n]+ \*[\r\n]+ \* https:\/\/www\.apache\.org\/licenses\/LICENSE-2\.0[\r\n]+ \*[\r\n]+ \* Unless required by applicable law or agreed to in writing, software[\r\n]+ \* distributed under the License is distributed on an \"AS IS\" BASIS,[\r\n]+ \* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.[\r\n]+ \* See the License for the specific language governing permissions and[\r\n]+ \* limitations under the License\./gm,
template:
diff --git a/examples/basic-tracer-node/package.json b/examples/basic-tracer-node/package.json
index 2d7e6cd64..84afbbce1 100644
--- a/examples/basic-tracer-node/package.json
+++ b/examples/basic-tracer-node/package.json
@@ -24,11 +24,12 @@
"url": "https://github.com/open-telemetry/opentelemetry-js/issues"
},
"dependencies": {
- "@opentelemetry/api": "^1.3.0",
- "@opentelemetry/exporter-jaeger": "0.25.0",
- "@opentelemetry/resources": "0.25.0",
- "@opentelemetry/semantic-conventions": "^1.22.0",
- "@opentelemetry/sdk-trace-base": "0.25.0"
+ "@opentelemetry/api": "^1.9.0",
+ "@opentelemetry/context-async-hooks": "^2.0.1",
+ "@opentelemetry/exporter-jaeger": "^2.0.1",
+ "@opentelemetry/resources": "^2.0.1",
+ "@opentelemetry/sdk-trace-base": "^2.0.1",
+ "@opentelemetry/semantic-conventions": "^1.36.0"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/basic-tracer-node"
}
diff --git a/examples/esm-http-ts/package.json b/examples/esm-http-ts/package.json
index e594cda36..ed923d49e 100644
--- a/examples/esm-http-ts/package.json
+++ b/examples/esm-http-ts/package.json
@@ -1,7 +1,7 @@
{
"name": "esm-http-ts",
"private": true,
- "version": "0.202.0",
+ "version": "0.203.0",
"description": "Example of HTTP integration with OpenTelemetry using ESM and TypeScript",
"main": "build/index.js",
"type": "module",
@@ -32,9 +32,9 @@
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/",
"dependencies": {
"@opentelemetry/api": "1.9.0",
- "@opentelemetry/exporter-trace-otlp-proto": "0.202.0",
- "@opentelemetry/instrumentation": "0.202.0",
- "@opentelemetry/instrumentation-http": "0.202.0",
+ "@opentelemetry/exporter-trace-otlp-proto": "0.203.0",
+ "@opentelemetry/instrumentation": "0.203.0",
+ "@opentelemetry/instrumentation-http": "0.203.0",
"@opentelemetry/resources": "2.0.1",
"@opentelemetry/sdk-trace-base": "2.0.1",
"@opentelemetry/sdk-trace-node": "2.0.1",
diff --git a/examples/http/package.json b/examples/http/package.json
index b3e85522e..52e0b3bbd 100644
--- a/examples/http/package.json
+++ b/examples/http/package.json
@@ -1,7 +1,7 @@
{
"name": "http-example",
"private": true,
- "version": "0.202.0",
+ "version": "0.203.0",
"description": "Example of HTTP integration with OpenTelemetry",
"main": "index.js",
"scripts": {
@@ -32,8 +32,8 @@
"@opentelemetry/api": "^1.3.0",
"@opentelemetry/exporter-jaeger": "2.0.1",
"@opentelemetry/exporter-zipkin": "2.0.1",
- "@opentelemetry/instrumentation": "0.202.0",
- "@opentelemetry/instrumentation-http": "0.202.0",
+ "@opentelemetry/instrumentation": "0.203.0",
+ "@opentelemetry/instrumentation-http": "0.203.0",
"@opentelemetry/resources": "2.0.1",
"@opentelemetry/sdk-trace-base": "2.0.1",
"@opentelemetry/sdk-trace-node": "2.0.1",
diff --git a/examples/https/package.json b/examples/https/package.json
index 52ca9c059..b2c583415 100644
--- a/examples/https/package.json
+++ b/examples/https/package.json
@@ -1,7 +1,7 @@
{
"name": "https-example",
"private": true,
- "version": "0.202.0",
+ "version": "0.203.0",
"description": "Example of HTTPs integration with OpenTelemetry",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
@@ -36,8 +36,8 @@
"@opentelemetry/api": "^1.3.0",
"@opentelemetry/exporter-jaeger": "2.0.1",
"@opentelemetry/exporter-zipkin": "2.0.1",
- "@opentelemetry/instrumentation": "0.202.0",
- "@opentelemetry/instrumentation-http": "0.202.0",
+ "@opentelemetry/instrumentation": "0.203.0",
+ "@opentelemetry/instrumentation-http": "0.203.0",
"@opentelemetry/resources": "2.0.1",
"@opentelemetry/sdk-trace-base": "2.0.1",
"@opentelemetry/sdk-trace-node": "2.0.1",
diff --git a/examples/https/server-cert.pem b/examples/https/server-cert.pem
index 5c0249fb3..87b55952f 100644
--- a/examples/https/server-cert.pem
+++ b/examples/https/server-cert.pem
@@ -1,22 +1,22 @@
-----BEGIN CERTIFICATE-----
-MIIDozCCAougAwIBAgIUHNXizGTXdVq7RZXVstG5RnrsuTUwDQYJKoZIhvcNAQEL
+MIIDozCCAougAwIBAgIUSgl/41WVVQuOs+hRNN6Bj2FD498wDQYJKoZIhvcNAQEL
BQAwYTELMAkGA1UEBhMCQ0wxCzAJBgNVBAgMAlJNMRowGAYDVQQHDBFPcGVuVGVs
ZW1ldHJ5VGVzdDENMAsGA1UECgwEUm9vdDENMAsGA1UECwwEVGVzdDELMAkGA1UE
-AwwCY2EwHhcNMjUwNjExMDMzMDA4WhcNMzUwNjA5M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ycBEiFI5JE0Y
-rUY46oF/Vcsyw1okuVTm5UcBxlOj+ho=
+KoZIhvcNAQEBBQADggEPADCCAQoCggEBAN3ZU0HEDBWzObHgZhc2xFmqpkj7JfOT
+QHbyIhKk7CeuolPOjI77QSSbWvNHADb3OuO/eZG6f8RyFfSpGhL9tfv4mYfhS1Kz
+9SRw7hTTjObdso8JJ8BPIxBpRuE2WdlxjOkOwK4R5tvb1rvUdlA+BMMRMwSqNODx
+FmGRwkeOy32hha2fvI6wzKJGNiRzRPuYw2f2L05u7Igzc2j6yL0xtQzGGEPWdLnf
+yN8WDOgpXVdJAy9B0PCgcUHnk8OFkW2aBRbSjbnn2swK75MMfVUmTU2hg8Rh1vnX
+ey3fiQNeWxhj7MQJVjfZnmBSI7V+VudFuBOacGO48sVSi/QjjmZsYl0CAwEAAaNT
+MFEwHQYDVR0OBBYEFEVN1IHT0YRWLH1Cs0Fc58Ta9b3UMB8GA1UdIwQYMBaAFEVN
+1IHT0YRWLH1Cs0Fc58Ta9b3UMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEL
+BQADggEBANuBQvKMRsS8e1TaeY9g7KXUqkXMV5IHADioCddxDSxs6TGXCbFNsWG7
+QO6QhbduQLGLggArFyklYn8Mku2nX/jZhDh321kKcUcWyzmkqbRE2Msiyys4p+JK
+wQtfdAAqsRPNA52EFIsyO9xpDwUoUfKw31i/8h4GlRSlLkyuedYFVe6t/X7XvytL
+KHYYMWO1ECOi4X1p7RHhzY1fh/KDAA/eZPKuPcw+qtyBFdKBlQ8QKIbeUVCOWJMa
+qrU9mfC21WG+3kuP06D+G4q2BfghdoVEeyVQVHViX4qRZs7cO2LIcNqjSg7B1VeK
+DqCaBvauRn24gsVPxJ0v3+flKZdcA+4=
-----END CERTIFICATE-----
diff --git a/examples/https/server-key.pem b/examples/https/server-key.pem
index 2a1719263..dccae5835 100644
--- a/examples/https/server-key.pem
+++ b/examples/https/server-key.pem
@@ -1,28 +1,28 @@
-----BEGIN P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u5hQp1vMEJBCFzxVZuaI63EeoNaPF6zZv64LUISuc
+7pY02T5KSpVL8ocT9aW9MjJS0MUfihWBYl+aQ5XZm8hXp6c1XFA+9USCEcp/UEB5
+DSPjc5Z7Gl6MZEhs34vy8A==
-----END PRIVATE KEY-----
diff --git a/examples/opentelemetry-web/package.json b/examples/opentelemetry-web/package.json
index d3ff89afb..79e05ccad 100644
--- a/examples/opentelemetry-web/package.json
+++ b/examples/opentelemetry-web/package.json
@@ -1,7 +1,7 @@
{
"name": "web-opentelemetry-example",
"private": true,
- "version": "0.202.0",
+ "version": "0.203.0",
"description": "Example of using @opentelemetry/sdk-trace-web and @opentelemetry/sdk-metrics in browser",
"main": "index.js",
"scripts": {
@@ -47,13 +47,13 @@
"@opentelemetry/api": "^1.3.0",
"@opentelemetry/context-zone": "2.0.1",
"@opentelemetry/core": "2.0.1",
- "@opentelemetry/exporter-metrics-otlp-http": "0.202.0",
- "@opentelemetry/exporter-trace-otlp-http": "0.202.0",
- "@opentelemetry/exporter-trace-otlp-proto": "0.202.0",
+ "@opentelemetry/exporter-metrics-otlp-http": "0.203.0",
+ "@opentelemetry/exporter-trace-otlp-http": "0.203.0",
+ "@opentelemetry/exporter-trace-otlp-proto": "0.203.0",
"@opentelemetry/exporter-zipkin": "2.0.1",
- "@opentelemetry/instrumentation": "0.202.0",
- "@opentelemetry/instrumentation-fetch": "0.202.0",
- "@opentelemetry/instrumentation-xml-http-request": "0.202.0",
+ "@opentelemetry/instrumentation": "0.203.0",
+ "@opentelemetry/instrumentation-fetch": "0.203.0",
+ "@opentelemetry/instrumentation-xml-http-request": "0.203.0",
"@opentelemetry/propagator-b3": "2.0.1",
"@opentelemetry/sdk-metrics": "2.0.1",
"@opentelemetry/sdk-trace-base": "2.0.1",
diff --git a/examples/otlp-exporter-node/package.json b/examples/otlp-exporter-node/package.json
index 466ab2c3d..7613199f8 100644
--- a/examples/otlp-exporter-node/package.json
+++ b/examples/otlp-exporter-node/package.json
@@ -1,7 +1,7 @@
{
"name": "example-otlp-exporter-node",
"private": true,
- "version": "0.202.0",
+ "version": "0.203.0",
"description": "Example of using @opentelemetry/collector-exporter in Node.js",
"main": "index.js",
"scripts": {
@@ -31,12 +31,12 @@
"dependencies": {
"@opentelemetry/api": "^1.3.0",
"@opentelemetry/core": "2.0.1",
- "@opentelemetry/exporter-metrics-otlp-grpc": "0.202.0",
- "@opentelemetry/exporter-metrics-otlp-http": "0.202.0",
- "@opentelemetry/exporter-metrics-otlp-proto": "0.202.0",
- "@opentelemetry/exporter-trace-otlp-grpc": "0.202.0",
- "@opentelemetry/exporter-trace-otlp-http": "0.202.0",
- "@opentelemetry/exporter-trace-otlp-proto": "0.202.0",
+ "@opentelemetry/exporter-metrics-otlp-grpc": "0.203.0",
+ "@opentelemetry/exporter-metrics-otlp-http": "0.203.0",
+ "@opentelemetry/exporter-metrics-otlp-proto": "0.203.0",
+ "@opentelemetry/exporter-trace-otlp-grpc": "0.203.0",
+ "@opentelemetry/exporter-trace-otlp-http": "0.203.0",
+ "@opentelemetry/exporter-trace-otlp-proto": "0.203.0",
"@opentelemetry/resources": "2.0.1",
"@opentelemetry/sdk-metrics": "2.0.1",
"@opentelemetry/sdk-trace-base": "2.0.1",
diff --git a/experimental/CHANGELOG.md b/experimental/CHANGELOG.md
index f08070e82..4af679b31 100644
--- a/experimental/CHANGELOG.md
+++ b/experimental/CHANGELOG.md
@@ -8,14 +8,58 @@ For notes on migrating to 2.x / 0.200.x see [the upgrade guide](doc/upgrade-to-2
### :boom: Breaking Changes
+* feat(api-logs)!: Marked private methods as "conventionally private". [#5789](https://github.com/open-telemetry/opentelemetry-js/pull/5789)
+* feat(exporter-otlp-\*): support custom HTTP agents [#5719](https://github.com/open-telemetry/opentelemetry-js/pull/5719) @raphael-theriault-swi
+ * `OtlpHttpConfiguration.agentOptions` has been removed and functionality has been rolled into `OtlpHttpConfiguration.agentFactory`
+ * (old) `{ agentOptions: myOptions }`
+ * (new) `{ agentFactory: httpAgentFactoryFromOptions(myOptions) }`
+
### :rocket: Features
+* feat(opentelemetry-configuration): creation of basic ConfigProvider [#5809](https://github.com/open-telemetry/opentelemetry-js/pull/5809) @maryliag
+* feat(opentelemetry-configuration): creation of basic FileConfigProvider [#5863](https://github.com/open-telemetry/opentelemetry-js/pull/5863) @maryliag
+* feat(sdk-node): Add support for multiple metric readers via the new `metricReaders` option in NodeSDK configuration. Users can now register multiple metric readers (e.g., Console, Prometheus) directly through the NodeSDK constructor. The old `metricReader` (singular) option is now deprecated and will show a warning if used, but remains supported for backward compatibility. Comprehensive tests and documentation have been added. [#5760](https://github.com/open-telemetry/opentelemetry-js/issues/5760)
+ * **Migration:**
+ - Before:
+
+ ```js
+ const sdk = new NodeSDK({ metricReader: myMetricReader });
+ ```
+
+ - After:
+
+ ```js
+ const sdk = new NodeSDK({ metricReaders: [myMetricReader] });
+ ```
+
+ * Users should migrate to the new `metricReaders` array option for future compatibility. The old option will be removed in an upcoming experimental version.
+
### :bug: Bug Fixes
+* fix(otlp-exporter-base): prioritize `esnext` export condition as it is more specific [#5458](https://github.com/open-telemetry/opentelemetry-js/pull/5458)
+* fix(instrumentation-fetch): Use ESM version of semconv instead of CJS. Users expecting mixed ESM and CJS modules will now only get ESM modules. [#5878](https://github.com/open-telemetry/opentelemetry-js/pull/5878) @overbalance
+
### :books: Documentation
### :house: Internal
+* refactor(otlp-exporter-base): use getStringFromEnv instead of process.env [#5594](https://github.com/open-telemetry/opentelemetry-js/pull/5594) @weyert
+* chore(sdk-logs): refactored imports [#5801](https://github.com/open-telemetry/opentelemetry-js/pull/5801) @svetlanabrennan
+
+## 0.203.0
+
+### :boom: Breaking Changes
+
+* feat(sdk-logs)!: Removed deprecated LoggerProvider#addLogRecordProcessor() [#5764](https://github.com/open-telemetry/opentelemetry-js/pull/5764) @svetlanabrennan
+* feat(sdk-logs)!: Changed `LogRecord` class to be an interface [#5749](https://github.com/open-telemetry/opentelemetry-js/pull/5749) @svetlanabrennan
+ * user-facing: `LogRecord` class is now not exported anymore. A newly exported interface `SdkLogRecord` is used in its place.
+* feat!: Removed `api-events` and `sdk-events` [#5737](https://github.com/open-telemetry/opentelemetry-js/pull/5737) @svetlanabrennan
+
+### :house: Internal
+
+* chore: Regenerated certs [#5752](https://github.com/open-telemetry/opentelemetry-js/pull/5752) @svetlanabrennan
+* refactor(otlp-exporter-base): remove compatibility code that was intended for now unsupported runtime Node.js v14 @pichlermarc
+
## 0.202.0
### :rocket: Features
@@ -52,6 +96,7 @@ For notes on migrating to 2.x / 0.200.x see [the upgrade guide](doc/upgrade-to-2
* fix(otlp-transformer): do not throw when deserializing empty JSON response [#5551](https://github.com/open-telemetry/opentelemetry-js/pull/5551) @pichlermarc
* fix(instrumentation-http): report stable client metrics response code [#9586](https://github.com/open-telemetry/opentelemetry-js/pull/9586) @jtescher
* fix(sdk-node): instantiate baggage processor when env var is set [#5634](https://github.com/open-telemetry/opentelemetry-js/pull/5634) @pichlermarc
+* fix(instrumentation-http): report `error.type` metrics attribute [#5647](https://github.com/open-telemetry/opentelemetry-js/pull/5647)
### :house: Internal
@@ -109,7 +154,7 @@ For notes on migrating to 2.x / 0.200.x see [the upgrade guide](doc/upgrade-to-2
### :house: (Internal)
-* chore(instrumentation-grpc): remove unused findIndex() function [#5372](https://github.com/open-telemetry/opentelemetry-js/pull/5372) @cjihrig
+* refactor(instrumentation-grpc): remove unused findIndex() function [#5372](https://github.com/open-telemetry/opentelemetry-js/pull/5372) @cjihrig
* refactor(otlp-exporter-base): remove unnecessary isNaN() checks [#5374](https://github.com/open-telemetry/opentelemetry-js/pull/5374) @cjihrig
* refactor(exporter-prometheus): remove unnecessary isNaN() check [#5377](https://github.com/open-telemetry/opentelemetry-js/pull/5377) @cjihrig
* refactor(sdk-node): move code to auto-instantiate propagators into utils [#5355](https://github.com/open-telemetry/opentelemetry-js/pull/5355) @pichlermarc
diff --git a/experimental/backwards-compatibility/node14/package.json b/experimental/backwards-compatibility/node14/package.json
index f54f7fe8e..5fa88b8c7 100644
--- a/experimental/backwards-compatibility/node14/package.json
+++ b/experimental/backwards-compatibility/node14/package.json
@@ -1,6 +1,6 @@
{
"name": "backcompat-node14",
- "version": "0.202.0",
+ "version": "0.203.0",
"private": true,
"description": "Backwards compatibility app for node 14 types and the OpenTelemetry Node.js SDK",
"main": "index.js",
@@ -10,7 +10,7 @@
"align-api-deps": "node ../../../scripts/align-api-deps.js"
},
"dependencies": {
- "@opentelemetry/sdk-node": "0.202.0",
+ "@opentelemetry/sdk-node": "0.203.0",
"@opentelemetry/sdk-trace-base": "2.0.1"
},
"devDependencies": {
diff --git a/experimental/backwards-compatibility/node16/package.json b/experimental/backwards-compatibility/node16/package.json
index 5f07502b7..893a3c431 100644
--- a/experimental/backwards-compatibility/node16/package.json
+++ b/experimental/backwards-compatibility/node16/package.json
@@ -1,6 +1,6 @@
{
"name": "backcompat-node16",
- "version": "0.202.0",
+ "version": "0.203.0",
"private": true,
"description": "Backwards compatibility app for node 16 types and the OpenTelemetry Node.js SDK",
"main": "index.js",
@@ -10,7 +10,7 @@
"align-api-deps": "node ../../../scripts/align-api-deps.js"
},
"dependencies": {
- "@opentelemetry/sdk-node": "0.202.0",
+ "@opentelemetry/sdk-node": "0.203.0",
"@opentelemetry/sdk-trace-base": "2.0.1"
},
"devDependencies": {
diff --git a/experimental/examples/events/README.md b/experimental/examples/events/README.md
deleted file mode 100644
index 4d4617262..000000000
--- a/experimental/examples/events/README.md
+++ /dev/null
@@ -1,21 +0,0 @@
-## Installation
-
-```sh
-# from this directory
-npm install
-```
-
-## Run the Application
-
-```sh
-npm start
-```
-
-## Useful links
-
-- For more information on OpenTelemetry, visit:
-- For more information on OpenTelemetry logs, visit:
-
-## LICENSE
-
-Apache License 2.0
diff --git a/experimental/examples/events/index.ts b/experimental/examples/events/index.ts
deleted file mode 100644
index 3a5eef4da..000000000
--- a/experimental/examples/events/index.ts
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright The OpenTelemetry Authors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import { DiagConsoleLogger, DiagLogLevel, diag } from '@opentelemetry/api';
-import {
- LoggerProvider,
- ConsoleLogRecordExporter,
- SimpleLogRecordProcessor,
-} from '@opentelemetry/sdk-logs';
-import { events } from '@opentelemetry/api-events';
-import { EventLoggerProvider } from '@opentelemetry/sdk-events';
-
-// Optional and only needed to see the internal diagnostic logging (during development)
-diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.DEBUG);
-
-// configure global LoggerProvider
-const loggerProvider = new LoggerProvider();
-loggerProvider.addLogRecordProcessor(
- new SimpleLogRecordProcessor(new ConsoleLogRecordExporter())
-);
-
-// uncomment to use OTLP exporter
-// import { OTLPLogExporter } from '@opentelemetry/exporter-logs-otlp-http';
-// const logExporter = new OTLPLogExporter();
-// loggerProvider.addLogRecordProcessor(new SimpleLogRecordProcessor(logExporter));
-
-// configure global EventLoggerProvider
-const eventLoggerProvider = new EventLoggerProvider(loggerProvider);
-events.setGlobalEventLoggerProvider(eventLoggerProvider);
-
-// emit a log record
-const eventLogger = events.getEventLogger('example');
-eventLogger.emit({
- name: 'my-domain.my-event',
- data: {
- a: 1,
- b: 'hello',
- c: {
- d: 123
- }
- }
-});
diff --git a/experimental/examples/events/package.json b/experimental/examples/events/package.json
deleted file mode 100644
index 87c8cf075..000000000
--- a/experimental/examples/events/package.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "name": "events-example",
- "version": "0.202.0",
- "private": true,
- "scripts": {
- "start": "ts-node index.ts"
- },
- "dependencies": {
- "@opentelemetry/api": "^1.7.0",
- "@opentelemetry/api-events": "0.202.0",
- "@opentelemetry/api-logs": "0.202.0",
- "@opentelemetry/exporter-logs-otlp-http": "0.202.0",
- "@opentelemetry/sdk-events": "0.202.0",
- "@opentelemetry/sdk-logs": "0.202.0"
- },
- "devDependencies": {
- "@types/node": "18.6.5",
- "ts-node": "^10.9.1"
- }
-}
diff --git a/experimental/examples/events/tsconfig.json b/experimental/examples/events/tsconfig.json
deleted file mode 100644
index 62cb24e05..000000000
--- a/experimental/examples/events/tsconfig.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "extends": "../../../tsconfig.base.json",
- "compilerOptions": {
- "outDir": "build",
- "rootDir": "."
- },
- "include": ["./index.ts"],
- "references": [
- {
- "path": "../../../api"
- },
- {
- "path": "../../../experimental/packages/api-events"
- },
- {
- "path": "../../../experimental/packages/api-logs"
- },
- {
- "path": "../../../experimental/packages/sdk-events"
- },
- {
- "path": "../../../experimental/packages/sdk-logs"
- },
- {
- "path": "../../../experimental/packages/exporter-logs-otlp-http"
- }
- ]
-}
diff --git a/experimental/examples/logs/index.ts b/experimental/examples/logs/index.ts
index 4579f3283..f1dfe398f 100644
--- a/experimental/examples/logs/index.ts
+++ b/experimental/examples/logs/index.ts
@@ -25,10 +25,13 @@ import {
// Optional and only needed to see the internal diagnostic logging (during development)
diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.DEBUG);
-const loggerProvider = new LoggerProvider();
-loggerProvider.addLogRecordProcessor(
- new SimpleLogRecordProcessor(new ConsoleLogRecordExporter())
-);
+const loggerProvider = new LoggerProvider({
+ processors: [
+ new SimpleLogRecordProcessor(
+ new ConsoleLogRecordExporter()
+ )
+ ],
+});
logs.setGlobalLoggerProvider(loggerProvider);
diff --git a/experimental/examples/logs/package.json b/experimental/examples/logs/package.json
index 240f29f14..d50520074 100644
--- a/experimental/examples/logs/package.json
+++ b/experimental/examples/logs/package.json
@@ -1,6 +1,6 @@
{
"name": "logs-example",
- "version": "0.202.0",
+ "version": "0.203.0",
"private": true,
"scripts": {
"start": "ts-node index.ts",
@@ -8,8 +8,8 @@
},
"dependencies": {
"@opentelemetry/api": "^1.7.0",
- "@opentelemetry/api-logs": "0.202.0",
- "@opentelemetry/sdk-logs": "0.202.0"
+ "@opentelemetry/api-logs": "0.203.0",
+ "@opentelemetry/sdk-logs": "0.203.0"
},
"devDependencies": {
"@types/node": "18.6.5",
diff --git a/experimental/examples/opencensus-shim/package.json b/experimental/examples/opencensus-shim/package.json
index da445724c..14ff6a635 100644
--- a/experimental/examples/opencensus-shim/package.json
+++ b/experimental/examples/opencensus-shim/package.json
@@ -1,7 +1,7 @@
{
"name": "opencensus-shim",
"private": true,
- "version": "0.202.0",
+ "version": "0.203.0",
"description": "Example of using @opentelemetry/shim-opencensus in Node.js",
"main": "index.js",
"scripts": {
@@ -32,13 +32,13 @@
"@opencensus/instrumentation-http": "0.1.0",
"@opencensus/nodejs-base": "0.1.0",
"@opentelemetry/api": "1.9.0",
- "@opentelemetry/exporter-prometheus": "0.202.0",
- "@opentelemetry/exporter-trace-otlp-grpc": "0.202.0",
+ "@opentelemetry/exporter-prometheus": "0.203.0",
+ "@opentelemetry/exporter-trace-otlp-grpc": "0.203.0",
"@opentelemetry/resources": "2.0.1",
"@opentelemetry/sdk-metrics": "2.0.1",
"@opentelemetry/sdk-trace-node": "2.0.1",
"@opentelemetry/semantic-conventions": "^1.29.0",
- "@opentelemetry/shim-opencensus": "0.202.0"
+ "@opentelemetry/shim-opencensus": "0.203.0"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/examples/opencensus-shim"
}
diff --git a/experimental/examples/prometheus/package.json b/experimental/examples/prometheus/package.json
index 26b5930d4..7801bf6c9 100644
--- a/experimental/examples/prometheus/package.json
+++ b/experimental/examples/prometheus/package.json
@@ -1,6 +1,6 @@
{
"name": "prometheus-example",
- "version": "0.202.0",
+ "version": "0.203.0",
"private": true,
"description": "Example of using @opentelemetry/sdk-metrics and @opentelemetry/exporter-prometheus",
"main": "index.js",
@@ -12,7 +12,7 @@
"license": "Apache-2.0",
"dependencies": {
"@opentelemetry/api": "^1.3.0",
- "@opentelemetry/exporter-prometheus": "0.202.0",
+ "@opentelemetry/exporter-prometheus": "0.203.0",
"@opentelemetry/sdk-metrics": "2.0.1"
}
}
diff --git a/experimental/packages/api-events/.eslintrc.js b/experimental/packages/api-events/.eslintrc.js
deleted file mode 100644
index 5cb19b029..000000000
--- a/experimental/packages/api-events/.eslintrc.js
+++ /dev/null
@@ -1,8 +0,0 @@
-module.exports = {
- "env": {
- "mocha": true,
- "commonjs": true,
- "shared-node-browser": true
- },
- ...require('../../../eslint.base.js')
-}
diff --git a/experimental/packages/api-events/README.md b/experimental/packages/api-events/README.md
deleted file mode 100644
index 66af35291..000000000
--- a/experimental/packages/api-events/README.md
+++ /dev/null
@@ -1,60 +0,0 @@
-# OpenTelemetry API for JavaScript
-
-[![NPM Published Version][npm-img]][npm-url]
-[![Apache License][license-image]][license-image]
-
-This package provides everything needed to interact with the unstable OpenTelemetry Events API, including all TypeScript interfaces, enums, and no-op implementations. It is intended for use both on the server and in the browser.
-
-## Beta Software - Use at your own risk
-
-The events API is considered alpha software and there is no guarantee of stability or long-term support. When the API is stabilized, it will be made available and supported long-term in the `@opentelemetry/api` package and this package will be deprecated.
-
-## Quick Start
-
-Purposefully left blank until SDK is available.
-
-## Version Compatibility
-
-Because the npm installer and node module resolution algorithm could potentially allow two or more copies of any given package to exist within the same `node_modules` structure, the OpenTelemetry API takes advantage of a variable on the `global` object to store the global API. When an API method in the API package is called, it checks if this `global` API exists and proxies calls to it if and only if it is a compatible API version. This means if a package has a dependency on an OpenTelemetry API version which is not compatible with the API used by the end user, the package will receive a no-op implementation of the API.
-
-## Advanced Use
-
-### API Methods
-
-If you are writing an instrumentation library, or prefer to call the API methods directly rather than using the `register` method on the Tracer/Meter/Logger Provider, OpenTelemetry provides direct access to the underlying API methods through the `@opentelemetry/api-events` package. API entry points are defined as global singleton objects `trace`, `metrics`, `logs`, `events`, `propagation`, and `context` which contain methods used to initialize SDK implementations and acquire resources from the API.
-
-- [Events API Documentation][events-api-docs]
-
-```javascript
-const api = require("@opentelemetry/api-events");
-
-/* A specific implementation of EventLoggerProvider comes from an SDK */
-const eventLoggerProvider = createEventLoggerProvider();
-
-/* Initialize EventLoggerProvider */
-api.events.setGlobalEventLoggerProvider(eventLoggerProvider);
-/* returns eventLoggerProvider (no-op if a working provider has not been initialized) */
-api.events.getEventLoggerProvider();
-/* returns an event logger from the registered global event logger provider (no-op if a working provider has not been initialized) */
-const eventLogger = api.events.getEventLogger(name, version);
-
-// logging an event in an instrumentation library
-eventLogger.emit({ name: 'event-name' });
-```
-
-## Useful links
-
-- For more information on OpenTelemetry, visit:
-- For more about OpenTelemetry JavaScript:
-- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]
-
-## License
-
-Apache 2.0 - See [LICENSE][license-url] for more information.
-
-[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions
-[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE
-[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat
-[npm-url]: https://www.npmjs.com/package/@opentelemetry/api-logs
-[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fapi-logs.svg
-[events-api-docs]: https://open-telemetry.github.io/opentelemetry-js/modules/_opentelemetry_api_events.html
diff --git a/experimental/packages/api-events/karma.conf.js b/experimental/packages/api-events/karma.conf.js
deleted file mode 100644
index 6174839d6..000000000
--- a/experimental/packages/api-events/karma.conf.js
+++ /dev/null
@@ -1,24 +0,0 @@
-/*!
- * Copyright The OpenTelemetry Authors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-const karmaWebpackConfig = require('../../../karma.webpack');
-const karmaBaseConfig = require('../../../karma.base');
-
-module.exports = (config) => {
- config.set(Object.assign({}, karmaBaseConfig, {
- webpack: karmaWebpackConfig
- }))
-};
diff --git a/experimental/packages/api-events/package.json b/experimental/packages/api-events/package.json
deleted file mode 100644
index 24839ab17..000000000
--- a/experimental/packages/api-events/package.json
+++ /dev/null
@@ -1,87 +0,0 @@
-{
- "name": "@opentelemetry/api-events",
- "version": "0.202.0",
- "description": "Public events API for OpenTelemetry",
- "main": "build/src/index.js",
- "module": "build/esm/index.js",
- "esnext": "build/esnext/index.js",
- "types": "build/src/index.d.ts",
- "browser": {
- "./src/platform/index.ts": "./src/platform/browser/index.ts",
- "./build/esm/platform/index.js": "./build/esm/platform/browser/index.js",
- "./build/esnext/platform/index.js": "./build/esnext/platform/browser/index.js",
- "./build/src/platform/index.js": "./build/src/platform/browser/index.js"
- },
- "repository": "open-telemetry/opentelemetry-js",
- "scripts": {
- "build": "npm run compile",
- "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
- "compile": "tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
- "lint": "eslint . --ext .ts",
- "lint:fix": "eslint . --ext .ts --fix",
- "prepublishOnly": "npm run compile",
- "precompile": "cross-var lerna run version --scope $npm_package_name --include-dependencies",
- "prewatch": "node ../../../scripts/version-update.js",
- "test": "nyc mocha test/**/*.test.ts",
- "test:browser": "karma start --single-run",
- "version": "node ../../../scripts/version-update.js",
- "watch": "tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
- "align-api-deps": "node ../../../scripts/align-api-deps.js"
- },
- "keywords": [
- "opentelemetry",
- "nodejs",
- "browser",
- "profiling",
- "events",
- "stats",
- "monitoring"
- ],
- "author": "OpenTelemetry Authors",
- "license": "Apache-2.0",
- "engines": {
- "node": ">=8.0.0"
- },
- "files": [
- "build/esm/**/*.js",
- "build/esm/**/*.js.map",
- "build/esm/**/*.d.ts",
- "build/esnext/**/*.js",
- "build/esnext/**/*.js.map",
- "build/esnext/**/*.d.ts",
- "build/src/**/*.js",
- "build/src/**/*.js.map",
- "build/src/**/*.d.ts",
- "doc",
- "LICENSE",
- "README.md"
- ],
- "publishConfig": {
- "access": "public"
- },
- "dependencies": {
- "@opentelemetry/api": "^1.3.0",
- "@opentelemetry/api-logs": "0.202.0"
- },
- "devDependencies": {
- "@types/mocha": "10.0.10",
- "@types/node": "^8.10.66",
- "@types/webpack-env": "1.16.3",
- "babel-plugin-istanbul": "7.0.0",
- "cross-var": "1.1.0",
- "karma": "6.4.4",
- "karma-chrome-launcher": "3.1.0",
- "karma-coverage": "2.2.1",
- "karma-mocha": "2.0.1",
- "karma-spec-reporter": "0.0.36",
- "karma-webpack": "5.0.1",
- "lerna": "6.6.2",
- "mocha": "11.1.0",
- "nyc": "17.1.0",
- "ts-loader": "9.5.2",
- "typescript": "5.0.4",
- "webpack": "5.99.9"
- },
- "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/api-events",
- "sideEffects": false
-}
diff --git a/experimental/packages/api-events/src/NoopEventLoggerProvider.ts b/experimental/packages/api-events/src/NoopEventLoggerProvider.ts
deleted file mode 100644
index 4fa5630b6..000000000
--- a/experimental/packages/api-events/src/NoopEventLoggerProvider.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright The OpenTelemetry Authors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import { EventLoggerProvider } from './types/EventLoggerProvider';
-import { EventLogger } from './types/EventLogger';
-import { EventLoggerOptions } from './types/EventLoggerOptions';
-import { NoopEventLogger } from './NoopEventLogger';
-
-export class NoopEventLoggerProvider implements EventLoggerProvider {
- getEventLogger(
- _name: string,
- _version?: string | undefined,
- _options?: EventLoggerOptions | undefined
- ): EventLogger {
- return new NoopEventLogger();
- }
-}
-
-export const NOOP_EVENT_LOGGER_PROVIDER = new NoopEventLoggerProvider();
diff --git a/experimental/packages/api-events/src/api/events.ts b/experimental/packages/api-events/src/api/events.ts
deleted file mode 100644
index c5a631c8f..000000000
--- a/experimental/packages/api-events/src/api/events.ts
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright The OpenTelemetry Authors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import {
- API_BACKWARDS_COMPATIBILITY_VERSION,
- GLOBAL_EVENTS_API_KEY,
- _global,
- makeGetter,
-} from '../internal/global-utils';
-import { EventLoggerProvider } from '../types/EventLoggerProvider';
-import { NOOP_EVENT_LOGGER_PROVIDER } from '../NoopEventLoggerProvider';
-import { EventLogger } from '../types/EventLogger';
-import { EventLoggerOptions } from '../types/EventLoggerOptions';
-
-export class EventsAPI {
- private static _instance?: EventsAPI;
-
- private constructor() {}
-
- public static getInstance(): EventsAPI {
- if (!this._instance) {
- this._instance = new EventsAPI();
- }
-
- return this._instance;
- }
-
- public setGlobalEventLoggerProvider(
- provider: EventLoggerProvider
- ): EventLoggerProvider {
- if (_global[GLOBAL_EVENTS_API_KEY]) {
- return this.getEventLoggerProvider();
- }
-
- _global[GLOBAL_EVENTS_API_KEY] = makeGetter(
- API_BACKWARDS_COMPATIBILITY_VERSION,
- provider,
- NOOP_EVENT_LOGGER_PROVIDER
- );
-
- return provider;
- }
-
- /**
- * Returns the global event logger provider.
- *
- * @returns EventLoggerProvider
- */
- public getEventLoggerProvider(): EventLoggerProvider {
- return (
- _global[GLOBAL_EVENTS_API_KEY]?.(API_BACKWARDS_COMPATIBILITY_VERSION) ??
- NOOP_EVENT_LOGGER_PROVIDER
- );
- }
-
- /**
- * Returns a event logger from the global event logger provider.
- *
- * @returns EventLogger
- */
- public getEventLogger(
- name: string,
- version?: string,
- options?: EventLoggerOptions
- ): EventLogger {
- return this.getEventLoggerProvider().getEventLogger(name, version, options);
- }
-
- /** Remove the global event logger provider */
- public disable(): void {
- delete _global[GLOBAL_EVENTS_API_KEY];
- }
-}
diff --git a/experimental/packages/api-events/src/internal/global-utils.ts b/experimental/packages/api-events/src/internal/global-utils.ts
deleted file mode 100644
index 171cb0e1c..000000000
--- a/experimental/packages/api-events/src/internal/global-utils.ts
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright The OpenTelemetry Authors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import { EventLoggerProvider } from '../types/EventLoggerProvider';
-import { _globalThis } from '../platform';
-
-export const GLOBAL_EVENTS_API_KEY = Symbol.for(
- 'io.opentelemetry.js.api.events'
-);
-
-type Get = (version: number) => T;
-type OtelGlobal = Partial<{
- [GLOBAL_EVENTS_API_KEY]: Get;
-}>;
-
-export const _global = _globalThis as OtelGlobal;
-
-/**
- * Make a function which accepts a version integer and returns the instance of an API if the version
- * is compatible, or a fallback version (usually NOOP) if it is not.
- *
- * @param requiredVersion Backwards compatibility version which is required to return the instance
- * @param instance Instance which should be returned if the required version is compatible
- * @param fallback Fallback instance, usually NOOP, which will be returned if the required version is not compatible
- */
-export function makeGetter(
- requiredVersion: number,
- instance: T,
- fallback: T
-): Get {
- return (version: number): T =>
- version === requiredVersion ? instance : fallback;
-}
-
-/**
- * A number which should be incremented each time a backwards incompatible
- * change is made to the API. This number is used when an API package
- * attempts to access the global API to ensure it is getting a compatible
- * version. If the global API is not compatible with the API package
- * attempting to get it, a NOOP API implementation will be returned.
- */
-export const API_BACKWARDS_COMPATIBILITY_VERSION = 1;
diff --git a/experimental/packages/api-events/src/platform/browser/globalThis.ts b/experimental/packages/api-events/src/platform/browser/globalThis.ts
deleted file mode 100644
index 95373449d..000000000
--- a/experimental/packages/api-events/src/platform/browser/globalThis.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright The OpenTelemetry Authors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Updates to this file should also be replicated to @opentelemetry/api and
-// @opentelemetry/core too.
-
-/**
- * - globalThis (New standard)
- * - self (Will return the current window instance for supported browsers)
- * - window (fallback for older browser implementations)
- * - global (NodeJS implementation)
- * -