Repository navigation
fix(otel): omit empty joined exception stacks - #902
Open
LionStone-1 wants to merge 2 commits into
Open
LionStone-1 wants to merge 2 commits into
LionStone-1 wants to merge 2 commits into
Conversation
LionStone-1
marked this pull request as ready for review
November 3, 2026 06:16
Contributor
Codex AI reviewNo actionable findings after reviewing all changes against CONTRIBUTING.md rules 1–9. Tests were inspected but not executed under the read-only review constraints; reported test results were not independently verified. Reviewed commit |
zhongkechen
reviewed
Nov 3, 2026
| attributes["exception.message"] = error.message | ||
| if error.stack_trace: | ||
| attributes["exception.stacktrace"] = "\n".join(error.stack_trace) | ||
| stack_trace = "\n".join(error.stack_trace or []) |
Contributor
There was a problem hiding this comment.
What happens if stack_trace is malformed, e.g. ["frame", None]?
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
Closes #886.
Description of changes
#901 removed the synthetic carrier exception. One acceptance case remains: a stored stack of
[""]is a truthy list, so the recorder still emitsexception.stacktrace="".Check the joined stack string before adding the attribute. Nonempty strings, including whitespace and newlines, remain unchanged. Core exception capture and checkpoint persistence are unchanged. Clarify this distinction in the OTel README.
Design
Assumptions
The behavior follows #886's explicit nonempty-joined-string requirement. Regression tests exercise both OTel plugins through operation/attempt lifecycle events, live and replayed, after an
ErrorObjectserialization round trip. Supplied whitespace/newlines, type/message, failure status and event timestamp bounds are checked. No deployed Lambda validation is claimed.Decisions not covered by the issue or the design note
None; this implements the remaining
[""]acceptance case without changing the issue's scope.Validation
Python 3.14.8, Hatch 1.16.5:
hatch run dev-otel:test -q: 968 passed (73 warnings).hatch run dev-otel:typecheck: passed, 46 source files.hatch fmt --checkfrom the OTel package: passed.hatch run test-wheel-otel:test -q: 968 OTel tests and 12 compatibility tests passed.git diff --check: passed.Checklist
Prepared with Codex assistance; tests and package checks were executed locally.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.