Repository navigation
refactor: share operation span status mapping - #896
Open
zhongkechen wants to merge 1 commit into
Open
zhongkechen wants to merge 1 commit into
zhongkechen wants to merge 1 commit into
Conversation
Contributor
Codex AI reviewNo actionable findings in the five changed files, including against CONTRIBUTING.md rules 1–9. Residual test risk: tests were inspected but not executed under the review constraints. Reviewed commit |
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 #865, merged as 1653f08. Addresses its three remaining review comments:
Description of changes
Execution and Invocation views duplicated the operation status rules, so each correction required editing both. Both now call
set_operation_span_statusin a shared module. Error details still take precedence, FAILED/TIMED_OUT/STOPPED without details remain ERROR, SUCCEEDED remains OK, and other errorless statuses remain UNSET.The README states the timestamp rules directly, including child-end extension, the 1 µs adjustments, and clock fallback. It removes the misleading statement that checkpointless contexts generally start at completion.
test_operation_status_and_exceptionnow looks up literal expected statuses instead of recomputing the production rule. Expected values are unchanged, and iteration overOperationStatusensures a new enum member requires an explicit expectation.test_failed_operation_without_type_or_message_uses_fallbackalso asserts ERROR with an empty status description, preserving the existing no-message behavior.Design
Validation
hatch run dev-otel:test -qq --tb=short -o faulthandler_timeout=60: 874 passed, including public-handler replay tests.hatch run dev-otel:typecheck: no issues in 46 files.hatch fmt --check: passed.hatch build: passed.hatch run test-wheel-otel:test -qq --tb=short: 874 OTel tests and 12 lifecycle compatibility tests passed; installed source bytes and wheel hashes were verified.git diff --check: passed.Assumptions
Decisions not covered by the issue or the design note
operation_span_status.pyto keep status policy separate from exception event construction and each view's timestamp policy.Nonecheck suppresses absent diagnostics without another condition in each view.Checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.