Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make query in FT.SEARCH human readable #3204

Open
nikolaydubina opened this issue Dec 10, 2024 · 0 comments
Open

Make query in FT.SEARCH human readable #3204

nikolaydubina opened this issue Dec 10, 2024 · 0 comments

Comments

@nikolaydubina
Copy link

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:

image

Current Behavior

image

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

  1. make any simple query with FT.SEARCH
  2. 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

  1. review what is send on wire (if command is human readble indeed)
  2. set otel to what is send on wire
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant