Repository navigation
fix(otel): clarify registration and mode errors - #912
Open
zhongkechen wants to merge 5 commits into
Open
zhongkechen wants to merge 5 commits into
zhongkechen wants to merge 5 commits into
Conversation
SilanHe
approved these changes
Nov 6, 2026
| `mode` read from configuration at runtime is accepted and type-checks as the | ||
| union of both return types. | ||
| Register only one returned factory; see the | ||
| [registration guidance](#quick-start-using-x-raycloudwatch-tracing) when using |
Contributor
There was a problem hiding this comment.
nit: this "registration guidance" link targets #quick-start-using-x-raycloudwatch-tracing, which is the Quick Start heading at the top of the section (line 41). The guidance it refers to (choosing between plugins=[...] and DURABLE_EXECUTION_PLUGINS, and when to use EXECUTION_OTEL_PLUGIN_FACTORY) is actually the "Set exactly one OTel entry name" block lower down (lines 91-118). That block has no heading, so there's no anchor to point at. Consider giving it a ### heading (e.g. ### Choosing a registration source) and linking to that anchor instead, so the reader lands on the relevant text.
🤖 AI-assisted comment
This branch was successfully deployed
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.
Issue #, if available
Follow-up to #905.
Description of changes
Combining
plugins=[create_otel_plugin_factory()]withDURABLE_EXECUTION_PLUGINS=otelraisesPluginLoadError: the selector constructs a new factory, while the entry point loads the default singleton. The README now explains choosing one registration source, or using the exported singleton when both sources must name the same default view. Six integration cases cover rejection and singleton deduplication for all three aliases.Invalid modes now include the rejected value, for example
mode must be 'execution' or 'invocation', got 'EXECUTION'. The selector tests move intotest_plugin_factory.py, retaining installed-metadata coverage and removing its skip. The resume test requires exactly one work span, parented to the first invocation in invocation mode. Repeated README text is shortened, and the function export is grouped with the other functions.Design
Validation and assumptions
hatch run dev-otel:cov: 965 passed, 95% package coverage.hatch run dev-otel:typecheck: passed for 46 source/test files.hatch fmt --check: passed at the root and in the OTel package.hatch run test-wheel-otel:test: 965 OTel tests and 12 lifecycle compatibility tests passed against built wheels; installed source bytes and artifact hashes verified.Decisions not covered by the issue or the design note
durable.invocation.firstattribute rather than exporter ordering to identify the parent.Edited test expectations
test_invalid_modes_are_rejected: require the supplied value in the error message.test_installed_entry_points_preserve_alias_identity: require installed metadata instead of skipping when it is absent, consistent with the integration suite.test_unified_factory_preserves_view_across_resume: require one work span and its precise parent, catching duplicate spans and incorrect replay parenting.Checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.