Make query in FT.SEARCH human readable
Opened this issue · 3 comments
Command args printer (as seen in otel db.statement) is obscure. even when queries are simple and human readable. this leads to problems with debugging.
Expected Behavior
query should be printed like *=>[KNN 10 @v $v
as produced by:
Current Behavior
Possible Solution
probably this code makes printing query into non-simple bytes (due to lack of whitespace or other symbols)
https://github.com/redis/go-redis/blob/master/extra/rediscmd/rediscmd.go#L13
Steps to Reproduce
- make any simple query with FT.SEARCH
- observe otel db.statement
Context (Environment)
go redis module
github.com/redis/go-redis/v9 v9.7.0
github.com/redis/go-redis/extra/redisotel/v9 v9.7.0
Detailed Description
If otel db.statement is indeed shows exactly what is send over wire, maybe it is okay to keep it. but I doubt so. since this is conflicting with Redis syntax in docs.
importantly, Redis was designed to have API human readable. specifically query statements. now we are marshalling what is supposed to be human redable into non-readable binary? how come? when did we lose the plot?
Possible Implementation
- review what is send on wire (if command is human readble indeed)
- set otel to what is send on wire
This is related to redisotel rather than go-redis. cc @vmihailenco, who is supporting redisotel at the moment?
@nikolaydubina seems we don't have an active community member to support redisotel. If you would like to take a look at resolving this and maybe @monkey92t can help you to review it.
noted. I am quite busy these days. so may come back to this in awhile