-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Open
Labels
area/redisenhancementFeature requests. Not bugs or questions.Feature requests. Not bugs or questions.
Description
Envoy supports a bunch of different Redis command error messages. I'd like to suggest that those error messages start with an error prefix in ALL CAPS as the first word of the message.
For example, instead of:
no upstream host
Envoy might respond with (just an example):
NOHOST no upstream host
This would:
- be aligned with Redis error messages returned by Redis itself. The Redis protocol spec also mentions this as a possibility.
- make it easier for clients to programmatically identify and handle different error scenarios. Some Redis client libraries, e.g. Ruby's
redis-client, always parse the first word as the error code, which is obviously incorrect for Envoy's error messages which share the same first word (upstream protocol errorandupstream failure). - make emitting telemetry on the client side easier and cheaper since clients could emit only the (short) error code with telemetry instead of the (long) full error message. Also, one of the error messages has a dynamic part,
finished with n errors(thenis variable), which increases the cardinality of metrics which include the message as a tag. If clients could emit only the error code, that would help reduce cardinality.
What do you all think -- would this make sense and are there downsides to doing this? 💭 If you all are open to this suggestion, I'd be happy to make an attempt at a PR to implement this.
Metadata
Metadata
Assignees
Labels
area/redisenhancementFeature requests. Not bugs or questions.Feature requests. Not bugs or questions.