Skip to content

Commit

Permalink
Merge branch 'main' into feat/initialize-export
Browse files Browse the repository at this point in the history
  • Loading branch information
pichlermarc authored Jan 20, 2025
2 parents 51d2019 + fc0edd8 commit 243d495
Show file tree
Hide file tree
Showing 462 changed files with 27,139 additions and 28,111 deletions.
74 changes: 58 additions & 16 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,61 @@ body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
Please make sure to fill out the entire form below,
providing as much context as you can in order to help us
triage and track down your bug as quickly as possible.
> [!IMPORTANT]
> **Please read all parts of this form carefully.** By following the instructions carefully, you ensure that we
> can get started fixing your bug, instead of being stuck at trying to reproduce your issue. Please provide
> all requested information, even if you think it does not apply to your problem.
>
> **If you use a third-party package that re-distributes OpenTelemetry, open the bug ticket with that third party unless you can provide steps to reproduce this with pure OpenTelemetry.**
> Digging into third-party distributions of OpenTelemetry is not in scope for this project.
Before filing a bug, please be sure you have searched through
[existing bugs](/~https://github.com/open-telemetry/opentelemetry-js/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Abug)
to see if your bug is already addressed.
If your bug is related to an instrumentation or plugin in [opentelemetry-js-contrib](/~https://github.com/open-telemetry/opentelemetry-js-contrib)
please be sure to file it there.
Before filing a bug, please be sure you have searched through [existing open bugs](/~https://github.com/open-telemetry/opentelemetry-js/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Abug)
to see if this bug has already been filed.
- type: markdown
attributes:
value: |
## Bug Reproduction
- type: textarea
attributes:
label: What happened?
description: Please provide as much detail as you reasonably can.
description: |
> [!IMPORTANT]
> **Please provide as much detail as you reasonably can.**
> We all know the complexities of developing with JavaScript/TypeScript. **Be specific** about your setup and **DO NOT** assume that the person handling your bug report knows how to use your specific combination of tooling. Always provide build instructions and config files.
value: |
## Steps to Reproduce
<!--
The most effective way to solve a bug is to provide a link to a reproducer repository. It is extremely difficult to exactly reproduce problems
and doing so can take multiple hours for us. You know your tooling and setup and we know OpenTelemetry JavaScript internals.
Let's help each other! :)
-->
## Expected Result
## Actual Result
## Additional Details
<!--
Anything you can think of that will help us reproduce and understand your problem:
- details about the behavior of the bug
- code to reproduce, if not provided via a repository above (including setting up any frameworks you may be using, we likely don't use the same tech-stack that you're using on the daily)
- which tooling you use and how you're using it
- config files for your tooling (typescript, bundlers, ...)
- how you run your code (example: `node -r otel.js ./index.js`).
- which module type you are you using (`module` or `commonjs`)
-->
validations:
required: true
- type: textarea
attributes:
label: OpenTelemetry Setup Code
description: Please provide the code you use to set up OpenTelemetry
description: |
Please provide the code you use to set up OpenTelemetry.
If you use `@opentelemetry/auto-instrumentations-node/register`, please state so here.
You may omit this step if you have provided a reproducer repository.
placeholder: | # This comes from our README.md
// tracing.js
// otel.js
'use strict'
Expand Down Expand Up @@ -75,13 +98,15 @@ body:
- type: textarea
attributes:
label: package.json
description: If possible, please provide your full package.json. If not, please provide at least your list of dependencies and their versions, especially OpenTelemetry versions.
description: |
Please provide your the full package.json needed to reproduce the issue.
You may omit this step if you provided a reproducer repository.
render: "JSON"
placeholder: |
{
"name": "my-app",
"scripts": {
"start": "node -r tracing.js app.js"
"start": "node -r otel.js app.js"
},
"dependencies": {
"@opentelemetry/api": "^1.3.0",
Expand All @@ -95,3 +120,20 @@ body:
description: |
Please copy and paste any relevant log output.
render: shell
- type: markdown
attributes:
value: |
## System Details
System Details help us when we cannot reproduce your problem with the information provided above. Sometimes bugs only surface on specific platforms and runtime versions.
- type: textarea
attributes:
label: Operating System and Version
placeholder: Ubuntu 24.04, Windows 11 Build 26100.2033, macOS 15.0.1
validations:
required: false
- type: textarea
attributes:
label: Runtime and Version
placeholder: Node.js v20.12.1, Node.js v18.18.2, Firefox 130, Chrome 132, ...
validations:
required: false
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Before creating a pull request, please make sure:
- You have read the guide for contributing
- See /~https://github.com/open-telemetry/opentelemetry-js/blob/main/CONTRIBUTING.md
- You signed all your commits (otherwise we won't be able to merge the PR)
- See /~https://github.com/open-telemetry/community/blob/master/CONTRIBUTING.md#sign-the-cla
- See /~https://github.com/open-telemetry/community/blob/main/guides/contributor#sign-the-cla
- You added unit tests for the new functionality
- You mention in the PR description which issue it is addressing, e.g. "Fixes #xxx". This will auto-close
the issue that your PR fixes (if such)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
fail-fast: false
matrix:
node_version:
- "18"
- "22"
runs-on: self-hosted
timeout-minutes: 10
env:
Expand Down
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.

Expand All @@ -9,6 +9,7 @@ on:
types: [opened, synchronize, reopened, labeled, unlabeled]
branches:
- main
- next
jobs:
changelog:
runs-on: ubuntu-latest
Expand Down
58 changes: 10 additions & 48 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ jobs:
fail-fast: false
matrix:
node_version:
- "14"
- "16"
- "18"
- "20"
- "22"
Expand All @@ -32,11 +30,11 @@ jobs:
node-version: ${{ matrix.node_version }}

- run: npm install -g npm@latest
if: ${{ matrix.node_version == '18' || matrix.node_version == '20' || matrix.node_version == '22' }}
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
- run: npm install -g npm@"<11.0.0"
if: ${{ matrix.node_version == '18'}}

- name: Bootstrap
run: npm ci
Expand All @@ -47,7 +45,7 @@ jobs:
- name: Unit tests
run: npm run test
- name: Report Coverage
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
Expand All @@ -65,7 +63,7 @@ jobs:
cache: 'npm'
cache-dependency-path: |
package-lock.json
node-version: '18'
node-version: '20'

- run: npm install -g npm@latest

Expand All @@ -92,7 +90,7 @@ jobs:
cache: 'npm'
cache-dependency-path: |
package-lock.json
node-version: 16
node-version: 22

- name: Bootstrap
run: npm ci
Expand All @@ -103,7 +101,7 @@ jobs:
- name: Unit tests
run: npm run test:browser
- name: Report Coverage
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
Expand All @@ -120,7 +118,7 @@ jobs:
cache: 'npm'
cache-dependency-path: |
package-lock.json
node-version: 16
node-version: 22

- name: Bootstrap
run: npm ci
Expand All @@ -131,44 +129,8 @@ jobs:
- name: Unit tests
run: npm run test:webworker
- name: Report Coverage
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
env:
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
Expand Up @@ -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
Expand Down
76 changes: 72 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,75 @@ For semantic convention package changes, see the [semconv CHANGELOG](packages/se

### :boom: Breaking Change

* feat(sdk-metrics)!: drop deprecated `type` field on `MetricDescriptor` [#5291](/~https://github.com/open-telemetry/opentelemetry-js/pull/5291) @chancancode
* feat(sdk-metrics)!: drop deprecated `InstrumentDescriptor` type; use `MetricDescriptor` instead [#5277](/~https://github.com/open-telemetry/opentelemetry-js/pull/5266) @chancancode
* feat(sdk-metrics)!: bump minimum version of `@opentelemetry/api` peer dependency to 1.9.0 [#5254](/~https://github.com/open-telemetry/opentelemetry-js/pull/5254) @chancancode
* chore(shim-opentracing): replace deprecated SpanAttributes [#4430](/~https://github.com/open-telemetry/opentelemetry-js/pull/4430) @JamieDanielson
* chore(otel-core): replace deprecated SpanAttributes [#4408](/~https://github.com/open-telemetry/opentelemetry-js/pull/4408) @JamieDanielson
* feat(sdk-metrics)!: remove MeterProvider.addMetricReader() in favor of constructor option [#4419](/~https://github.com/open-telemetry/opentelemetry-js/pull/4419) @pichlermarc
* chore(otel-resources): replace deprecated SpanAttributes [#4428](/~https://github.com/open-telemetry/opentelemetry-js/pull/4428) @JamieDanielson
* feat(sdk-metrics)!: remove MeterProvider.addMetricReader() in favor of constructor option [#4419](/~https://github.com/open-telemetry/opentelemetry-js/pull/4419) @pichlermarc
* feat(sdk-metrics)!: replace attributeKeys with custom processors option [#4532](/~https://github.com/open-telemetry/opentelemetry-js/pull/4532) @pichlermarc
* refactor(sdk-trace-base)!: replace `SpanAttributes` with `Attributes` [#5009](/~https://github.com/open-telemetry/opentelemetry-js/pull/5009) @david-luna
* refactor(resources)!: replace `ResourceAttributes` with `Attributes` [#5016](/~https://github.com/open-telemetry/opentelemetry-js/pull/5016) @david-luna
* feat(sdk-metrics)!: drop `View` and `Aggregation` in favor of `ViewOptions` and `AggregationOption` [#4931](/~https://github.com/open-telemetry/opentelemetry-js/pull/4931) @pichlermarc
* refactor(sdk-trace-base)!: remove `new Span` constructor in favor of `Tracer.startSpan` API [#5048](/~https://github.com/open-telemetry/opentelemetry-js/pull/5048) @david-luna
* refactor(sdk-trace-base)!: remove `BasicTracerProvider.addSpanProcessor` API in favor of constructor options. [#5134](/~https://github.com/open-telemetry/opentelemetry-js/pull/5134) @david-luna
* refactor(sdk-trace-base)!: make `resource` property private in `BasicTracerProvider` and remove `getActiveSpanProcessor` API. [#5192](/~https://github.com/open-telemetry/opentelemetry-js/pull/5192) @david-luna
* feat(core)!: remove deprecated `IdGenerator` and `RandomIdGenerator` [#5309](/~https://github.com/open-telemetry/opentelemetry-js/pull/5309) @pichlermarc
* feat(core)!: remove deprecated type `InstrumentationLibrary` [#5308](/~https://github.com/open-telemetry/opentelemetry-js/pull/5308) @pichlermarc
* (user-facing): please use equivalent type `InstrumentationScope` instead
* feat(sdk-trace-base)!: replace usages fo `InstrumentationLibrary` with `InstrumentationScope` [#5308](/~https://github.com/open-telemetry/opentelemetry-js/pull/5308) @pichlermarc
* (user-facing) rename `Tracer.instrumentationLibrary` -> `Tracer.instrumentationScope`
* (user-facing) rename `ReadableSpan.instrumentationLibrary` -> `ReadableSpan.instrumentationScope`
* also renames the property in implementations of `ReadableSpan`
* feat(exporter-jaeger): use `ReadableSpan.instrumentationScope` over `ReadableSpan.instrumentationLibrary` [#5308](/~https://github.com/open-telemetry/opentelemetry-js/pull/5308) @pichlermarc
* feat(exporter-zipkin): use `ReadableSpan.instrumentationScope` over `ReadableSpan.instrumentationLibrary` [#5308](/~https://github.com/open-telemetry/opentelemetry-js/pull/5308) @pichlermarc
* chore!: update typescript to version `5.0.4` [#5145](/~https://github.com/open-telemetry/opentelemetry-js/pull/5145) @david-luna
* (user-facing) dropped support for `typescript@<5.0.4`
* (user-facing) all packages published from this repository will from now on drop support for old versions of `typescript` in minor releases. We will only drop support for versions that are older than 2 years.
* feat(core)!: remove deprecated samplers [#5316](/~https://github.com/open-telemetry/opentelemetry-js/pull/5316) @pichlermarc
* (user-facing): deprecated `AlwaysOnSampler` has moved to `@opentelemetry/sdk-trace-base`
* (user-facing): deprecated `AlwaysOffSampler` has moved to `@opentelemetry/sdk-trace-base`
* (user-facing): deprecated `TraceIdRatioSampler` has moved to `@opentelemetry/sdk-trace-base`
* (user-facing): deprecated `TraceIdRatioSampler` has moved to `@opentelemetry/sdk-trace-base`

### :rocket: (Enhancement)

### :bug: (Bug Fix)

* fix(sdk-metrics): do not export from `PeriodicExportingMetricReader` when there are no metrics to export. [#5288](/~https://github.com/open-telemetry/opentelemetry-js/pull/5288) @jacksonweber

### :books: (Refine Doc)

### :house: (Internal)

* refactor(sdk-metrics): the internal `InstrumentDescriptor` type now extends `MetricDescriptor`; moved public `InstrumentType` type enum into `./src/export/MetricData.ts` [#5277](/~https://github.com/open-telemetry/opentelemetry-js/pull/5266)
* refactor(sdk-metrics): remove `Gauge` and `MetricAdvice` workaround types in favor of the upstream `@opentelemetry/api` types [#5254](/~https://github.com/open-telemetry/opentelemetry-js/pull/5254) @chancancode
* chore: remove checks for unsupported node versions [#4341](/~https://github.com/open-telemetry/opentelemetry-js/pull/4341) @dyladan
* refactor(sdk-trace-base): remove `BasicTracerProvider._registeredSpanProcessors` private property. [#5134](/~https://github.com/open-telemetry/opentelemetry-js/pull/5134) @david-luna
* refactor(sdk-trace-base): rename `BasicTracerProvider.activeSpanProcessor` private property. [#5211](/~https://github.com/open-telemetry/opentelemetry-js/pull/5211) @david-luna
* chore(selenium-tests): remove internal selenium-tests/ package, it wasn't being used @trentm

## 1.30.0

### :rocket: (Enhancement)

* feat(sdk-metrics): PeriodicExportingMetricReader now flushes pending tasks at shutdown [#5242](/~https://github.com/open-telemetry/opentelemetry-js/pull/5242)

### :bug: (Bug Fix)

* fix(sdk-trace-base): do not load OTEL_ env vars on module load, but when needed [#5233](/~https://github.com/open-telemetry/opentelemetry-js/pull/5233)
* fix(instrumentation-xhr, instrumentation-fetch): content length attributes no longer get removed with `ignoreNetworkEvents: true` being set [#5229](/~https://github.com/open-telemetry/opentelemetry-js/issues/5229)

## 1.29.0

### :rocket: (Enhancement)

* feat(sdk-metrics): Add support for aggregation cardinality limit with a default limit of 2000. This limit can be customized via views [#5128](/~https://github.com/open-telemetry/opentelemetry-js/pull/5128)

## 1.28.0

### :rocket: (Enhancement)

* feat(sdk-metrics, sdk-trace): add `mergeResourceWithDefaults` flag, which allows opting-out of resources getting merged with the default resource [#4617](/~https://github.com/open-telemetry/opentelemetry-js/pull/4617)
Expand All @@ -22,13 +91,10 @@ For semantic convention package changes, see the [semconv CHANGELOG](packages/se
### :bug: (Bug Fix)

* fix(sdk-metrics): await exports in `PeriodicExportingMetricReader` when async resource attributes have not yet settled [#5119](/~https://github.com/open-telemetry/opentelemetry-js/pull/5119/) @pichlermarc
* fix(sdk-trace): performance.now() may return the same value for consecutive calls [#5150](/~https://github.com/open-telemetry/opentelemetry-js/pull/5150) @dyladan
* fix(sdk-trace-base): pass BatchSpanProcessor#forceFlush() errors on visibilitychange/pagehide to globalErrorHandler [#5143](/~https://github.com/open-telemetry/opentelemetry-js/pull/5143) @pichlermarc
* fixes a bug where switching browser tabs with a failing exporter would cause an unhandled error

### :books: (Refine Doc)

### :house: (Internal)

## 1.27.0

### :rocket: (Enhancement)
Expand All @@ -45,6 +111,8 @@ For semantic convention package changes, see the [semconv CHANGELOG](packages/se
* `@opentelemetry/propagator-aws-xray` is now located in [open-telemetry/opentelemetry-js-contrib](/~https://github.com/open-telemetry/opentelemetry-js-contrib)
* `@opentelemetry/propagator-aws-xray-lambda` is now located in [open-telemetry/opentelemetry-js-contrib](/~https://github.com/open-telemetry/opentelemetry-js-contrib)

* docs: [Browser] Define the supported browser runtimes [Issue #4168](/~https://github.com/open-telemetry/opentelemetry-js/issues/4168) PR:[#5059](/~https://github.com/open-telemetry/opentelemetry-js/pull/5059) @MSNev

### :house: (Internal)

* deps: set `@opentelemetry/api` dependency min version to 1.3.0 in `examples`, `experimental/packages`, `integration-tests` and `selenium-tests`
Expand Down
Loading

0 comments on commit 243d495

Please sign in to comment.