redis / go-redis

Redis Go client
https://redis.uptrace.dev
BSD 2-Clause "Simplified" License
19.95k stars 2.36k forks source link

feat: add max cmd bytes for otel hook #2929

Open rfyiamcool opened 7 months ago

rfyiamcool commented 7 months ago

summary

Limit the bytes size of raw redis commands. when writing particularly large amounts of data, it is not friendly to otel collector and storage, and sometimes we don't need all the data, only need to solve the problem based on part of the data. 😁

so, add WithMaxCommandBytes to limit the bytes of redis request string. 😁