Skip to content

fix: skip instrumenting dalli 4.2.0#1982

Open
hannahramadan wants to merge 2 commits intoopen-telemetry:mainfrom
hannahramadan:do_not_install_otel_dalli_4_2_0
Open

fix: skip instrumenting dalli 4.2.0#1982
hannahramadan wants to merge 2 commits intoopen-telemetry:mainfrom
hannahramadan:do_not_install_otel_dalli_4_2_0

Conversation

@hannahramadan
Copy link
Member

@hannahramadan hannahramadan commented Feb 3, 2026

Dalli 4.2.0 added Otel instrumentation 🎉

This PR disables our Dalli 4.2.0+ community instrumentation in favor of their native instrumentation to prevent double reporting.

I've opened an issue with the Dalli team to add their instrumentation to the Otel Registry, as well as noted differences in between the two instrumentations.

appraise 'dalli-latest' do
gem 'dalli'
end
# Dalli 4.2.0+ has native OpenTelemetry support, so we no longer need
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's great!

I will have to look at how it gets auto loaded so we can incorporate as a solution for other gems

Copy link
Contributor

@thompson-tomo thompson-tomo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we update the package readme to inform users that if using dalli 4, we recommend to use the latest version as it contains native integration and development of this gem is frozen.

We could even restrict this gem to <= 4 so it is clear to use this. I note there was such a short period between v4 releases https://rubygems.org/gems/dalli/versions

end

def add_patches
if dalli_has_native_otel_support?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be in the compatible? block instead and add a MAX_VERSION constraint?

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.

3 participants