Repository navigation
feat(agents): Instrument RubyLLM agent runs - #3186
sl0thentr0py wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 18541b7. Configure here.
| ensure | ||
| if depth&.positive? | ||
| depth.zero? ? chat.remove_instance_variable(DEPTH_IVAR) : chat.instance_variable_set(DEPTH_IVAR, depth) | ||
| end |
There was a problem hiding this comment.
Agent run depth never resets
High Severity
The ensure in with only restores depth when depth is already positive, so the outer wrapper never clears @sentry_agents_agent_run_depth. After the first run, later calls on the same chat skip gen_ai.invoke_agent spans, including follow-up turns on a reused agent chat.
Reviewed by Cursor Bugbot for commit 18541b7. Configure here.
Co-Authored-By: OpenAI <noreply@openai.com>
18541b7 to
cbb73ec
Compare
|
Please build this on the new |


Summary
Adds RubyLLM agent identity and agent-run tracing.
RubyLLM::Agent.apply_configurationpath, covering plain chats and Rails-backed construction/find flows.gen_ai.invoke_agentspan per outer operation acrosscomplete,generate,run_tools, andstep.gen_ai.agent.nameto model and tool descendants.Testing
sentry-agentsspecs and lint.Issues