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.
18541b7 to
cbb73ec
Compare
|
Please build this on the new |
cbb73ec to
3c0450d
Compare
PR risk: mediumFor commit Main concerns: data sent to Sentry, host performance, reach. This label is a hint for reviewers, not an approval. |
3c0450d to
3df5c96
Compare
3df5c96 to
ae6fec6
Compare
ae6fec6 to
621235d
Compare
621235d to
f97fa14
Compare
d89d167 to
fd044d0
Compare
fd044d0 to
641d580
Compare
641d580 to
5700265
Compare
5700265 to
caa9307
Compare
caa9307 to
b100396
Compare
Co-Authored-By: OpenAI <noreply@openai.com>


Summary
Adds RubyLLM agent identity and agent-run tracing.
RubyLLM::Agent.apply_configurationpath.gen_ai.invoke_agentspan per outer operation acrosscomplete,generate,run_tools, andstep.gen_ai.agent.nameto model and tool descendants.Testing
sentry-agentsspec suite and RuboCop pass.Issues