redis / rueidis

A fast Golang Redis client that supports Client Side Caching, Auto Pipelining, Generics OM, RedisJSON, RedisBloom, RediSearch, etc.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Move OpenTelemetry dependencies to `rueidisotel` subpackage

rueian opened this issue · comments

Currently, the otel dependencies live in the root go.mod:

rueidis/go.mod

Lines 7 to 11 in 3b113fc

go.opentelemetry.io/otel v1.21.0
go.opentelemetry.io/otel/metric v1.21.0
go.opentelemetry.io/otel/sdk v1.21.0
go.opentelemetry.io/otel/sdk/metric v1.21.0
go.opentelemetry.io/otel/trace v1.21.0

There are two problems with this approach:

  1. It requires go 1.20 and upwards.
  2. It introduces unnecessary dependencies if users don't use rueidisotel

It will be better to move those dependencies to rueidisotel's own go.mod like what go-redis did:

https://github.com/redis/go-redis/blob/531f06861b26fc01b1b75f777d7155d286b0943c/extra/redisotel/go.mod#L5-L15

Hey can i work on this?

Hey can i work on this?

Sure!