Skip to content

Conversation

@pichlermarc
Copy link
Member

@pichlermarc pichlermarc commented Dec 13, 2024

Which problem is this PR solving?

This is the second-to-last breaking PR for @opentelemetry/otlp-transformer before marking the package as stable (#4582). This solves some issues with rollup, that warns even for code that is dead in the end-user's app. See #5096, #4987.

This PR adds entry points for each signal, each signal gets an entry point for protobuf and json to address #5096 and #4987

The new entrypoint structure is:
- /signal, /signal/protobuf, signal/json
- experimental signals are prefixed by experimental/ to allow us marking the package stable before the experimental signals are - the spec moves quicker than we do, so I expect there to always be one that is not stable

Closes #5216
Closes #4584
Fixes #5096
Partially addresses #4987

Type of change

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

  • Unit tests

@pichlermarc pichlermarc force-pushed the feat/add-transformer-entrypoints branch from ec2720d to 176b776 Compare December 13, 2024 12:45
@codecov
Copy link

codecov bot commented Dec 13, 2024

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.14%. Comparing base (3fc7170) to head (5b09076).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5263      +/-   ##
==========================================
- Coverage   95.15%   95.14%   -0.02%     
==========================================
  Files         316      316              
  Lines        9166     9166              
  Branches     2023     2023              
==========================================
- Hits         8722     8721       -1     
- Misses        444      445       +1     
Files with missing lines Coverage Δ
...ges/exporter-logs-otlp-grpc/src/OTLPLogExporter.ts 100.00% <100.00%> (ø)
...ogs-otlp-http/src/platform/node/OTLPLogExporter.ts 100.00% <100.00%> (ø)
...gs-otlp-proto/src/platform/node/OTLPLogExporter.ts 100.00% <100.00%> (ø)
.../exporter-trace-otlp-grpc/src/OTLPTraceExporter.ts 100.00% <100.00%> (ø)
...e-otlp-http/src/platform/node/OTLPTraceExporter.ts 100.00% <100.00%> (ø)
...-otlp-proto/src/platform/node/OTLPTraceExporter.ts 100.00% <100.00%> (ø)
...porter-metrics-otlp-grpc/src/OTLPMetricExporter.ts 100.00% <100.00%> (ø)
...-otlp-http/src/platform/node/OTLPMetricExporter.ts 100.00% <100.00%> (ø)
...otlp-proto/src/platform/node/OTLPMetricExporter.ts 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pichlermarc pichlermarc force-pushed the feat/add-transformer-entrypoints branch from 176b776 to 2e74b8a Compare December 13, 2024 13:03
@pichlermarc pichlermarc changed the title feat(otlp-transformer)!: introduce separate entry-points for OTLP serializers, switch to factory functions feat(otlp-transformer)!: introduce separate entry-points for OTLP serializers Dec 13, 2024
@pichlermarc pichlermarc force-pushed the feat/add-transformer-entrypoints branch 2 times, most recently from 2a53f1b to 8c1c6be Compare December 13, 2024 13:23
@pichlermarc pichlermarc force-pushed the feat/add-transformer-entrypoints branch from 8c1c6be to 7aca149 Compare December 13, 2024 16:27
@pichlermarc pichlermarc added this to the OTLP Exporter GA milestone Dec 13, 2024
@pichlermarc pichlermarc marked this pull request as ready for review December 13, 2024 16:35
@pichlermarc pichlermarc requested a review from a team as a code owner December 13, 2024 16:35
Copy link
Contributor

@chancancode chancancode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good other than the legacy typesVersions thing

@Meligy
Copy link

Meligy commented Jan 16, 2025

Hello. Any idea when this might be merged and released please?

I suspect it might unblock using the package in nextJS middleware, which runs on Edge runtime, if it's enough for #4987.

@pichlermarc
Copy link
Member Author

pichlermarc commented Jan 17, 2025

Hello. Any idea when this might be merged and released please?

I suspect it might unblock using the package in nextJS middleware, which runs on Edge runtime, if it's enough for #4987.

I'm still waiting on @open-telemetry/javascript-approvers reviews. Once I have an approving review this can get merged. If that happens before Feb 17, we'll release it then.

@pichlermarc pichlermarc force-pushed the feat/add-transformer-entrypoints branch 2 times, most recently from aecf93b to a28cb38 Compare August 26, 2025 12:15
"types": "./build/src/trace/json/index.d.ts",
"default": "./build/src/trace/json/index.js"
},
"./experimental/logs": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I'm not aware off all the history behind logs. I know the API is still experimental. Is that the reason why the word appears in the export path?
@opentelemetry/otlp-transformer package is already experimental so IMHO it feels redundant.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would unblock us from marking this package as stable before logs becomes stable.
I suppose this will become dependent on the outcome of open-telemetry/opentelemetry.io#8208

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

5 participants