-
Notifications
You must be signed in to change notification settings - Fork 20
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
(otelarrowreceiver): add updown counters to track number of bytes and items pending #150
(otelarrowreceiver): add updown counters to track number of bytes and items pending #150
Conversation
if err := r.processAndConsume(thisCtx, method, ac, req, serverStream, authErr); err != nil { | ||
return err | ||
} | ||
r.recvInFlightRequests.Add(thisCtx, -1) |
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.
Is it intended that the recvInFlightRequests up-down counter is never decremented when processAndConsume returns an error?
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.
I suggest adding the increment to the top of processAndConsume, with a defer func() { decrement() } to undo that count.
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.
Sounds a good idea :-)
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.
Thanks for catching that @lquerel! This should be fixed now
d126d71
to
4528377
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.
Thanks
Resolves #148
This PR adds two metrics to track the number of items and bytes that are pending in the receiver. Specifically when used with the
concurrentbatchprocessor
requests can be have a long lifetime in receiver due to the in flight byte limiter in theconcurrentbatchprocessor
.