Skip to content

Create Client side metrics for redis#4319

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

Create Client side metrics for redis#4319
fosky94 wants to merge 3 commits into
GoogleCloudPlatform:mainfrom
fosky94:main

Conversation

@fosky94

@fosky94 fosky94 commented May 19, 2026

Copy link
Copy Markdown
Member

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:

npm install redis @opentelemetry/api @opentelemetry/sdk-trace-node @opentelemetry/sdk-trace-base @opentelemetry/sdk-metrics @opentelemetry/instrumentation @opentelemetry/instrumentation-redis-4 @google-cloud/opentelemetry-cloud-trace-exporter @google-cloud/opentelemetry-cloud-monitoring-exporter

@fosky94 fosky94 requested review from a team as code owners May 19, 2026 23:08
@product-auto-label product-auto-label Bot added samples Issues that are directly related to samples. api: memorystore labels May 19, 2026

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

Copy link
Copy Markdown
Contributor

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 Node.js implementation for tracking Redis client-side metrics using OpenTelemetry, including custom metrics for RTT, application blocking latency, and error counts. Feedback was provided to optimize the simulation of application processing logic in the smartRedisCall function, as the current use of String(response) could lead to unnecessary CPU and memory overhead for large Redis responses.

Comment thread memorystore/redis/client_side_metrics/server.js
@snippet-bot

snippet-bot Bot commented Jun 9, 2026

Copy link
Copy Markdown

Here is the summary of changes.

You are about to add 1 region tag.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@fosky94 fosky94 left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

added region tags

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