feat: add client side metrics for redis#5582
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new Go application demonstrating the integration of OpenTelemetry with a Redis client. It features telemetry initialization for Google Cloud and a robust smartRedisCall wrapper that provides retry logic, tracing, and metric collection for latency and connectivity errors. The review feedback suggests several improvements: handling errors during metric creation, making the telemetry shutdown and retry backoffs context-aware to prevent hangs, clarifying placeholder logic, and improving error reporting by wrapping the original cause when retries fail.
|
Here is the summary of changes. You are about to add 1 region tag.
This comment is generated by snippet-bot.
|
fosky94
left a comment
There was a problem hiding this comment.
feat: add client side metrics for redis
This commit introduces functionality to capture and expose client-side metrics for Memorystore for Redis interactions.
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:
go get github.com/gomodule/redigo/redis@latest
go get go.opentelemetry.io/otel
go get go.opentelemetry.io/otel/sdk/trace
go get go.opentelemetry.io/otel/sdk/metric
go get github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace
go get github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric