-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(otlp-transformer): json schema based validation #5265
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,10 @@ All notable changes to experimental packages in this project will be documented | |
|
||
### :boom: Breaking Change | ||
|
||
* feat(otlp-transformer)!: add new entrypoints for non-core features [#5259](https://github.com/open-telemetry/opentelemetry-js/pull/5259/) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note: this PR is based on #5259 to avoid ugly merge work once their PR is merged. It makes the diff unfortunately ugly until their PR is merged though |
||
* (user-facing): OTLP (binary protobuf) utilities now located at `@opentelemetry/otlp-transformer/proto` | ||
* (user-facing): OTLP (json) utilities now located at `@opentelemetry/otlp-transformer/json` | ||
* (internal): features to remain experimental post-stabilization now located at `@opentelemetry/otlp-transformer/experimental` (empty for now) | ||
* feat(otlp-exporter-base)!: collapse base classes into one [#5031](https://github.com/open-telemetry/opentelemetry-js/pull/5031) @pichlermarc | ||
* `OTLPExporterNodeBase` has been removed in favor of a platform-agnostic implementation (`OTLPExporterBase`) | ||
* `OTLPExporterBrowserBase` has been removed in favor of a platform-agnostic implementation (`OTLPExporterBase`) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,10 +6,48 @@ | |
}, | ||
"version": "0.56.0", | ||
"description": "Transform OpenTelemetry SDK data into OTLP", | ||
"module": "build/esm/index.js", | ||
"esnext": "build/esnext/index.js", | ||
"types": "build/src/index.d.ts", | ||
"main": "build/src/index.js", | ||
"exports": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Another alternative to this PR could be to modify this to expose the generated code: https://github.com/open-telemetry/opentelemetry-js/pull/5259/files#r1884673988 |
||
".": { | ||
"module": "./build/esm/index.js", | ||
"esnext": "./build/esnext/index.js", | ||
"types": "./build/src/index.d.ts", | ||
"default": "./build/src/index.js" | ||
}, | ||
"./experimental": { | ||
"module": "./build/esm/experimental/index.js", | ||
"esnext": "./build/esnext/experimental/index.js", | ||
"types": "./build/src/experimental/index.d.ts", | ||
"default": "./build/src/experimental/index.js" | ||
}, | ||
"./json": { | ||
"module": "./build/esm/json/index.js", | ||
"esnext": "./build/esnext/json/index.js", | ||
"types": "./build/src/json/index.d.ts", | ||
"default": "./build/src/json/index.js" | ||
}, | ||
"./protobuf": { | ||
"module": "./build/esm/protobuf/index.js", | ||
"esnext": "./build/esnext/protobuf/index.js", | ||
"types": "./build/src/protobuf/index.d.ts", | ||
"default": "./build/src/protobuf/index.js" | ||
} | ||
}, | ||
"typesVersions": { | ||
"*": { | ||
"*": [ | ||
"./build/src/index.d.ts" | ||
], | ||
"experimental": [ | ||
"./build/src/experimental/index.d.ts" | ||
], | ||
"json": [ | ||
"./build/src/json/index.d.ts" | ||
], | ||
"protobuf": [ | ||
"./build/src/protobuf/index.d.ts" | ||
] | ||
} | ||
}, | ||
"repository": "open-telemetry/opentelemetry-js", | ||
"scripts": { | ||
"prepublishOnly": "npm run compile", | ||
|
@@ -77,10 +115,11 @@ | |
"nyc": "15.1.0", | ||
"protobufjs-cli": "1.1.3", | ||
"ts-loader": "9.5.1", | ||
"typescript": "4.4.4", | ||
"typescript": "5.7.2", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I had to upgrade to Typescript v5 for |
||
"webpack": "5.96.1" | ||
}, | ||
"dependencies": { | ||
"@sinclair/typebox": "0.34.11", | ||
"@opentelemetry/api-logs": "0.56.0", | ||
"@opentelemetry/core": "1.29.0", | ||
"@opentelemetry/resources": "1.29.0", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is because this test is purposely using invalid enum values to check that the function handles them correctly. Typescript v4 didn't complain about invalid values, but Typescript v5 did so I added
number
to explicitly tell it we're using invalid numbers