-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
out of interest, are we using something non-standard here or is redis emitting something non-standard?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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,
get
andset
commands are considered.