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

Add grpc.received.message_count and grpc.sent.message_count #1988

Open
luke-sterkowicz opened this issue Mar 12, 2025 · 1 comment
Open

Add grpc.received.message_count and grpc.sent.message_count #1988

luke-sterkowicz opened this issue Mar 12, 2025 · 1 comment
Labels
area:rpc enhancement New feature or request experts needed This issue or pull request is outside an area where general approvers feel they can approve triage:needs-triage

Comments

@luke-sterkowicz
Copy link

luke-sterkowicz commented Mar 12, 2025

Propose new conventions

I propose to add 2 new span attributes for gRPC: grpc.received.message_count and grpc.sent.message_count. The purpose of the attributes is streaming of messages within a single gRPC transaction, which can be configured for request and/or response separately. The context of the attributes would depend on whether the collection is tracked in client or server:

  1. Client context
  • grpc.sent.message_count the number of request messages sent to server
  • grpc.received.message_count the number of response messages received from server
  1. Server context
  • grpc.received.message_count the number of request messages received from client
  • grpc.sent.message_count the number of response messages sent to client

In case of regular (non-streamed) request and/or response, the count would always be 1 (unless an error occurs before or during the transfer).

@mx-psi
Copy link
Member

mx-psi commented Mar 13, 2025

IMO we should look into #1773 first and see if there are metrics that cover those use cases, and adopt those instead. We may not need to solve the whole "aligning both projects" problems, but we should at least not worsen it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:rpc enhancement New feature or request experts needed This issue or pull request is outside an area where general approvers feel they can approve triage:needs-triage
Projects
Status: Need triage
Development

No branches or pull requests

3 participants