From d2a59642e3b7d142f28e2b8528794a04519d41bb Mon Sep 17 00:00:00 2001 From: Marc Pichler Date: Tue, 24 Sep 2024 14:46:52 +0200 Subject: [PATCH 1/5] fix(events,logs): drop old experimental packages from dependencies --- experimental/packages/sdk-events/package.json | 2 - experimental/packages/sdk-logs/package.json | 1 - package-lock.json | 60 ++----------------- 3 files changed, 4 insertions(+), 59 deletions(-) diff --git a/experimental/packages/sdk-events/package.json b/experimental/packages/sdk-events/package.json index 6ea9047708..03c72bb8ad 100644 --- a/experimental/packages/sdk-events/package.json +++ b/experimental/packages/sdk-events/package.json @@ -68,8 +68,6 @@ "devDependencies": { "@babel/core": "7.25.2", "@opentelemetry/api": "1.9.0", - "@opentelemetry/api-events": "0.52.0", - "@opentelemetry/api-logs": "0.52.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/sinon": "10.0.20", diff --git a/experimental/packages/sdk-logs/package.json b/experimental/packages/sdk-logs/package.json index a7938ee0d2..a9d09bec30 100644 --- a/experimental/packages/sdk-logs/package.json +++ b/experimental/packages/sdk-logs/package.json @@ -74,7 +74,6 @@ "@babel/core": "7.25.2", "@babel/preset-env": "7.25.4", "@opentelemetry/api": ">=1.4.0 <1.10.0", - "@opentelemetry/api-logs": "0.52.0", "@opentelemetry/resources_1.9.0": "npm:@opentelemetry/resources@1.9.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", diff --git a/package-lock.json b/package-lock.json index 3978ff726b..3b289baca3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1413,8 +1413,6 @@ "devDependencies": { "@babel/core": "7.25.2", "@opentelemetry/api": "1.9.0", - "@opentelemetry/api-events": "0.52.0", - "@opentelemetry/api-logs": "0.52.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/sinon": "10.0.20", @@ -1445,31 +1443,6 @@ "@opentelemetry/api": ">=1.4.0 <1.10.0" } }, - "experimental/packages/sdk-events/node_modules/@opentelemetry/api-events": { - "version": "0.52.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/api-events/-/api-events-0.52.0.tgz", - "integrity": "sha512-+LdOC1OK9tINoj6KQT0FZkX3enQElzLkuwAbzF7Lrdp7x7XrhQFhMz7PwfTYCgnVDOqc7pRGw0jIfmj+vJ5t4g==", - "dev": true, - "dependencies": { - "@opentelemetry/api": "^1.0.0", - "@opentelemetry/api-logs": "0.52.0" - }, - "engines": { - "node": ">=14" - } - }, - "experimental/packages/sdk-events/node_modules/@opentelemetry/api-logs": { - "version": "0.52.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.52.0.tgz", - "integrity": "sha512-HxjD7xH9iAE4OyhNaaSec65i1H6QZYBWSwWkowFfsc5YAcDvJG30/J1sRKXEQqdmUcKTXEAnA66UciqZha/4+Q==", - "dev": true, - "dependencies": { - "@opentelemetry/api": "^1.0.0" - }, - "engines": { - "node": ">=14" - } - }, "experimental/packages/sdk-events/node_modules/@types/sinon": { "version": "10.0.20", "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.20.tgz", @@ -1492,7 +1465,6 @@ "@babel/core": "7.25.2", "@babel/preset-env": "7.25.4", "@opentelemetry/api": ">=1.4.0 <1.10.0", - "@opentelemetry/api-logs": "0.52.0", "@opentelemetry/resources_1.9.0": "npm:@opentelemetry/resources@1.9.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", @@ -1531,18 +1503,6 @@ "node": ">=8.0.0" } }, - "experimental/packages/sdk-logs/node_modules/@opentelemetry/api-logs": { - "version": "0.52.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.52.0.tgz", - "integrity": "sha512-HxjD7xH9iAE4OyhNaaSec65i1H6QZYBWSwWkowFfsc5YAcDvJG30/J1sRKXEQqdmUcKTXEAnA66UciqZha/4+Q==", - "dev": true, - "dependencies": { - "@opentelemetry/api": "^1.0.0" - }, - "engines": { - "node": ">=14" - } - }, "experimental/packages/sdk-logs/node_modules/@opentelemetry/resources_1.9.0": { "name": "@opentelemetry/resources", "version": "1.9.0", @@ -33675,8 +33635,8 @@ "requires": { "@babel/core": "7.25.2", "@opentelemetry/api": "1.9.0", - "@opentelemetry/api-events": "0.52.0", - "@opentelemetry/api-logs": "0.52.0", + "@opentelemetry/api-events": "0.53.0", + "@opentelemetry/api-logs": "0.53.0", "@opentelemetry/sdk-logs": "0.53.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", @@ -33703,10 +33663,8 @@ }, "dependencies": { "@opentelemetry/api-events": { - "version": "0.52.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/api-events/-/api-events-0.52.0.tgz", + "version": "https://registry.npmjs.org/@opentelemetry/api-events/-/api-events-0.52.0.tgz", "integrity": "sha512-+LdOC1OK9tINoj6KQT0FZkX3enQElzLkuwAbzF7Lrdp7x7XrhQFhMz7PwfTYCgnVDOqc7pRGw0jIfmj+vJ5t4g==", - "dev": true, "requires": { "@opentelemetry/api": "^1.0.0", "@opentelemetry/api-logs": "0.52.0" @@ -33716,7 +33674,6 @@ "version": "0.52.0", "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.52.0.tgz", "integrity": "sha512-HxjD7xH9iAE4OyhNaaSec65i1H6QZYBWSwWkowFfsc5YAcDvJG30/J1sRKXEQqdmUcKTXEAnA66UciqZha/4+Q==", - "dev": true, "requires": { "@opentelemetry/api": "^1.0.0" } @@ -33738,7 +33695,7 @@ "@babel/core": "7.25.2", "@babel/preset-env": "7.25.4", "@opentelemetry/api": ">=1.4.0 <1.10.0", - "@opentelemetry/api-logs": "0.52.0", + "@opentelemetry/api-logs": "0.53.0", "@opentelemetry/core": "1.26.0", "@opentelemetry/resources": "1.26.0", "@opentelemetry/resources_1.9.0": "npm:@opentelemetry/resources@1.9.0", @@ -33770,15 +33727,6 @@ "integrity": "sha512-O2yRJce1GOc6PAy3QxFM4NzFiWzvScDC1/5ihYBL6BUEVdq0XMWN01sppE+H6bBXbaFYipjwFLEWLg5PaSOThA==", "dev": true }, - "@opentelemetry/api-logs": { - "version": "0.52.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.52.0.tgz", - "integrity": "sha512-HxjD7xH9iAE4OyhNaaSec65i1H6QZYBWSwWkowFfsc5YAcDvJG30/J1sRKXEQqdmUcKTXEAnA66UciqZha/4+Q==", - "dev": true, - "requires": { - "@opentelemetry/api": "^1.0.0" - } - }, "@opentelemetry/resources_1.9.0": { "version": "npm:@opentelemetry/resources@1.9.0", "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.9.0.tgz", From 2c4ce6a59945140c03a27bd01359b8ceb58d8cb4 Mon Sep 17 00:00:00 2001 From: Marc Pichler Date: Tue, 24 Sep 2024 14:51:19 +0200 Subject: [PATCH 2/5] chore: clean-up package-lock --- package-lock.json | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3b289baca3..cf2acf603b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33662,22 +33662,6 @@ "webpack-merge": "5.10.0" }, "dependencies": { - "@opentelemetry/api-events": { - "version": "https://registry.npmjs.org/@opentelemetry/api-events/-/api-events-0.52.0.tgz", - "integrity": "sha512-+LdOC1OK9tINoj6KQT0FZkX3enQElzLkuwAbzF7Lrdp7x7XrhQFhMz7PwfTYCgnVDOqc7pRGw0jIfmj+vJ5t4g==", - "requires": { - "@opentelemetry/api": "^1.0.0", - "@opentelemetry/api-logs": "0.52.0" - } - }, - "@opentelemetry/api-logs": { - "version": "0.52.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.52.0.tgz", - "integrity": "sha512-HxjD7xH9iAE4OyhNaaSec65i1H6QZYBWSwWkowFfsc5YAcDvJG30/J1sRKXEQqdmUcKTXEAnA66UciqZha/4+Q==", - "requires": { - "@opentelemetry/api": "^1.0.0" - } - }, "@types/sinon": { "version": "10.0.20", "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.20.tgz", From 96448de52e59383db128768c19051c80e7d84cda Mon Sep 17 00:00:00 2001 From: Marc Pichler Date: Tue, 24 Sep 2024 15:04:22 +0200 Subject: [PATCH 3/5] fix(sdk-logs): align LogRecord with new types --- experimental/packages/sdk-logs/src/LogRecord.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/experimental/packages/sdk-logs/src/LogRecord.ts b/experimental/packages/sdk-logs/src/LogRecord.ts index e7704ec389..fd80c8f9f2 100644 --- a/experimental/packages/sdk-logs/src/LogRecord.ts +++ b/experimental/packages/sdk-logs/src/LogRecord.ts @@ -26,7 +26,7 @@ import type { IResource } from '@opentelemetry/resources'; import type { ReadableLogRecord } from './export/ReadableLogRecord'; import type { LogRecordLimits } from './types'; -import { LogAttributes, LogBody } from '@opentelemetry/api-logs'; +import {AnyValue, LogAttributes, LogBody} from '@opentelemetry/api-logs'; import { LoggerProviderSharedState } from './internal/LoggerProviderSharedState'; export class LogRecord implements ReadableLogRecord { @@ -112,7 +112,7 @@ export class LogRecord implements ReadableLogRecord { this.setAttributes(attributes); } - public setAttribute(key: string, value?: LogAttributes | AttributeValue) { + public setAttribute(key: string, value?: AnyValue) { if (this._isLogRecordReadonly()) { return this; } From 696107b89006c23541e6735aa681628fc45b49d4 Mon Sep 17 00:00:00 2001 From: Marc Pichler Date: Tue, 24 Sep 2024 15:07:50 +0200 Subject: [PATCH 4/5] fixup! fix(sdk-logs): align LogRecord with new types --- experimental/packages/sdk-logs/src/LogRecord.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/experimental/packages/sdk-logs/src/LogRecord.ts b/experimental/packages/sdk-logs/src/LogRecord.ts index fd80c8f9f2..f678648e75 100644 --- a/experimental/packages/sdk-logs/src/LogRecord.ts +++ b/experimental/packages/sdk-logs/src/LogRecord.ts @@ -26,7 +26,7 @@ import type { IResource } from '@opentelemetry/resources'; import type { ReadableLogRecord } from './export/ReadableLogRecord'; import type { LogRecordLimits } from './types'; -import {AnyValue, LogAttributes, LogBody} from '@opentelemetry/api-logs'; +import { AnyValue, LogAttributes, LogBody } from '@opentelemetry/api-logs'; import { LoggerProviderSharedState } from './internal/LoggerProviderSharedState'; export class LogRecord implements ReadableLogRecord { From 9a7bc19512ef6a49d47d548c8bbca33ec40ba25d Mon Sep 17 00:00:00 2001 From: Marc Pichler Date: Tue, 24 Sep 2024 15:18:10 +0200 Subject: [PATCH 5/5] chore: update changelog --- experimental/CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/experimental/CHANGELOG.md b/experimental/CHANGELOG.md index 13454c6eb4..e1ba48d160 100644 --- a/experimental/CHANGELOG.md +++ b/experimental/CHANGELOG.md @@ -19,6 +19,9 @@ All notable changes to experimental packages in this project will be documented * fix(sampler-jaeger-remote): fixes an issue where package could emit unhandled promise rejections @Just-Sieb * fix(otlp-grpc-exporter-base): default compression to `'none'` if env vars `OTEL_EXPORTER_OTLP_TRACES_COMPRESSION` and `OTEL_EXPORTER_OTLP_COMPRESSION` are falsy @sjvans +* fix(sdk-events): remove devDependencies to old `@opentelemetry/api-logs@0.52.0`, `@opentelemetry/api-events@0.52.0` packages [#5013](https://github.com/open-telemetry/opentelemetry-js/pull/5013) @pichlermarc +* fix(sdk-logs): remove devDependencies to old `@opentelemetry/api-logs@0.52.0` [#5013](https://github.com/open-telemetry/opentelemetry-js/pull/5013) @pichlermarc +* fix(sdk-logs): align LogRecord#setAttribute type with types from `@opentelemetry/api-logs@0.53.0` [#5013](https://github.com/open-telemetry/opentelemetry-js/pull/5013) @pichlermarc ### :books: (Refine Doc)