Repository navigation
Conversation
Signed-off-by: Yves Brissaud <yves@dagger.io>
eunomie
marked this pull request as ready for review
November 10, 2026 14:04
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.
record_exceptionnow setsexception.typeon the event of therecording Python exceptionspan to the qualified type of the exception thatModule.callwrapped inFunctionError. The override applies only when the exception is exactlyFunctionErrorwith an explicit__cause__. Subclasses, wrappers without a cause, and implicit__context__keep the wrapper's type.The recorded exception is still the
FunctionErrorwrapper, so the event's message and chained stacktrace are unchanged. The Dagger error payload is also unchanged: the span's event shows the immediate cause's type, while the Dagger error still reportsFunctionError.The new
tests/mod/test_exceptions.pygoes through the realModule.callpath for sync and async functions and records spans with an in-memory OTel exporter.Checked from
sdk/:uv run --frozen --group dev pytest -q tests/mod/test_exceptions.pyuv run --frozen --group dev pytest -q tests/mod/test_results.py -m "not slow"(run on the previous revision; the final revision only renames a local variable and edits a test comment)ruff checkandruff format --checkon the two changed filesNot checked: engine and integration execution were not run.
Separate follow-up: generated Dang entrypoints run
python -m dagger.mod call, which does not call this recorder. They would need their own exception event.