Skip to content

Create Client side metrics#14197

Open
fosky94 wants to merge 2 commits into
GoogleCloudPlatform:mainfrom
fosky94:main
Open

Create Client side metrics#14197
fosky94 wants to merge 2 commits into
GoogleCloudPlatform:mainfrom
fosky94:main

Conversation

@fosky94
Copy link
Copy Markdown

@fosky94 fosky94 commented May 19, 2026

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

@fosky94 fosky94 requested review from a team as code owners May 19, 2026 22:43
@product-auto-label product-auto-label Bot added samples Issues that are directly related to samples. api: memorystore labels May 19, 2026
@google-cla
Copy link
Copy Markdown

google-cla Bot commented May 19, 2026

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.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread memorystore/redis/client_side_metrics/main.py
Comment thread memorystore/redis/client_side_metrics/main.py
@fosky94
Copy link
Copy Markdown
Author

fosky94 commented May 19, 2026

added CLA and solved comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: memorystore samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant