File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
python/tracing/instrumentation/custom-instrumentation
ruby/common/tracing/instrumentation/custom-instrumentation Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -45,8 +45,8 @@ with sentry_sdk.start_span(op="cache.put") as span:
4545 span.set_data(" network.peer.address" , " cache.example.com/supercache" )
4646 span.set_data(" network.peer.port" , 9000 )
4747
48- # Add the key you want to set
49- span.set_data(" cache.key" , key)
48+ # Add the key(s) you want to set
49+ span.set_data(" cache.key" , [ key] )
5050
5151 # Add the size of the value you stored in the cache
5252 span.set_data(" cache.item_size" , len (value)) # Warning: if value is very big this could use lots of memory
@@ -80,8 +80,8 @@ with sentry_sdk.start_span(op="cache.get") as span:
8080 span.set_data(" network.peer.address" , " cache.example.com/supercache" )
8181 span.set_data(" network.peer.port" , 9000 )
8282
83- # Add the key you just retrieved from the cache
84- span.set_data(" cache.key" , key)
83+ # Add the key(s) you just retrieved from the cache
84+ span.set_data(" cache.key" , [ key] )
8585
8686 if value is not None :
8787 # If you retrieved a value, the cache was hit
Original file line number Diff line number Diff line change @@ -38,8 +38,8 @@ Sentry.with_child_span(op: 'cache.put') do |span|
3838 span.set_data(' network.peer.address' , ' cache.example.com/supercache' )
3939 span.set_data(' network.peer.port' , 9000 )
4040
41- # Add the key you want to set
42- span.set_data(' cache.key' , key)
41+ # Add the key(s) you want to set
42+ span.set_data(' cache.key' , [ key] )
4343
4444 # Add the size of the value you stored in the cache
4545 span.set_data(' cache.item_size' , value.size) # Warning: if value is very big this could use lots of memory
@@ -69,8 +69,8 @@ Sentry.with_child_span(op: 'cache.get') do |span|
6969 span.set_data(' network.peer.address' , ' cache.example.com/supercache' )
7070 span.set_data(' network.peer.port' , 9000 )
7171
72- # Add the key you just retrieved from the cache
73- span.set_data(' cache.key' , key)
72+ # Add the key(s) you just retrieved from the cache
73+ span.set_data(' cache.key' , [ key] )
7474
7575 if value
7676 # If you retrieved a value, the cache was hit
You can’t perform that action at this time.
0 commit comments