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

stats: Improved sequencing documentation for server-side stats events and added tests. #7885

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
9 changes: 8 additions & 1 deletion stats/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ type RPCStats interface {
}

// Begin contains stats when an RPC attempt begins.
// This event is called AFTER the InHeader event, as headers must
// be processed before the RPC lifecycle begins.
//
// FailFast is only valid if this Begin is from client side.
type Begin struct {
// Client is true if this Begin is from client side.
Expand Down Expand Up @@ -98,7 +101,10 @@ func (s *InPayload) IsClient() bool { return s.Client }

func (s *InPayload) isRPCStats() {}

// InHeader contains stats when a header is received.
// InHeader contain stats when the header is received.
//
// First event in the server side event sequence.
// Follows last OutPayload for server side events.
type InHeader struct {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RyanBlaney we should just edit the documentation in current struct instead of deleting it entirely and re-creating. Also, restrict the documentation to struct instead of writing the whole sequence. Mentioning that it is the first event on server side after rpc is received is fine.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll get right to it! Thank you!

// Client is true if this InHeader is from client side.
Client bool
Expand All @@ -123,6 +129,7 @@ func (s *InHeader) IsClient() bool { return s.Client }

func (s *InHeader) isRPCStats() {}


// InTrailer contains stats when a trailer is received.
type InTrailer struct {
// Client is true if this InTrailer is from client side.
Expand Down
Loading
Loading