Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: open-telemetry/opentelemetry-js
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: experimental/v0.57.2
Choose a base ref
...
head repository: open-telemetry/opentelemetry-js
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: experimental/v0.200.0
Choose a head ref

Commits on Nov 15, 2023

  1. Update next branch (#4294)

    * chore: track package-lock.json (#4238)
    
    * chore: track package-lock.json
    
    * Pin to old versions for node 14
    
    * Use version range
    
    * Remove unused cached directories
    
    * Temporarily disable other tests
    
    * Temporarily enable only api test
    
    * Enable only some packages
    
    * Test only api packages
    
    * Test trace exporters
    
    * Fix line ordering
    
    * Test all packages except otlp exporters
    
    * Add trace http exporter
    
    * Add trace proto exporter
    
    * Test all but grpc exporters
    
    * chore: use npm workspaces and degrade lerna to v6
    
    * chore: get rid of lerna bootstrap
    
    * chore: use npx
    
    * chore: allow install scripts to setup buf
    
    * chore: fix w3c-integration-test cache key
    
    * chore: fix cache key
    
    * chore: disable resource compat test
    
    * chore: fix node_modules assumptions
    
    * chore: fix hoisted karma issue
    
    * chore: fix markdown linter complaints
    
    * chore: lock @grpc/grpc-js to v1.8.21
    
    * Break caches
    
    * chore: remove cache
    
    * chore: fixup inline commands
    
    ---------
    
    Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
    
    * docs: fixed link to benchmark results (#4233)
    
    Co-authored-by: Chengzhong Wu <legendecas@gmail.com>
    
    * chore(deps): update all patch versions (#4215)
    
    * fix: otlp json encoding (#4220)
    
    Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
    
    * fix: remove duplicate export star from version.ts (#4225)
    
    Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
    
    * docs: fix sdk-node config instructions (#4249)
    
    Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
    
    * feat(api): publish api esnext target (#4231)
    
    * chore: release API 1.7.0/Core 1.18.0/Experimental 0.45.0 (#4254)
    
    * fix(sdk-metrics): hand-roll MetricAdvice type as older API versions do not include it (#4260)
    
    * chore: prepare release 1.18.1/0.45.1 (#4261)
    
    * chore: no need for 'packages' in "lerna.json" (#4264)
    
    * Benchmark tests for trace OTLP transform and BatchSpanProcessor (#4218)
    
    Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
    
    * chore: type reference on zone.js (#4257)
    
    Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
    
    * docs: add docker-compose to run prometheus for the experimental example (#4268)
    
    Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
    
    * fix(sdk-logs): avoid map attribute set when count limit exceeded (#4195)
    
    Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
    
    * chore(deps): update dependency chromedriver to v119 [security] (#4280)
    
    * chore(deps): update actions/setup-node action to v4 (#4236)
    
    * fix(sdk-trace-base): processor onStart called with a span having empty attributes (#4277)
    
    Co-authored-by: artahmetaj <artahmetaj@yahoo.com>
    
    * Update fetch instrumentation to be runtime agnostic (#4063)
    
    Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
    
    ---------
    
    Co-authored-by: Chengzhong Wu <legendecas@gmail.com>
    Co-authored-by: Martin Kuba <martin@martinkuba.com>
    Co-authored-by: Mend Renovate <bot@renovateapp.com>
    Co-authored-by: Siim Kallas <siimkallas@gmail.com>
    Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
    Co-authored-by: David Luna <david.luna@elastic.co>
    Co-authored-by: Dinko Osrecki <dinko.osrecki@emarsys.com>
    Co-authored-by: Trent Mick <trentm@gmail.com>
    Co-authored-by: François <32224751+Lp-Francois@users.noreply.github.com>
    Co-authored-by: Hyun Oh <hyunnoh01@gmail.com>
    Co-authored-by: André Cruz <andremiguelcruz@msn.com>
    Co-authored-by: artahmetaj <artahmetaj@yahoo.com>
    Co-authored-by: drewcorlin1 <82601620+drewcorlin1@users.noreply.github.com>
    14 people authored Nov 15, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    0f8aa79 View commit details

Commits on Nov 16, 2023

  1. Verified

    This commit was signed with the committer’s verified signature.
    dyladan Daniel Dyla
    Copy the full SHA
    e0efd7a View commit details

Commits on Nov 17, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ba4de42 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    6031bb4 View commit details
  3. Verified

    This commit was signed with the committer’s verified signature.
    dyladan Daniel Dyla
    Copy the full SHA
    ab52a84 View commit details
  4. Fix prom test for node 20

    dyladan committed Nov 17, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    dyladan Daniel Dyla
    Copy the full SHA
    9d62673 View commit details
  5. Name exports to fix ESM tests

    dyladan committed Nov 17, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    dyladan Daniel Dyla
    Copy the full SHA
    7cf46c7 View commit details
  6. Temporarily disable node 20

    dyladan committed Nov 17, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    dyladan Daniel Dyla
    Copy the full SHA
    d229b3a View commit details
  7. lint

    dyladan committed Nov 17, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    dyladan Daniel Dyla
    Copy the full SHA
    343ca78 View commit details

Commits on Nov 20, 2023

  1. Verified

    This commit was signed with the committer’s verified signature.
    dyladan Daniel Dyla
    Copy the full SHA
    bf30779 View commit details
  2. Move node module file to root

    dyladan committed Nov 20, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    dyladan Daniel Dyla
    Copy the full SHA
    4cbb635 View commit details
  3. Export node module file

    dyladan committed Nov 20, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    dyladan Daniel Dyla
    Copy the full SHA
    21da78f View commit details

Commits on Nov 21, 2023

  1. Merge pull request #4308 from dyladan/next-main-11-16

    [next] merge main
    dyladan authored Nov 21, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    26fcb88 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    5be08f4 View commit details
  3. Bump to 18 on other workflows

    dyladan committed Nov 21, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    dyladan Daniel Dyla
    Copy the full SHA
    dc10b81 View commit details
  4. Merge branch 'deprecate-old-runtimes' of github.com:dyladan/opentelem…

    …etry-js into deprecate-old-runtimes
    dyladan committed Nov 21, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    dyladan Daniel Dyla
    Copy the full SHA
    3b8f0af View commit details

Commits on Nov 22, 2023

  1. Benchmark a tested version

    dyladan committed Nov 22, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    dyladan Daniel Dyla
    Copy the full SHA
    543f0b4 View commit details
  2. Merge pull request #4295 from dyladan/deprecate-old-runtimes

    [next] Deprecate old runtimes
    dyladan authored Nov 22, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    35be022 View commit details

Commits on Dec 12, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    09bdeba View commit details

Commits on Dec 13, 2023

  1. [next] merge changes from main (#4363)

    * Add Trent to approvers (#4311)
    
    * chore(renovate): require dashboard approval for lerna updates (#4276)
    
    * chore(ci): install semver globally to speed up "peer-api" workflow (#4270)
    
    Closes: #4242
    
    * fix(ci): remove token setup via environment variable from .npmrc (#4329)
    
    * fix(instrumentation-http): resume responses when there is no response listener
    
    Fixes a memory leak where unhandled response bodies pile up in node 20
    
    * feat: add script to update changelogs on release preparation (#4315)
    
    * feat: add script to update changelogs on releases
    
    * fix: address comments
    
    * Apply suggestions from code review
    
    Co-authored-by: Trent Mick <trentm@gmail.com>
    
    * fix: apply suggestions from code review
    
    * fix: use packageJson.version instead of version
    
    ---------
    
    Co-authored-by: Trent Mick <trentm@gmail.com>
    
    * Fix event name
    
    * test: make rawRequest HTTP-compliant
    
    * Add node 20 to test matrix
    
    * Enable old hash functions on 20
    
    * Fix esm handling for iitm node 20
    
    * Use err.code to make test more reliable
    
    * Changelog
    
    * nit: single import
    
    * Remove unused files
    
    * Add v20 to supported runtimes
    
    * ci: add npm cache in actions/setup-node (#4271)
    
    * feat(sdk-logs): add droppedAttributesCount field to ReadableLogRecord (#4289)
    
    * feat(sdk-logs): add droppedAttributesCount field to ReadableLogRecord
    
    * chore: check droppedAttributesCount value in test case
    
    * feat(otlp-transformer): make toLogRecord() use ReadableLogRecord.droppedAttributesCount
    
    ---------
    
    Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
    
    * fix(api-logs): allow passing in TimeInput for LogRecord (#4345)
    
    * fix: allow passing in TimeInput for LogRecord
    
    * chore: update changelog
    
    * fix: programmatic url and headers take precedence in metric exporters… (#4334)
    
    * fix: programmatic url and headers take precedence in metric exporters (#2370)
    
    * chore: adjust grpc exporter metrics test
    
    * chore(changelog): update changelog
    
    * fix(instrumentation-http): do not mutate given headers object for outgoing http requests (#4346)
    
    Fixes: open-telemetry/opentelemetry-js-contrib#1609
    
    * chore(deps): update actions/stale action to v9 (#4353)
    
    * fix(deps): update dependency import-in-the-middle to v1.6.0 (#4357)
    
    * chore(deps): update all patch versions (#4306)
    
    * chore(ci): use node 20 in lint workflow (#4359)
    
    * chore(deps): update dependency linkinator to v6 (#4237)
    
    * fix(otlp-exporter-base): decrease default concurrency limit to 30 (#4211)
    
    * fix(otlp-exporter-base): decrease concurrency limit to 30
    
    * fix(changelog): add changelog entry
    
    * chore(deps): use actions/checkout >4 instead of 4.0.0 exactly (#4361)
    
    ---------
    
    Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
    Co-authored-by: strivly <133362191+strivly@users.noreply.github.com>
    Co-authored-by: Trent Mick <trentm@gmail.com>
    Co-authored-by: lyzlisa <34400837+lyzlisa@users.noreply.github.com>
    Co-authored-by: Hyun Oh <hyunnoh01@gmail.com>
    Co-authored-by: Siim Kallas <siimkallas@gmail.com>
    Co-authored-by: Vladimir Adamić <441333+Vunovati@users.noreply.github.com>
    Co-authored-by: Mend Renovate <bot@renovateapp.com>
    9 people authored Dec 13, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ea8bfa2 View commit details
  2. chore: remove checks for unsupported versions (#4341)

    * chore: remove checks for unsupported versions
    
    * Remove final version checks
    
    * Changelog
    
    * Lint
    dyladan authored Dec 13, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ba00147 View commit details

Commits on Jan 15, 2024

  1. [next] remove README and add warning (#4226)

    Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
    dyladan and pichlermarc authored Jan 15, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    fac6d14 View commit details

Commits on Jan 17, 2024

  1. chore(otel-core): replace deprecated SpanAttributes (#4408)

    * chore(otel-core): replace deprecated spanAttributes
    
    * update changelog
    
    * keep new line at bottom of package.json
    JamieDanielson authored Jan 17, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    7f613e0 View commit details

Commits on Jan 19, 2024

  1. chore(shim-opentracing): replace deprecated spanAttributes (#4430)

    * chore(shim-opentracing): replace deprecated spanAttributes
    
    * update minimum api version to 1.1
    
    * keep newline in package.json
    
    * update changelog
    JamieDanielson authored Jan 19, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    9727686 View commit details

Commits on Jan 22, 2024

  1. chore(otel-resources): replace deprecated spanAttributes (#4428)

    * chore(otel-resources): replace deprecated spanAttributes
    
    * update minimum api version to 1.1
    
    * update changelog
    
    * per legendecas, add todo for ResourceAttributes
    
    ---------
    
    Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
    JamieDanielson and pichlermarc authored Jan 22, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    0aba75c View commit details

Commits on Jan 24, 2024

  1. feat(sdk-metrics)!: remove MeterProvider.addMetricReader() in favor o…

    …f constructor option (#4419)
    
    * feat(sdk-metrics)!: remove MeterProvider.addMetricReader() in favor of constructor option
    
    * fix(changelog): add changelog entry
    pichlermarc authored Jan 24, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    a9af247 View commit details

Commits on Feb 9, 2024

  1. Copy the full SHA
    b7c5382 View commit details
  2. chore: fix conflicts

    pichlermarc committed Feb 9, 2024
    Copy the full SHA
    19b433e View commit details

Commits on Feb 12, 2024

  1. Merge pull request #4471 from dynatrace-oss-contrib/next-main-02-09

     `[next]` merge changes from `main`
    pichlermarc authored Feb 12, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    83becc7 View commit details

Commits on Feb 23, 2024

  1. Merge branch 'main' into next-main-2024-02-23

    pichlermarc committed Feb 23, 2024
    Copy the full SHA
    12dec9b View commit details

Commits on Mar 7, 2024

  1. Merge pull request #4503 from dynatrace-oss-contrib/next-main-2024-02-23

    [next] merge changes from `main`
    pichlermarc authored Mar 7, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    c379326 View commit details
  2. [next] merge changes from main

    pichlermarc committed Mar 7, 2024
    Copy the full SHA
    6804066 View commit details

Commits on Mar 11, 2024

  1. Merge pull request #4531 from dynatrace-oss-contrib/next-main-2024-03-07

    [next] merge changes from main
    pichlermarc authored Mar 11, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    a30989f View commit details

Commits on Jun 18, 2024

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    55f15e9 View commit details

Commits on Jul 30, 2024

  1. Merge branch 'main' into next-main-2024-07-30

    pichlermarc committed Jul 30, 2024
    Copy the full SHA
    154155f View commit details
  2. chore: clean up merge

    pichlermarc committed Jul 30, 2024
    Copy the full SHA
    eee78fa View commit details

Commits on Jul 31, 2024

  1. Merge pull request #4887 from dynatrace-oss-contrib/next-main-2024-07-30

    [next] merge latest changes from `main`
    pichlermarc authored Jul 31, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    bb9caaf View commit details

Commits on Aug 21, 2024

  1. Merge branch 'main' into next-main-2024-08-21

    pichlermarc committed Aug 21, 2024
    Copy the full SHA
    00683ff View commit details

Commits on Aug 22, 2024

  1. Merge pull request #4934 from dynatrace-oss-contrib/next-main-2024-08-21

    [next] merge changes from main
    pichlermarc authored Aug 22, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    f7dccbf View commit details

Commits on Sep 23, 2024

  1. Copy the full SHA
    f4d0dcf View commit details
  2. [next] merge changes from main

    pichlermarc committed Sep 23, 2024
    Copy the full SHA
    32564ad View commit details
  3. Merge pull request #5010 from dynatrace-oss-contrib/next-main-2024-09-23

    [next] merge changes from main
    pichlermarc authored Sep 23, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    1804925 View commit details

Commits on Sep 25, 2024

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    e15d5b3 View commit details

Commits on Sep 26, 2024

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    91c67ba View commit details

Commits on Sep 27, 2024

  1. fix(sdk-trace): make activeSpanProcessor private (#4965)

    Co-authored-by: David Luna <david.luna@elastic.co>
    legalimpurity and david-luna authored Sep 27, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    98143af View commit details

Commits on Oct 8, 2024

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    8fed1b1 View commit details
  2. [next] merge changes from main

    pichlermarc committed Oct 8, 2024
    Copy the full SHA
    b057c93 View commit details

Commits on Oct 10, 2024

  1. Merge pull request #5052 from dynatrace-oss-contrib/next-main-2024-10-08

    [next] merge changes from main
    pichlermarc authored Oct 10, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    cc8c54a View commit details

Commits on Oct 14, 2024

  1. docs: [Browser] Define the support browser runtimes (#5059)

    Co-authored-by: Jackson Weber <47067795+JacksonWeber@users.noreply.github.com>
    MSNev and JacksonWeber authored Oct 14, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    dcc1a87 View commit details

Commits on Oct 21, 2024

  1. refactor(sdk-trace-base)!: remove Span class from exports (#5048)

    Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
    david-luna and pichlermarc authored Oct 21, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    508946c View commit details
Showing 530 changed files with 27,218 additions and 24,296 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
@@ -67,14 +67,14 @@ body:
const opentelemetry = require('@opentelemetry/sdk-node');
const { getNodeAutoInstrumentations } = require('@opentelemetry/auto-instrumentations-node');
const { ConsoleSpanExporter } = require('@opentelemetry/sdk-trace-base');
const { Resource } = require('@opentelemetry/resources');
const { resourceFromAttributes } = require('@opentelemetry/resources');
const { SEMRESATTRS_SERVICE_NAME } = require('@opentelemetry/semantic-conventions');
// configure the SDK to export telemetry data to the console
// enable all auto-instrumentations from the meta package
const traceExporter = new ConsoleSpanExporter();
const sdk = new opentelemetry.NodeSDK({
resource: new Resource({
resource: resourceFromAttributes({
[SEMRESATTRS_SERVICE_NAME]: 'my-service',
}),
traceExporter,
3 changes: 2 additions & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This action requires that any PR targeting the main branch should touch at
# This action requires that any PR targeting the main and next branch should touch at
# least one CHANGELOG file. If a CHANGELOG entry is not required, add the "Skip
# Changelog" label to disable this action.

@@ -9,6 +9,7 @@ on:
types: [opened, synchronize, reopened, labeled, unlabeled]
branches:
- main
- next
jobs:
changelog:
runs-on: ubuntu-latest
20 changes: 20 additions & 0 deletions .github/workflows/fossa.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: FOSSA scanning

on:
push:
branches:
- main

permissions:
contents: read

jobs:
fossa:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- uses: fossas/fossa-action@93a52ecf7c3ac7eb40f5de77fd69b1a19524de94 # v1.5.0
with:
api-key: ${{secrets.FOSSA_API_KEY}}
team: OpenTelemetry
2 changes: 1 addition & 1 deletion .github/workflows/publish-to-npm.yml
Original file line number Diff line number Diff line change
@@ -38,4 +38,4 @@ jobs:
# (packages are in-fact published in the correct order), but the race on the registry still applies.
# If this happens, run the workflow again - there should be enough time for everything to settle until this workflow
# attempts to publish again.
run: npx lerna publish --concurrency 1 from-package --no-push --no-private --no-git-tag-version --no-verify-access --yes
run: npx lerna publish --concurrency 1 from-package --no-push --no-private --no-git-tag-version --no-verify-access --dist-tag=latest --yes
41 changes: 41 additions & 0 deletions .github/workflows/survey-on-merged-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Survey on Merged PR by Non-Member

on:
pull_request_target:
types: [closed]

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

jobs:
comment-on-pr:
name: Add survey to PR if author is not a member
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
if: github.event.pull_request.merged == true
steps:
- uses: actions/checkout@v4
- name: Check if user is a member of the org
id: check-membership
run: |
USERNAME=$(jq -r '.pull_request.user.login' "$GITHUB_EVENT_PATH")
ORG="${{ github.repository_owner }}"
STATUS=$(gh api "orgs/$ORG/members/$USERNAME" --silent && echo "true" || echo "false")
if [[ "$STATUS" == "true" ]]; then
echo "MEMBER_FOUND=true" >> $GITHUB_ENV
else
echo "MEMBER_FOUND=false" >> $GITHUB_ENV
fi
env:
GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}

- name: Add comment to PR if author is not a member
if: env.MEMBER_FOUND == 'false'
run: |
USERNAME=$(jq -r '.pull_request.user.login' "$GITHUB_EVENT_PATH")
gh pr comment ${PR_NUM} --repo open-telemetry/opentelemetry-js --body "Thank you for your contribution @${USERNAME}! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this [survey](${SURVEY_URL})."
env:
GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
73 changes: 25 additions & 48 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
@@ -12,11 +12,12 @@ jobs:
fail-fast: false
matrix:
node_version:
- "14"
- "16"
- "18.19.0"
- "18"
- "20.6.0"
- "20"
- "22"
- "23"
runs-on: ubuntu-latest
env:
NPM_CONFIG_UNSAFE_PERM: true
@@ -31,25 +32,37 @@ jobs:
package-lock.json
node-version: ${{ matrix.node_version }}

- run: npm install -g npm@latest
if: ${{ matrix.node_version == '20' || matrix.node_version == '22' }}

# npm@10.0.0 drops support for Node.js v14 and v16
- run: npm install -g npm@"<10.0.0"
if: ${{ matrix.node_version == '14' || matrix.node_version == '16' }}

# npm@11.0.0 drops support for Node.js v18
# Install the latest npm compatible with this version of Node.js
# - npm@11.1.0 supports: {"node":"^20.17.0 || >=22.9.0"}
- run: npm install -g npm@"<11.0.0"
if: ${{ matrix.node_version == '18'}}
if: ${{
matrix.node_version == '18.19.0' ||
matrix.node_version == '18' ||
matrix.node_version == '20.6.0'
}}
- run: npm install -g npm@latest
if: ${{
matrix.node_version == '20' ||
matrix.node_version == '22' ||
matrix.node_version == '23'
}}

- name: Bootstrap
run: npm ci

- name: Build 🔧
run: npm run compile

- name: Unit tests
run: npm run test
- run: npm test
if: ${{ matrix.node_version != '23' }}
# Node.js 23 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' }}

- name: Report Coverage
uses: codecov/codecov-action@v5
env:
@@ -140,39 +153,3 @@ jobs:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
verbose: true
api-eol-node-test:
strategy:
fail-fast: false
matrix:
node_version:
- "8"
- "10"
- "12"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
cache: 'npm'
cache-dependency-path: |
package-lock.json
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
node ../scripts/version-update.js
npx tsc --build tsconfig.json tsconfig.esm.json
- name: Test
working-directory: ./api
# running test:eol as node 8 is not supported anymore by the version of nyc we use, as we don't report coverage
# for this step we leave it out.
# Details: nyc requires istanbul-lib-report, which silently dropped support for Node.js v8 when going from
# 3.0.0 to 3.0.1 by requiring make-dir@^4.0.0 to fix https://github.com/advisories/GHSA-c2qf-rxjj-qqgw.
# make-dir does not support Node.js v8 anymore.
run: npm run test:eol
2 changes: 1 addition & 1 deletion .github/workflows/w3c-integration-test.yml
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ jobs:
cache: 'npm'
cache-dependency-path: |
package-lock.json
node-version: '16'
node-version: 18

- name: Install and Bootstrap 🔧
run: npm ci
Loading