File tree 2 files changed +8
-8
lines changed
python/tracing/instrumentation/custom-instrumentation
ruby/common/tracing/instrumentation/custom-instrumentation
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:
45
45
span.set_data(" network.peer.address" , " cache.example.com/supercache" )
46
46
span.set_data(" network.peer.port" , 9000 )
47
47
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] )
50
50
51
51
# Add the size of the value you stored in the cache
52
52
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:
80
80
span.set_data(" network.peer.address" , " cache.example.com/supercache" )
81
81
span.set_data(" network.peer.port" , 9000 )
82
82
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] )
85
85
86
86
if value is not None :
87
87
# 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|
38
38
span.set_data(' network.peer.address' , ' cache.example.com/supercache' )
39
39
span.set_data(' network.peer.port' , 9000 )
40
40
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] )
43
43
44
44
# Add the size of the value you stored in the cache
45
45
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|
69
69
span.set_data(' network.peer.address' , ' cache.example.com/supercache' )
70
70
span.set_data(' network.peer.port' , 9000 )
71
71
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] )
74
74
75
75
if value
76
76
# If you retrieved a value, the cache was hit
You can’t perform that action at this time.
0 commit comments