Commit c9b9988
committed
fix: require ruby_llm >= 1.8.0 via OTel
Make the requirement explicit via the standard OTel
instrumentation pattern: a `compatible` block that returns false when
the loaded `ruby_llm` version is below the pin (mirrors what httpx,
http, http_client do in opentelemetry-ruby-contrib).
When the block returns false, OpenTelemetry::Instrumentation::Base
silently skips installing the instrumentation — no raise, no patch
application — so apps on older `ruby_llm` continue to function without
the OTel traces (and without a hard crash).
Note: `gem "rspec-mocks"` test dependency added to use `stub_const`.
This is aligned with other instrumentation gems in opentelemetry-ruby-contrib.compatible block1 parent 9a97ca4 commit c9b9988
2 files changed
Lines changed: 27 additions & 0 deletions
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
16 | 34 | | |
17 | 35 | | |
18 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
12 | 21 | | |
13 | 22 | | |
14 | 23 | | |
| |||
0 commit comments