-
Notifications
You must be signed in to change notification settings - Fork 893
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
Add metric for currently-in-flight HTTP requests #1378
Conversation
488a54a
to
61c33a0
Compare
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
(Merged CHANGELOG.md -- let me know if I should squash) |
Is this a reasonable addition? Do I need to bring this up at a contributor meeting? |
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!
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.
Please see my comment here.
@reyang In other cases, we've discussed how it may be acceptable to specify semantic conventions without saying how they should be generated. For the case of "in flight HTTP requests" we could either materialize a dedicated metric or we could calculate the number in-flight by subtracting one metric from another. It's clearly much harder to do the second, so most users will prefer the first. But if you have a sophisticated metric system, it's redundant to record an additional metric and you shouldn't have to. The example we discussed was metrics with |
I agree with what @jmacd explained here #1378 (comment)
Co-authored-by: Reiley Yang <[email protected]>
Sorry for the delay, the extra comments caught me in the middle of vacation/school break, and it took some time to dig out. |
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.
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
I'm not authorized to merge this PR, but it looks like it does have the requisite reviews. What's the next step? |
@jmacd -- I think this is ready for merge? |
@evankanderson sorry for the long delay. Thank you for this contribution! |
* Add metric for currently-in-flight HTTP requests * Update name to active_requests * Fix missing rename noticed by anuraaga * Clarify `active_requests` are in-flight Co-authored-by: Reiley Yang <[email protected]> * Switch to UpDownSumObserver Co-authored-by: Reiley Yang <[email protected]> Co-authored-by: Joshua MacDonald <[email protected]>
* Add metric for currently-in-flight HTTP requests * Update name to active_requests * Fix missing rename noticed by anuraaga * Clarify `active_requests` are in-flight Co-authored-by: Reiley Yang <[email protected]> * Switch to UpDownSumObserver Co-authored-by: Reiley Yang <[email protected]> Co-authored-by: Joshua MacDonald <[email protected]>
Changes
Adds an
http.server.requests
metric to count in-flight HTTP requests on the server.I was starting to implement some monitoring using the HTTP semantic conventions, and realized that it was also useful to have a count of the current in-flight HTTP requests (those which had started but not yet completed). This allows monitoring both the concurrency of the server and detecting unfortunate queueing or backlog events before the requests have completed (for example, if the request is blocked indefinitely).
(Will update CHANGELOG.md once I have a PR #)