Skip to content

yabeda-hotcell counts a call interrupted by an exception as code="ok" #93

Closed

Description

@flavorjones

When an exception escapes a call, such as the application's own request timeout, yabeda-hotcell counts the call as code="ok" and records a perform of 0 seconds. The perform.hot_cell event then carries exception and no code, and record_perform falls back to "ok" whenever code is missing.

HotCell::LogSubscriber already handles this case: it writes the exception's class and no code.

To reproduce in an application with yabeda-hotcell 0.6.0 installed:

ActiveSupport::Notifications.instrument("perform.hot_cell", cell: "active_storage", operation: "health.echo") do
  raise Timeout::Error
end
# Yabeda.hotcell.requests: {cell: "active_storage", operation: "health.echo", code: "ok", cause: ""} => 1

Before 0.6.0, these calls carried no cell or operation and landed in a series of their own. Since #78 added both, they inflate ok for the real cell and operation.

Proposal: count these calls under a code of their own, such as exception, and skip the perform observation, because the cell measured nothing.

I found this while upgrading HEY (basecamp/haystack#8917). HEY's own Yabeda module, which that PR deletes, had the same bug.

Activity

  1. added 2 commits that reference this issue on Oct 10, 2026
    2cd42d6
    ca6f656
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions