Skip to content

fix: require ruby_llm >= 1.8.0 via OTel compatible block#25

Open
oleksii-leonov wants to merge 1 commit into
thoughtbot:mainfrom
syngenta:chore/require-ruby_llm-1.8.0
Open

fix: require ruby_llm >= 1.8.0 via OTel compatible block#25
oleksii-leonov wants to merge 1 commit into
thoughtbot:mainfrom
syngenta:chore/require-ruby_llm-1.8.0

Conversation

@oleksii-leonov
Copy link
Copy Markdown
Contributor

@oleksii-leonov oleksii-leonov commented May 22, 2026

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).

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.
@oleksii-leonov oleksii-leonov force-pushed the chore/require-ruby_llm-1.8.0 branch from c9b9988 to e61dc26 Compare May 23, 2026 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant