-
Notifications
You must be signed in to change notification settings - Fork 703
Improve metastore observability #4580
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
Conversation
| // | ||
| // The registry is only used on the leader node where Propose() is called. Followers will | ||
| // not have contexts available and will use context.Background() instead. | ||
| type ContextRegistry struct { |
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.
This will add some memory overhead but I think it is worth it for gaining more visibility. If anyone has alternative ideas, I'd be happy to rework this part.
| } | ||
|
|
||
| ctx := context.Background() | ||
| if ctxID := string(cmd.Extensions); ctxID != "" { |
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.
We use the extension field of the raft Log type, to carry the context identifiers
|
|
||
| future := n.raft.ApplyLog(raft.Log{ | ||
| Data: raw, | ||
| Extensions: []byte(ctxID), |
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.
We use the extension field of the raft Log type, to carry the context identifiers (writing point)
6fe7d52 to
6429ad7
Compare
6429ad7 to
2fd2481
Compare
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
Adds tracing to the metastore public endpoints. This should help troubleshooting cases where the metastore latency goes up. Fixes https://github.com/grafana/pyroscope-squad/issues/603.
Here is an example for the IndexService.AddBlock RPC: