Skip to content

Commit c734342

Browse files
antonpirkerLms24
authored andcommitted
Fixed used data type for setting cache key (#11972)
* Fixed used data type for setting cache key * Removed full stop
1 parent 534ca15 commit c734342

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

docs/platforms/python/tracing/instrumentation/custom-instrumentation/caches-module.mdx

+4-4
Original file line numberDiff line numberDiff 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

docs/platforms/ruby/common/tracing/instrumentation/custom-instrumentation/caches-module.mdx

+4-4
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)