Skip to content

Update on_finish use the span saved on the request env - #2

Open
rsamoilov wants to merge 1 commit into
fix/rack-fiber-safe-context-detachmentfrom
on-finish-request-attrs
Open

Update on_finish use the span saved on the request env#2
rsamoilov wants to merge 1 commit into
fix/rack-fiber-safe-context-detachmentfrom
on-finish-request-attrs

Conversation

@rsamoilov

Copy link
Copy Markdown
Member

Previously, on_finish was still getting the span from Rack.current_span. When running in a different fiber, Rack.current_span.recording? == false, so add_response_attributes was skipped.

The fix makes on_finish use the stored Rack request context when finishing spans - this keeps response attributes and error status on the original server span.

Previously, `on_finish` was still getting the span from `Rack.current_span`. When running in a different fiber, `Rack.current_span.recording? == false`, so `add_response_attributes` was skipped.

The fix makes `on_finish` use the stored Rack request context when finishing spans - this keeps response attributes and error status on the original server span.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant