Create Client side metrics#14197
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request introduces a Python script for monitoring Redis client-side metrics and tracing using OpenTelemetry, specifically targeting Google Cloud Trace and Monitoring. It includes a wrapper function, smart_redis_call, designed to handle retries and measure various latency metrics. The review feedback identifies two significant areas for improvement: the removal of redundant connection pool operations that introduce unnecessary overhead and latency, and the correction of a misleading 'application blocking latency' metric that uses an expensive and unrepresentative string conversion of the Redis response.
|
added CLA and solved comments |
|
Here is the summary of changes. You are about to add 1 region tag.
This comment is generated by snippet-bot.
|
|
Hello, just as a reminder, since we no longer have functioning pipelines, could you add a screenshot of the execution locally? This was added as a requirement for merging python sample changes. |
fosky94
left a comment
There was a problem hiding this comment.
Applied all recommended dependency pinning, file separation, and PEP-8 global variable fixes requested by XrossFox.
XrossFox
left a comment
There was a problem hiding this comment.
Generally speaking, i think it looks okay now, i'd just like to request a screenshot of the execution of pytest locally. LGTM.
fosky94
left a comment
There was a problem hiding this comment.
applied changes, added screenshot of tests






Description
Added a new sample code to log client side metrics and traces for redis. this will be added to the public docs once this sample code is posted
client libraries that need to be installed:
pip install redis opentelemetry-api opentelemetry-sdk opentelemetry-instrumentation-redis opentelemetry-exporter-gcp-trace opentelemetry-exporter-gcp-monitoring