feat(redis-cache): Create cache-span with prefixed keys (get/set commands)#12070
feat(redis-cache): Create cache-span with prefixed keys (get/set commands)#12070
Conversation
size-limit report 📦
|
| name: 'Test Transaction', | ||
| op: 'transaction', | ||
| }, |
There was a problem hiding this comment.
| name: 'Test Transaction', | |
| op: 'transaction', | |
| }, | |
| name: 'Test Span', | |
| op: 'test-span', | |
| }, |
let's avoid transaction wording in new code :D
| else if (response === null || response === undefined) return 0; | ||
| return JSON.stringify(response).length; | ||
| } catch (e) { | ||
| return 0; |
There was a problem hiding this comment.
m: Should we return undefined here? Maybe it is more confusing to set this to 0 if something fails, than to not set it at all?
| return; | ||
| } | ||
|
|
||
| const networkPeerAddress = spanToJSON(span).data?.['net.peer.name']; |
There was a problem hiding this comment.
out of interest, are we using something non-standard here or is redis emitting something non-standard?
There was a problem hiding this comment.
redis seems to be using the old standard as there was a change to those params: open-telemetry/opentelemetry-specification#3199
We are using those: https://opentelemetry.io/docs/specs/semconv/attributes-registry/network/
There was a problem hiding this comment.
ok, got it, makes sense - maybe we can leave a comment like this in the code so we can potentially revisit this when we update the redis instrumentation at some point :)
Populates the OTel span with cache attributes. Currently,
getandsetcommands are considered.