Repository navigation
Use standard OTel attributes for on_tool_interrupt telemetry - #275
Conversation
Follow-up to r-uby-dev#259. Replaces the non-standard `gen_ai.tool.interrupt` span event with the pattern maintainer altruby suggested: `error.type` => "LLM::Interrupt", error status, and the standard `gen_ai.tool.finish` event — mirroring how `on_tool_error` and `on_interrupt` handle it.
|
@azmi2409 |
Sorry. I just saw this now. |
|
Not on Windows here — Linux. And a correction on my PR-body note: those failures weren't console specs. They were the alibaba provider specs failing locally because If you're seeing console-spec failures on your Windows machine, my guess would be the |
Ah, right. I think we could add
Yeah. I think the curses dependency is broken, and the |
Summary
Follow-up to #259.
gen_ai.tool.interruptis not part of the OpenTelemetry standard (as altruby noted post-merge on #259), so this replaces the custom span event inon_tool_interruptwith the approach he suggested — the same pattern used byon_tool_errorandon_interrupt:The public API (
on_tool_interrupt(ex:, span:)) is unchanged.Tests
spec/tracer/telemetry_spec.rbto assert the new behavior:error.typeis recorded as"LLM::Interrupt", the span status is an error, and the standardgen_ai.tool.finishevent is emitted (instead ofgen_ai.tool.interrupt).bundle exec rspec spec/tracer/telemetry_spec.rb: 26 examples, 0 failures.