Skip to content

Commit

Permalink
[next] merge changes from main (#4363)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
9 people committed Dec 13, 2023
1 parent 09bdeba commit ea8bfa2
Show file tree
Hide file tree
Showing 76 changed files with 914 additions and 492 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/benchmark.yml
Expand Up @@ -17,10 +17,13 @@ jobs:
NPM_CONFIG_UNSAFE_PERM: true
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
cache: 'npm'
cache-dependency-path: |
package-lock.json
node-version: ${{ matrix.node_version }}

- run: npm install -g npm@latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/close-stale.yml
Expand Up @@ -7,7 +7,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
- uses: actions/stale@v9
with:
days-before-stale: 60
days-before-close: 14
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/docs.yaml
Expand Up @@ -13,6 +13,9 @@ jobs:

- uses: actions/setup-node@v4
with:
cache: 'npm'
cache-dependency-path: |
package-lock.json
node-version: '18'

- name: Install and Build 🔧
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/lint.yml
Expand Up @@ -12,11 +12,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18

- uses: actions/checkout@v4
cache: 'npm'
cache-dependency-path: |
package-lock.json
node-version: '20'

- name: Lint changelog file
uses: avto-dev/markdown-lint@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/peer-api.yml
Expand Up @@ -20,7 +20,7 @@ jobs:
run: npm install -g lerna@6.6.2

- name: Install semver
run: npm install semver
run: npm install -g semver

- name: Check API dependency semantics
working-directory: packages
Expand Down
19 changes: 17 additions & 2 deletions .github/workflows/unit-test.yml
Expand Up @@ -13,7 +13,7 @@ jobs:
matrix:
node_version:
- "18"
# - "20" # disabled until http instrumentation can be fixed
- "20"
runs-on: ubuntu-latest
env:
NPM_CONFIG_UNSAFE_PERM: true
Expand All @@ -23,6 +23,9 @@ jobs:

- uses: actions/setup-node@v4
with:
cache: 'npm'
cache-dependency-path: |
package-lock.json
node-version: ${{ matrix.node_version }}

- run: npm install -g npm@latest
Expand Down Expand Up @@ -51,6 +54,9 @@ jobs:

- uses: actions/setup-node@v4
with:
cache: 'npm'
cache-dependency-path: |
package-lock.json
node-version: '18'

- run: npm install -g npm@latest
Expand All @@ -77,6 +83,9 @@ jobs:

- uses: actions/setup-node@v4
with:
cache: 'npm'
cache-dependency-path: |
package-lock.json
node-version: 18

- name: Bootstrap
Expand All @@ -95,9 +104,12 @@ jobs:
NPM_CONFIG_UNSAFE_PERM: true
steps:
- name: Checkout
uses: actions/checkout@v4.0.0
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: 'npm'
cache-dependency-path: |
package-lock.json
node-version: 18

- name: Bootstrap
Expand Down Expand Up @@ -127,6 +139,9 @@ jobs:

- uses: actions/setup-node@v4
with:
cache: 'npm'
cache-dependency-path: |
package-lock.json
node-version: ${{ matrix.node_version }}

- name: Build
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/w3c-integration-test.yml
Expand Up @@ -16,6 +16,9 @@ jobs:

- uses: actions/setup-node@v4
with:
cache: 'npm'
cache-dependency-path: |
package-lock.json
node-version: 18

- name: Install and Bootstrap 🔧
Expand Down
1 change: 0 additions & 1 deletion .npmrc
@@ -1,2 +1 @@
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
lockfile-version=2
18 changes: 9 additions & 9 deletions CHANGELOG.md
Expand Up @@ -9,6 +9,10 @@ For experimental package changes, see the [experimental CHANGELOG](experimental/

### :boom: Breaking Change

* fix(otlp-exporter-base)!: decrease default concurrency limit to 30 [#4211](https://github.com/open-telemetry/opentelemetry-js/pull/4211) @pichlermarc
* fixes a memory leak on prolonged collector unavailability
* this change is marked as breaking as it changes defaults

### :rocket: (Enhancement)

### :books: (Refine Doc)
Expand All @@ -17,9 +21,11 @@ For experimental package changes, see the [experimental CHANGELOG](experimental/

* chore: type reference on zone.js [#4257](https://github.com/open-telemetry/opentelemetry-js/pull/4257) @legendecas
* chore: no need for 'packages' in lerna.json [#4264](https://github.com/open-telemetry/opentelemetry-js/pull/4264) @trentm
* test: add node 20 to test matrix [#4336](https://github.com/open-telemetry/opentelemetry-js/pull/4336) @dyladan

### :bug: (Bug Fix)

* fix(api-logs): allow for TimeInput type for LogRecord timestamps [#4345](https://github.com/open-telemetry/opentelemetry-js/pull/4345)
* fix(sdk-trace-web): only access location if it is defined [#4063](https://github.com/open-telemetry/opentelemetry-js/pull/4063)
* fix(sdk-trace-base): processor onStart called with a span having empty attributes

Expand Down Expand Up @@ -365,16 +371,8 @@ There are no changes between 1.0.0 and the previous 0.33.0 version.

* fix(sdk-web): parse url with relative url string [#2972](https://github.com/open-telemetry/opentelemetry-js/pull/2972) @legendecas

### :books: (Refine Doc)

### :house: (Internal)

## 1.2.0

### :boom: Breaking Change

### :rocket: (Enhancement)

### :bug: (Bug Fix)

* fix: sanitize attributes inputs [#2881](https://github.com/open-telemetry/opentelemetry-js/pull/2881) @legendecas
Expand Down Expand Up @@ -2290,7 +2288,9 @@ Released 2020-03-19

Released 2020-03-16

### This is a first official beta release, which provides almost fully complete metrics, tracing, and context propagation functionality but makes no promises around breaking changes
### First official beta release

* provides almost fully complete metrics, tracing, and context propagation functionality but makes **no promises** around breaking changes

### :boom: Breaking Change

Expand Down
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -111,6 +111,7 @@ If you are a library author looking to build OpenTelemetry into your library, pl

| Platform Version | Supported |
|---------------------|-----------------------------------------------|
| Node.JS `v20` | :heavy_check_mark: |
| Node.JS `v18` | :heavy_check_mark: |
| Node.JS `v16` | :heavy_check_mark: |
| Node.JS `v14` | :heavy_check_mark: |
Expand Down Expand Up @@ -210,6 +211,7 @@ We have a weekly SIG meeting! See the [community page](https://github.com/open-t
- [Neville Wylie](https://github.com/MSNev), Microsoft
- [Purvi Kanal](https://github.com/pkanal), Honeycomb
- [Svetlana Brennan](https://github.com/svetlanabrennan), New Relic
- [Trent Mick](https://github.com/trentm), Elastic

*Find more about the approver role in [community repository](https://github.com/open-telemetry/community/blob/main/community-membership.md#approver).*

Expand Down
4 changes: 2 additions & 2 deletions api/package.json
Expand Up @@ -66,10 +66,10 @@
"access": "public"
},
"devDependencies": {
"@types/mocha": "10.0.4",
"@types/mocha": "10.0.6",
"@types/node": "18.6.5",
"@types/sinon": "10.0.20",
"@types/webpack": "4.41.36",
"@types/webpack": "4.41.38",
"@types/webpack-env": "1.16.3",
"babel-plugin-istanbul": "6.1.1",
"codecov": "3.8.3",
Expand Down
22 changes: 8 additions & 14 deletions experimental/CHANGELOG.md
Expand Up @@ -6,17 +6,21 @@ All notable changes to experimental packages in this project will be documented

### :boom: Breaking Change

* fix(exporter-metrics-otlp-grpc): programatic headers take precedence over environment variables [#2370](https://github.com/open-telemetry/opentelemetry-js/pull/4334) @Vunovati
* fix(exporter-metrics-otlp-http): programatic headers take precedence over environment variables [#2370](https://github.com/open-telemetry/opentelemetry-js/pull/4334) @Vunovati
* fix(exporter-metrics-otlp-proto): programatic headers take precedence over environment variables [#2370](https://github.com/open-telemetry/opentelemetry-js/pull/4334) @Vunovati

### :rocket: (Enhancement)

* feat(sdk-logs): add droppedAttributesCount field to ReadableLogRecord

### :bug: (Bug Fix)

* fix(sdk-logs): avoid map attribute set when count limit exceeded
* fix(instrumentation-fetch): only access navigator if it is defined [#4063](https://github.com/open-telemetry/opentelemetry-js/pull/4063)
* allows for experimental usage of this instrumentation with non-browser runtimes

### :books: (Refine Doc)

### :house: (Internal)
* fix(instrumentation-http): memory leak when responses are not resumed
* fix(instrumentation-http): Do not mutate given headers object for outgoing http requests. Fixes aws-sdk signing error on retries. [#4346](https://github.com/open-telemetry/opentelemetry-js/pull/4346)

## 0.45.1

Expand Down Expand Up @@ -183,8 +187,6 @@ All notable changes to experimental packages in this project will be documented

* doc(instrumentation): add limitiations section to readme [#3786](https://github.com/open-telemetry/opentelemetry-js/pull/3786) @flarna

### :house: (Internal)

## 0.38.0

### :boom: Breaking Change
Expand Down Expand Up @@ -401,10 +403,6 @@ All notable changes to experimental packages in this project will be documented
* fix(histogram): fix maximum when only values < -1 are provided [#3086](https://github.com/open-telemetry/opentelemetry-js/pull/3086) @pichlermarc
* fix(instrumentation-grpc): always set grpc semcov status code attribute with numeric value [#3076](https://github.com/open-telemetry/opentelemetry-js/pull/3076) @blumamir

### :books: (Refine Doc)

### :house: (Internal)

## 0.30.0

### :boom: Breaking Change
Expand Down Expand Up @@ -479,10 +477,6 @@ All notable changes to experimental packages in this project will be documented
* fix(metrics): specification compliant default metric unit [#2983](https://github.com/open-telemetry/opentelemetry-js/pull/2983) @andyfleming
* fix(opentelemetry-instrumentation): use all provided patches for the same file [#2963](https://github.com/open-telemetry/opentelemetry-js/pull/2963) @Ugzuzg

### :books: (Refine Doc)

### :house: (Internal)

## 0.28.0

### :boom: Breaking Change
Expand Down
2 changes: 1 addition & 1 deletion experimental/packages/api-events/package.json
Expand Up @@ -64,7 +64,7 @@
"@opentelemetry/api": "^1.0.0"
},
"devDependencies": {
"@types/mocha": "10.0.4",
"@types/mocha": "10.0.6",
"@types/node": "18.6.5",
"@types/webpack-env": "1.16.3",
"babel-plugin-istanbul": "6.1.1",
Expand Down
2 changes: 1 addition & 1 deletion experimental/packages/api-logs/package.json
Expand Up @@ -64,7 +64,7 @@
"@opentelemetry/api": "^1.0.0"
},
"devDependencies": {
"@types/mocha": "10.0.4",
"@types/mocha": "10.0.6",
"@types/node": "18.6.5",
"@types/webpack-env": "1.16.3",
"babel-plugin-istanbul": "6.1.1",
Expand Down
6 changes: 3 additions & 3 deletions experimental/packages/api-logs/src/types/LogRecord.ts
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import { AttributeValue, Context } from '@opentelemetry/api';
import { AttributeValue, Context, TimeInput } from '@opentelemetry/api';

export type LogAttributeValue = AttributeValue | LogAttributes;
export interface LogAttributes {
Expand Down Expand Up @@ -53,12 +53,12 @@ export interface LogRecord {
/**
* The time when the log record occurred as UNIX Epoch time in nanoseconds.
*/
timestamp?: number;
timestamp?: TimeInput;

/**
* Time when the event was observed by the collection system.
*/
observedTimestamp?: number;
observedTimestamp?: TimeInput;

/**
* Numerical value of the severity.
Expand Down
4 changes: 2 additions & 2 deletions experimental/packages/exporter-logs-otlp-grpc/package.json
Expand Up @@ -48,13 +48,13 @@
"access": "public"
},
"devDependencies": {
"@babel/core": "7.23.3",
"@babel/core": "7.23.6",
"@grpc/proto-loader": "^0.7.10",
"@opentelemetry/api": "1.7.0",
"@opentelemetry/api-logs": "0.45.1",
"@opentelemetry/otlp-exporter-base": "0.45.1",
"@opentelemetry/resources": "1.18.1",
"@types/mocha": "10.0.4",
"@types/mocha": "10.0.6",
"@types/node": "18.6.5",
"@types/sinon": "10.0.20",
"codecov": "3.8.3",
Expand Down
Expand Up @@ -49,6 +49,7 @@ export const mockedReadableLogRecord: ReadableLogRecord = {
attributes: {
'some-attribute': 'some attribute value',
},
droppedAttributesCount: 0,
severityNumber: SeverityNumber.ERROR,
severityText: 'error',
body: 'some_log_body',
Expand Down
4 changes: 2 additions & 2 deletions experimental/packages/exporter-logs-otlp-http/package.json
Expand Up @@ -71,10 +71,10 @@
],
"sideEffects": false,
"devDependencies": {
"@babel/core": "7.23.3",
"@babel/core": "7.23.6",
"@opentelemetry/api": "1.7.0",
"@opentelemetry/resources": "1.18.1",
"@types/mocha": "10.0.4",
"@types/mocha": "10.0.6",
"@types/node": "18.6.5",
"@types/sinon": "10.0.20",
"@types/webpack-env": "1.16.3",
Expand Down
Expand Up @@ -44,6 +44,7 @@ export const mockedReadableLogRecord: ReadableLogRecord = {
attributes: {
'some-attribute': 'some attribute value',
},
droppedAttributesCount: 0,
severityNumber: SeverityNumber.ERROR,
severityText: 'error',
body: 'some_log_body',
Expand Down
4 changes: 2 additions & 2 deletions experimental/packages/exporter-logs-otlp-proto/package.json
Expand Up @@ -63,9 +63,9 @@
"access": "public"
},
"devDependencies": {
"@babel/core": "7.23.3",
"@babel/core": "7.23.6",
"@opentelemetry/api": "1.7.0",
"@types/mocha": "10.0.4",
"@types/mocha": "10.0.6",
"@types/node": "18.6.5",
"@types/sinon": "10.0.20",
"babel-plugin-istanbul": "6.1.1",
Expand Down
Expand Up @@ -45,6 +45,7 @@ export const mockedReadableLogRecord: ReadableLogRecord = {
attributes: {
'some-attribute': 'some attribute value',
},
droppedAttributesCount: 0,
severityNumber: SeverityNumber.ERROR,
severityText: 'error',
body: 'some_log_body',
Expand Down
4 changes: 2 additions & 2 deletions experimental/packages/exporter-trace-otlp-grpc/package.json
Expand Up @@ -47,11 +47,11 @@
"access": "public"
},
"devDependencies": {
"@babel/core": "7.23.3",
"@babel/core": "7.23.6",
"@grpc/proto-loader": "^0.7.10",
"@opentelemetry/api": "1.7.0",
"@opentelemetry/otlp-exporter-base": "0.45.1",
"@types/mocha": "10.0.4",
"@types/mocha": "10.0.6",
"@types/node": "18.6.5",
"@types/sinon": "10.0.20",
"codecov": "3.8.3",
Expand Down

0 comments on commit ea8bfa2

Please sign in to comment.