Skip to content

Commit 87ca88a

Browse files
nickamorimyiyuan-he
authored andcommitted
fix: only prepend Dalli patch if binary protocol defined (open-telemetry#1489)
chore: only prepend Dalli patch if binary protocol defined
1 parent 007d121 commit 87ca88a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

instrumentation/dalli/lib/opentelemetry/instrumentation/dalli/instrumentation.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def add_patches
3333
if Gem::Version.new(::Dalli::VERSION) < Gem::Version.new('3.0.0')
3434
::Dalli::Server.prepend(Patches::Server)
3535
else
36-
::Dalli::Protocol::Binary.prepend(Patches::Server)
36+
::Dalli::Protocol::Binary.prepend(Patches::Server) if defined?(::Dalli::Protocol::Binary)
3737
::Dalli::Protocol::Meta.prepend(Patches::Server) if defined?(::Dalli::Protocol::Meta)
3838
end
3939
end

0 commit comments

Comments
 (0)