-
Notifications
You must be signed in to change notification settings - Fork 45
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
Emit metric for redis and bigtable client #210
Conversation
Help: "Redis connection stats", | ||
}, []string{"stat"}) | ||
|
||
hitConnStats = "hits" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use constant instead of var
} | ||
|
||
func (h *redisHook) AfterProcess(ctx context.Context, cmd redis.Cmder) error { | ||
startTime, ok := ctx.Value(requestStartKey{}).(time.Time) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How will it be able to calculate the latency? It doesn't seem to be the case here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
before running the redis command, it will create new context that add start time of the command, this part of BeforeProcess
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah got it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* Add metric for redis and bigtable direct serving * Check whether pool stats for redis nil or not * Make status string as const instead of var * Remove bigtable grpc metric Co-authored-by: Tio Pramayudi <[email protected]>
What this PR does / why we need it:
Emit redis & bigtable client metric for better observability of feast direct serving
Which issue(s) this PR fixes:
Fixes #
Does this PR introduce a user-facing change?:
Checklist