Skip to content

Commit 1e84858

Browse files
committed
fix: Format gat commands
1 parent b1ea804 commit 1e84858

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ module Utils
4141
'multi_add' => 'addq',
4242
'multi_replace' => 'replaceq',
4343
'multi_delete' => 'deleteq',
44-
'touch' => 'touch'
44+
'touch' => 'touch',
45+
'gat' => 'gat'
4546
# 'sasl_authentication' => 'auth_negotiation',
4647
# 'sasl_authentication' => 'auth_request',
4748
}.freeze

instrumentation/dalli/test/opentelemetry/instrumentation/dalli/instrumentation_test.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,14 @@
127127
_(span.name).must_equal 'set'
128128
_(span.attributes['db.statement']).must_equal 'set ?'
129129
end
130+
131+
it 'supports gat' do
132+
dalli.gat('foo')
133+
134+
_(exporter.finished_spans.size).must_equal 1
135+
_(span.name).must_equal 'gat'
136+
_(span.attributes['db.statement']).must_equal 'gat foo 0'
137+
end
130138
end
131139

132140
# Dalli 3.x has different behavior than 2.x versions and attempts to retry on network errors

0 commit comments

Comments
 (0)