Skip to content

grpc: emit per-message events for streaming RPCs#315

Open
lucasmeijer wants to merge 1 commit intobuildbarn:mainfrom
lucasmeijer:grpc-stream-events
Open

grpc: emit per-message events for streaming RPCs#315
lucasmeijer wants to merge 1 commit intobuildbarn:mainfrom
lucasmeijer:grpc-stream-events

Conversation

@lucasmeijer
Copy link
Contributor

No description provided.

@aspect-workflows
Copy link

aspect-workflows bot commented Feb 3, 2026

Test

25 test targets passed

Targets
//pkg/auth:auth_test [k8-fastbuild]                                                           984ms
//pkg/blobstore/buffer:buffer_test [k8-fastbuild]                                             181ms
//pkg/blobstore/completenesschecking:completenesschecking_test [k8-fastbuild]                 113ms
//pkg/blobstore/grpcclients:grpcclients_test [k8-fastbuild]                                   139ms
//pkg/blobstore/grpcservers:grpcservers_test [k8-fastbuild]                                   138ms
//pkg/blobstore/local:local_test [k8-fastbuild]                                               255ms
//pkg/blobstore/mirrored:mirrored_test [k8-fastbuild]                                         153ms
//pkg/blobstore/readcaching:readcaching_test [k8-fastbuild]                                   68ms
//pkg/blobstore/readfallback:readfallback_test [k8-fastbuild]                                 170ms
//pkg/blobstore/replication:replication_test [k8-fastbuild]                                   139ms
//pkg/blobstore/sharding/integration:integration_test [k8-fastbuild]                          64ms
//pkg/blobstore/sharding:sharding_test [k8-fastbuild]                                         776ms
//pkg/blobstore:blobstore_test [k8-fastbuild]                                                 107ms
//pkg/builder:builder_test [k8-fastbuild]                                                     133ms
//pkg/capabilities:capabilities_test [k8-fastbuild]                                           116ms
//pkg/digest:digest_test [k8-fastbuild]                                                       134ms
//pkg/filesystem/path:path_test [k8-fastbuild]                                                146ms
//pkg/grpc:grpc_test [k8-fastbuild]                                                           144ms
//pkg/http/server:server_test [k8-fastbuild]                                                  144ms
//pkg/jmespath:jmespath_test [k8-fastbuild]                                                   441ms
//pkg/jwt:jwt_test [k8-fastbuild]                                                             229ms
//pkg/otel:otel_test [k8-fastbuild]                                                           142ms
//pkg/prometheus:prometheus_test [k8-fastbuild]                                               115ms
//pkg/util:util_test [k8-fastbuild]                                                           168ms
//pkg/x509:x509_test [k8-fastbuild]                                                           117ms

Total test execution time was 5s. 4 tests (13.8%) were fully cached saving 342ms.

@lucasmeijer lucasmeijer marked this pull request as draft February 3, 2026 11:45
@lucasmeijer lucasmeijer marked this pull request as ready for review February 3, 2026 13:16
@lucasmeijer lucasmeijer force-pushed the grpc-stream-events branch 2 times, most recently from 2856ee8 to 87ba874 Compare February 3, 2026 22:00
// convert into trace span attributes. The resulting attributes will
// have "request." prepended to their names. If the RPC is client
// streaming, the value is extracted from the first message.
// Names of fields to extract from the first request message of an
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't the word 'first' be removed here? I think the original description was accurate, with the exception of that final sentence.

// Attributes will not be attached to trace spans if one of the parent
// messages of the field that is referenced is not set.
repeated string attributes_from_first_request_message = 1;
repeated string attributes_from_request_message = 1;
Copy link
Member

Choose a reason for hiding this comment

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

s/_message/_messages/ ?

// 'attributes_from_request_message'.
repeated string attributes_from_response_message = 2;

// Whether to extract attributes from follow-up request and response
Copy link
Member

Choose a reason for hiding this comment

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

I'm not too happy with the term 'follow-up'. What are your thoughts on having options like these instead?

// If not set, only extract attributes from the first request message, and
// attach them to the trace span.
//
// If set, extract attributes from all request messages, and emit a per-message
// span event containing those attributes.
bool emit_request_message_events = 3;

// If not set, only extract attributes from the first response message, and [...]
bool emit_response_message_events = 4;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants