Skip to content

fix(closes OPEN-9372): ensure 'log_context' and 'log_output' work whe…#605

Merged
gustavocidornelas merged 1 commit intomainfrom
cid/log-context-bug
Mar 5, 2026
Merged

fix(closes OPEN-9372): ensure 'log_context' and 'log_output' work whe…#605
gustavocidornelas merged 1 commit intomainfrom
cid/log-context-bug

Conversation

@gustavocidornelas
Copy link
Contributor

…n called from the same function

Pull Request

Summary

When the user called log_context and log_output from within the same traced function, only the last call worked. This happened because both of them were leveraging the step metadata field and one call was overwriting the next.

This PR makes a small update to the log method of steps. Instead of overwriting the metadata fields, we merge them.

Changes

  • Merge the metadata when calling step.log(metadata={...}) instead of fully overwriting.

Context

OPEN-9372: Ensure log_context and log_output work when called from the same function

Testing

  • Manual testing

@gustavocidornelas gustavocidornelas merged commit d3079ce into main Mar 5, 2026
5 checks passed
@gustavocidornelas gustavocidornelas deleted the cid/log-context-bug branch March 5, 2026 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants