Skip to content

Commit

Permalink
Merge branch 'next' into feat/remove-tracerprovider-exporter-extensib…
Browse files Browse the repository at this point in the history
…ility
  • Loading branch information
pichlermarc authored Dec 20, 2024
2 parents 2eae41a + b8d7966 commit a84b54d
Show file tree
Hide file tree
Showing 125 changed files with 2,289 additions and 1,924 deletions.
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
11 changes: 8 additions & 3 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ jobs:
node-version: ${{ matrix.node_version }}

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

# [email protected] 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 Down Expand Up @@ -58,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 @@ -85,7 +90,7 @@ jobs:
cache: 'npm'
cache-dependency-path: |
package-lock.json
node-version: 18
node-version: 22

- name: Bootstrap
run: npm ci
Expand Down Expand Up @@ -113,7 +118,7 @@ jobs:
cache: 'npm'
cache-dependency-path: |
package-lock.json
node-version: 18
node-version: 22

- name: Bootstrap
run: npm ci
Expand Down
17 changes: 13 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,26 @@ For semantic convention package changes, see the [semconv CHANGELOG](packages/se

### :bug: (Bug Fix)

* fix(sdk-trace-base): do not load OTEL_ env vars on module load, but when needed [#5224](https://github.com/open-telemetry/opentelemetry-js/pull/5224)

### :books: (Refine Doc)

### :house: (Internal)

## 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

### :boom: Breaking Change
### :rocket: (Enhancement)

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

Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG_NEXT.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### :boom: Breaking Change

* 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
Expand All @@ -29,6 +30,7 @@

### :house: (Internal)

* 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
Expand Down
6 changes: 3 additions & 3 deletions api/test/tree-shaking/tree-shaking.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import * as realFs from 'fs';
* Webpack doesn't run in node 8 because it requires BigInt. Since we are testing
* build tooling here, we can safely skip tooling we know can't run anyway.
*/
describe('tree-shaking', () => {
describe('tree-shaking', function () {
const allowedAPIs = ['ContextAPI', 'DiagAPI'];
const testAPIs = [
{
Expand All @@ -50,7 +50,7 @@ describe('tree-shaking', () => {
const outputPath = path.join(__dirname, 'output');
const outputFilename = path.join(outputPath, 'bundle.js');

afterEach(() => {
afterEach(function () {
try {
mfs.unlinkSync(outputFilename);
} catch {
Expand Down Expand Up @@ -122,6 +122,6 @@ describe('tree-shaking', () => {
allowedAPIs.forEach(it => matches.delete(it));

assert.deepStrictEqual(Array.from(matches), [testAPI.name]);
});
}).timeout(5000);
}
});
2 changes: 1 addition & 1 deletion doc/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ that are used are Prometheus and OTLP.

The latter is the [OpenTelemetry protocol format](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/otlp.md)
which is supported by the OpenTelemetry Collector. The former is based on the [OpenMetrics
format](https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md) can be consumed by Prometheus and Thanos or other OpenMetrics compatible
format](https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md) can be consumed by Prometheus and Thanos or other OpenMetrics compatible
backends.

_Note_: Both OpenTelemetry JavaScript and OpenTelemetry Collector support
Expand Down
14 changes: 7 additions & 7 deletions examples/esm-http-ts/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "esm-http-ts",
"private": true,
"version": "0.56.0",
"version": "0.57.0",
"description": "Example of HTTP integration with OpenTelemetry using ESM and TypeScript",
"main": "build/index.js",
"type": "module",
Expand Down Expand Up @@ -32,12 +32,12 @@
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/",
"dependencies": {
"@opentelemetry/api": "1.9.0",
"@opentelemetry/exporter-trace-otlp-proto": "0.56.0",
"@opentelemetry/instrumentation": "0.56.0",
"@opentelemetry/instrumentation-http": "0.56.0",
"@opentelemetry/resources": "1.29.0",
"@opentelemetry/sdk-trace-base": "1.29.0",
"@opentelemetry/sdk-trace-node": "1.29.0",
"@opentelemetry/exporter-trace-otlp-proto": "0.57.0",
"@opentelemetry/instrumentation": "0.57.0",
"@opentelemetry/instrumentation-http": "0.57.0",
"@opentelemetry/resources": "1.30.0",
"@opentelemetry/sdk-trace-base": "1.30.0",
"@opentelemetry/sdk-trace-node": "1.30.0",
"@opentelemetry/semantic-conventions": "1.28.0"
}
}
16 changes: 8 additions & 8 deletions examples/http/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "http-example",
"private": true,
"version": "0.56.0",
"version": "0.57.0",
"description": "Example of HTTP integration with OpenTelemetry",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -30,13 +30,13 @@
},
"dependencies": {
"@opentelemetry/api": "^1.3.0",
"@opentelemetry/exporter-jaeger": "1.29.0",
"@opentelemetry/exporter-zipkin": "1.29.0",
"@opentelemetry/instrumentation": "0.56.0",
"@opentelemetry/instrumentation-http": "0.56.0",
"@opentelemetry/resources": "1.29.0",
"@opentelemetry/sdk-trace-base": "1.29.0",
"@opentelemetry/sdk-trace-node": "1.29.0",
"@opentelemetry/exporter-jaeger": "1.30.0",
"@opentelemetry/exporter-zipkin": "1.30.0",
"@opentelemetry/instrumentation": "0.57.0",
"@opentelemetry/instrumentation-http": "0.57.0",
"@opentelemetry/resources": "1.30.0",
"@opentelemetry/sdk-trace-base": "1.30.0",
"@opentelemetry/sdk-trace-node": "1.30.0",
"@opentelemetry/semantic-conventions": "1.28.0"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/http",
Expand Down
16 changes: 8 additions & 8 deletions examples/https/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "https-example",
"private": true,
"version": "0.56.0",
"version": "0.57.0",
"description": "Example of HTTPs integration with OpenTelemetry",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
Expand Down Expand Up @@ -34,13 +34,13 @@
},
"dependencies": {
"@opentelemetry/api": "^1.3.0",
"@opentelemetry/exporter-jaeger": "1.29.0",
"@opentelemetry/exporter-zipkin": "1.29.0",
"@opentelemetry/instrumentation": "0.56.0",
"@opentelemetry/instrumentation-http": "0.56.0",
"@opentelemetry/resources": "1.29.0",
"@opentelemetry/sdk-trace-base": "1.29.0",
"@opentelemetry/sdk-trace-node": "1.29.0",
"@opentelemetry/exporter-jaeger": "1.30.0",
"@opentelemetry/exporter-zipkin": "1.30.0",
"@opentelemetry/instrumentation": "0.57.0",
"@opentelemetry/instrumentation-http": "0.57.0",
"@opentelemetry/resources": "1.30.0",
"@opentelemetry/sdk-trace-base": "1.30.0",
"@opentelemetry/sdk-trace-node": "1.30.0",
"@opentelemetry/semantic-conventions": "1.28.0"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/https",
Expand Down
28 changes: 14 additions & 14 deletions examples/opentelemetry-web/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "web-opentelemetry-example",
"private": true,
"version": "0.56.0",
"version": "0.57.0",
"description": "Example of using @opentelemetry/sdk-trace-web and @opentelemetry/sdk-metrics in browser",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -45,19 +45,19 @@
},
"dependencies": {
"@opentelemetry/api": "^1.3.0",
"@opentelemetry/context-zone": "1.29.0",
"@opentelemetry/core": "1.29.0",
"@opentelemetry/exporter-metrics-otlp-http": "0.56.0",
"@opentelemetry/exporter-trace-otlp-http": "0.56.0",
"@opentelemetry/exporter-trace-otlp-proto": "0.56.0",
"@opentelemetry/exporter-zipkin": "1.29.0",
"@opentelemetry/instrumentation": "0.56.0",
"@opentelemetry/instrumentation-fetch": "0.56.0",
"@opentelemetry/instrumentation-xml-http-request": "0.56.0",
"@opentelemetry/propagator-b3": "1.29.0",
"@opentelemetry/sdk-metrics": "1.29.0",
"@opentelemetry/sdk-trace-base": "1.29.0",
"@opentelemetry/sdk-trace-web": "1.29.0",
"@opentelemetry/context-zone": "1.30.0",
"@opentelemetry/core": "1.30.0",
"@opentelemetry/exporter-metrics-otlp-http": "0.57.0",
"@opentelemetry/exporter-trace-otlp-http": "0.57.0",
"@opentelemetry/exporter-trace-otlp-proto": "0.57.0",
"@opentelemetry/exporter-zipkin": "1.30.0",
"@opentelemetry/instrumentation": "0.57.0",
"@opentelemetry/instrumentation-fetch": "0.57.0",
"@opentelemetry/instrumentation-xml-http-request": "0.57.0",
"@opentelemetry/propagator-b3": "1.30.0",
"@opentelemetry/sdk-metrics": "1.30.0",
"@opentelemetry/sdk-trace-base": "1.30.0",
"@opentelemetry/sdk-trace-web": "1.30.0",
"@opentelemetry/semantic-conventions": "1.28.0"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/tracer-web"
Expand Down
22 changes: 11 additions & 11 deletions examples/otlp-exporter-node/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "example-otlp-exporter-node",
"private": true,
"version": "0.56.0",
"version": "0.57.0",
"description": "Example of using @opentelemetry/collector-exporter in Node.js",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -30,16 +30,16 @@
},
"dependencies": {
"@opentelemetry/api": "^1.3.0",
"@opentelemetry/core": "1.29.0",
"@opentelemetry/exporter-metrics-otlp-grpc": "0.56.0",
"@opentelemetry/exporter-metrics-otlp-http": "0.56.0",
"@opentelemetry/exporter-metrics-otlp-proto": "0.56.0",
"@opentelemetry/exporter-trace-otlp-grpc": "0.56.0",
"@opentelemetry/exporter-trace-otlp-http": "0.56.0",
"@opentelemetry/exporter-trace-otlp-proto": "0.56.0",
"@opentelemetry/resources": "1.29.0",
"@opentelemetry/sdk-metrics": "1.29.0",
"@opentelemetry/sdk-trace-base": "1.29.0",
"@opentelemetry/core": "1.30.0",
"@opentelemetry/exporter-metrics-otlp-grpc": "0.57.0",
"@opentelemetry/exporter-metrics-otlp-http": "0.57.0",
"@opentelemetry/exporter-metrics-otlp-proto": "0.57.0",
"@opentelemetry/exporter-trace-otlp-grpc": "0.57.0",
"@opentelemetry/exporter-trace-otlp-http": "0.57.0",
"@opentelemetry/exporter-trace-otlp-proto": "0.57.0",
"@opentelemetry/resources": "1.30.0",
"@opentelemetry/sdk-metrics": "1.30.0",
"@opentelemetry/sdk-trace-base": "1.30.0",
"@opentelemetry/semantic-conventions": "1.28.0"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/otlp-exporter-node"
Expand Down
64 changes: 64 additions & 0 deletions experimental/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ All notable changes to experimental packages in this project will be documented

### :house: (Internal)

## 0.57.0

### :rocket: (Enhancement)

* feat(opentelemetry-sdk-node): automatically configure metrics exporter based on environment variables [#5168](https://github.com/open-telemetry/opentelemetry-js/pull/5168) @bhaskarbanerjee

### :house: (Internal)

* refactor(otlp-transformer): re-structure package to prepare for separate entrypoints [#5264](https://github.com/open-telemetry/opentelemetry-js/pull/5264) @pichlermarc

## 0.56.0

### :boom: Breaking Change
Expand All @@ -31,6 +41,60 @@ All notable changes to experimental packages in this project will be documented
* feat(otlp-transformer)!: accept `ResourceMetrics` in serializers instead of `ResourceMetrics[]`
* (user-facing): `ProtobufMetricsSerializer` now only accepts `ResourceMetrics` instead of `ResourceMetrics[]` to align with `PushMetricExporter` requirements
* (user-facing): `JsonMetricsSerializer` now only accepts `ResourceMetrics` instead of `ResourceMetrics[]` to align with `PushMetricExporter` requirements
* feat(otlp-transformer)!: remove internal types and functions from public API @pichlermarc
* (user-facing): the following types and functions were intended for internal use and have been removed from exports
* `OtlpEncodingOptions`
* `IKeyValueList`
* `IKeyValue`
* `IInstrumentationScope`
* `IArrayValue`
* `LongBits`
* `IAnyValue`
* `Fixed64`
* `SpanContextEncodeFunction`
* `toLongBits`
* `OptionalSpanContextEncodeFunction`
* `getOtlpEncoder`
* `Encoder`
* `HrTimeEncodeFunction`
* `encodeAsLongBits`
* `encodeAsString`
* `hrTimeToNanos`
* `IValueAtQuantile`
* `ISummaryDataPoint`
* `ISummary`
* `ISum`
* `IScopeMetrics`
* `IResourceMetrics`
* `INumberDataPoint`
* `IHistogramDataPoint`
* `IHistogram`
* `IExponentialHistogramDataPoint`
* `IExponentialHistogram`
* `IMetric`
* `IGauge`
* `IExemplar`
* `EAggregationTemporality`
* `IExportMetricsServiceRequest`
* `IBuckets`
* `IResource`
* `IStatus`
* `EStatusCode`
* `ILink`
* `IEvent`
* `IScopeSpans`
* `ISpan`
* `IResourceSpans`
* `ESpanKind`
* `IExportTraceServiceRequest`
* `IScopeLogs`
* `IExportLogsServiceRequest`
* `IResourceLogs`
* `ILogRecord`
* `ESeverityNumber`
* `createExportTraceServiceRequest`
* `createExportMetricsServiceRequest`
* `createExportLogsServiceRequest`

### :rocket: (Enhancement)

Expand Down
6 changes: 3 additions & 3 deletions experimental/backwards-compatibility/node14/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "backcompat-node14",
"version": "0.56.0",
"version": "0.57.0",
"private": true,
"description": "Backwards compatibility app for node 14 types and the OpenTelemetry Node.js SDK",
"main": "index.js",
Expand All @@ -10,8 +10,8 @@
"align-api-deps": "node ../../../scripts/align-api-deps.js"
},
"dependencies": {
"@opentelemetry/sdk-node": "0.56.0",
"@opentelemetry/sdk-trace-base": "1.29.0"
"@opentelemetry/sdk-node": "0.57.0",
"@opentelemetry/sdk-trace-base": "1.30.0"
},
"devDependencies": {
"@types/node": "14.18.25",
Expand Down
Loading

0 comments on commit a84b54d

Please sign in to comment.