Skip to content

[NO MERGE] Publish opentelemetry as a shim that re-exports opentelemetry_wk - #240

Draft
robbecker-wf wants to merge 3 commits into
masterfrom
opentelemetry_shim
Draft

robbecker-wf wants to merge 3 commits into
masterfrom
opentelemetry_shim

Conversation

@robbecker-wf

Copy link
Copy Markdown
Member

[NO MERGE] This branch replaces the implementation with a re-export shim. It must never be merged into master (which is the real opentelemetry_wk). It exists only to review and publish opentelemetry 0.18.11+1 from.

Which problem is this PR solving?

The rename from opentelemetry to opentelemetry_wk creates two distinct sets of classes. Any package still on package:opentelemetry that exchanges OpenTelemetry types with a package on package:opentelemetry_wk fails to compile, e.g.

  • SimpleSpanProcessor can't be assigned to SpanProcessor (requests_client, assessments_client via wo11y)
  • TracerProvider / TextMapPropagator mismatch (w_graph_client, xbrl-module, xbrl_historical_data_roll_forward via messaging_sdk)
  • DatadogRumExporter can't be assigned to SpanExporter (wo11y, wdesk_sdk, esg_ui via otel_browser_datadog)

Avoiding that today requires merging and releasing ~26 repos in strict dependency order. It also splits global state, so packages that haven't migrated silently get a no-op tracer.

Short description of the change

Publish a final opentelemetry version that re-exports opentelemetry_wk:

  • lib/api.dart, lib/sdk.dart, lib/web_sdk.dart each export 'package:opentelemetry_wk/...'.
  • lib/src/sdk/trace/span.dart re-exports the same path (imported directly by wo11y tests).
  • pubspec.yaml: name: opentelemetry, version: 0.18.11+1, sdk: '>=2.19.0 <4.0.0', opentelemetry_wk: '>=0.18.10 <0.19.0'.
  • Implementation, tests, examples, proto submodule and codegen steps removed; Makefile, CI, README and CHANGELOG updated accordingly.

Because Dart type identity is based on the declaring library, package:opentelemetry/... and package:opentelemetry_wk/... then resolve to the same classes and the same globals. Consumers can migrate imports in any order.

Versioning:

  • 0.18.11+1 sorts above 0.18.11 and below 0.18.12, so every existing ^0.18.x constraint picks it up. It also avoids the existing 0.18.12 git tag.
  • Dart 2 and Dart < 3.9 resolve opentelemetry_wk 0.18.10 (identical to opentelemetry 0.18.10 apart from the rename). Dart 3.9+ resolves the latest 0.18.x. dart_apitool reports no breaking public API changes between 0.18.10 and 0.18.11.

How Has This Been Tested?

  • test/type_identity_test.dart: asserts that the API and SDK types match across both imports, that values cross between them, and that the global tracer provider is shared. Passes on VM + Chrome (dart2js).
  • Shim tests and analysis pass on Dart 2.19.6 (resolves wk 0.18.10), 3.12.2 and 3.13.5 (resolve wk 0.18.11).
  • Scratch reproduction: a library written against package:opentelemetry and an app on opentelemetry_wk passing processors, the tracer provider and the propagator between them. Against pub.dev opentelemetry 0.18.11 it fails with the same 4 errors CI shows. With this shim it analyzes clean and runs, on all three SDKs.
  • dart pub publish --dry-run: 0 warnings.

Publishing notes

  • The publish workflow's tag pattern doesn't match 0.18.11+1, so publish manually from this branch: dart pub publish.
  • Separately, GitHub publishing isn't enabled for opentelemetry_wk on pub.dev, which is why the 0.18.13 publish failed.
  • After publishing: re-run CI on the batch PRs; apps with committed lockfiles need dart pub upgrade opentelemetry; later mark opentelemetry discontinued, replaced by opentelemetry_wk.

Checklist:

  • Unit tests have been added
  • Documentation has been updated

robbecker-wf and others added 3 commits October 13, 2026 21:54
Publishing opentelemetry 0.18.12 as a re-export lets packages still on
package:opentelemetry share types and global state with opentelemetry_wk,
so the rename no longer requires an ordered release of every consumer.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…r SDKs

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant