Skip to content

Conversation

alexqyle
Copy link
Contributor

What this PR does:

The current grpc middleware is recording stream connection request per connection. It cannot properly record request metrics for stream push requests, since stream push request is reusing stream connection. This PR creates new middleware to record request metric per send/receive message call.

Which issue(s) this PR fixes:
NA

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@danielblando
Copy link
Contributor

Should we also add the inflightPushRequests for PushStream?

@alexqyle
Copy link
Contributor Author

inflightPushRequests

This is already handled properly in ingester client: https://github.com/cortexproject/cortex/blob/master/pkg/ingester/client/client.go#L97

Copy link
Contributor

@yeya24 yeya24 left a comment

Choose a reason for hiding this comment

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

Thanks!

@yeya24 yeya24 merged commit 3e845a4 into cortexproject:master Jul 2, 2025
17 checks passed
@alexqyle alexqyle deleted the fix-stream-push-metrics branch July 2, 2025 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants