Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 22, 2025

Clarifies that gRPC now supports multiple StatsHandlers natively - all registered handlers are invoked, not just the last one.

Context

The bot reviewer flagged the loop registering multiple stats handlers in grpc/application.go:161-166, claiming only the last handler would take effect. This was based on outdated gRPC behavior.

Resolution

No code changes required. Modern gRPC versions support multiple grpc.StatsHandler() options - each handler is added to an internal list and all are invoked on RPC events. The current implementation correctly registers all telemetry handlers.

// All handlers are registered and invoked
for _, handler := range handlers {
    if handler != nil {
        options = append(options, grpc.StatsHandler(handler))
    }
}

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Update gRPC telemetry instrumentation implementation Address feedback on gRPC multiple StatsHandler support Dec 22, 2025
Copilot AI requested a review from krishankumar01 December 22, 2025 21:14
@krishankumar01 krishankumar01 deleted the copilot/sub-pr-1305 branch December 22, 2025 21:16
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