Repository navigation
[NO MERGE] Publish opentelemetry as a shim that re-exports opentelemetry_wk - #240
Draft
robbecker-wf wants to merge 3 commits into
Draft
robbecker-wf wants to merge 3 commits into
robbecker-wf wants to merge 3 commits into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which problem is this PR solving?
The rename from
opentelemetrytoopentelemetry_wkcreates two distinct sets of classes. Any package still onpackage:opentelemetrythat exchanges OpenTelemetry types with a package onpackage:opentelemetry_wkfails to compile, e.g.SimpleSpanProcessorcan't be assigned toSpanProcessor(requests_client, assessments_client via wo11y)TracerProvider/TextMapPropagatormismatch (w_graph_client, xbrl-module, xbrl_historical_data_roll_forward via messaging_sdk)DatadogRumExportercan't be assigned toSpanExporter(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
opentelemetryversion that re-exportsopentelemetry_wk:lib/api.dart,lib/sdk.dart,lib/web_sdk.darteachexport 'package:opentelemetry_wk/...'.lib/src/sdk/trace/span.dartre-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'.Because Dart type identity is based on the declaring library,
package:opentelemetry/...andpackage:opentelemetry_wk/...then resolve to the same classes and the same globals. Consumers can migrate imports in any order.Versioning:
0.18.11+1sorts above0.18.11and below0.18.12, so every existing^0.18.xconstraint picks it up. It also avoids the existing0.18.12git tag.opentelemetry_wk0.18.10 (identical toopentelemetry0.18.10 apart from the rename). Dart 3.9+ resolves the latest 0.18.x.dart_apitoolreports 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).package:opentelemetryand an app onopentelemetry_wkpassing processors, the tracer provider and the propagator between them. Against pub.devopentelemetry0.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
0.18.11+1, so publish manually from this branch:dart pub publish.opentelemetry_wkon pub.dev, which is why the0.18.13publish failed.dart pub upgrade opentelemetry; later markopentelemetrydiscontinued, replaced byopentelemetry_wk.Checklist: