Create Client side metrics for redis#4319
Conversation
There was a problem hiding this comment.
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.
|
Here is the summary of changes. You are about to add 1 region tag.
This comment is generated by snippet-bot.
|
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