question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support streaming calls in the `SubchannelCallTracker`

See original GitHub issue

What version of gRPC and what language are you using?

Grpc.AspNetCore v2.53.0 in C#

What operating system (Linux, Windows,…) and version?

Mac OSX Ventura

What runtime / compiler are you using (e.g. .NET Core SDK version dotnet --info)

.NET 7.0.200

What did you do?

I wrote a custom load balancer for client side load balancing. I used the ISubchannelCallTracker interface to detect when calls happen and complete on a subchannel to know what load they are bearing. This works fine for non-streaming grpc-calls, but it breaks down for streaming-calls.

What did you expect to see?

That the Complete-function of the ISubchannelCallTracker is called once the AsyncServerStreamingCall is disposed in the user-code.

What did you see instead?

The Complete-function is called right after the grpc-call is made, before even the first item is retriebed from the ResponseStream via MoveNext.

Thoughts

I saw this comment in the source and wondered what it would take to handle this case correctly. AsyncServerStreamingCall does have a disposeAction already, but its not clear how it relates to the HttpResponseMessage in the other place and what else needs to be thought of. I would be happy to provide a PR if I could get some pointers.

Issue Analytics

  • State:open
  • Created 4 months ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
JamesNKcommented, Jun 1, 2023

Thank you for creating a PR.

I need to test this thoroughly and write unit tests. I’m sure it works for calls that successfully read to the end of the request. This is what you probably tested. But I want to verify calls are correctly ended for failure conditions. Does it still work if the gRPC call ends because of cancellation? Or deadline. Or server abort. Or someone doesn’t read from the stream, and it times out. And so on.

0reactions
JamesNKcommented, Jun 15, 2023

I don’t believe this is possible without changes to HttpClient.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Understanding Call Tracker Outputs
This document describes Call Tracker outputs. Call Tracker is a subsystem used to capture detailed data on the progress and status of calls,...
Read more >
CallTrackingMetrics: Marketing Analytics & Attribution Solution
Track and attribute all online and offline leads, across multiple platforms and get the comprehensive data you need to make marketing decisions confidently....
Read more >
Track calls from ads - Google Ads Help
Track calls from ads. Use conversion tracking to help you understand how effectively your call ads and ads with call or location assets...
Read more >
ServiceCall.ai | Service Fusion's AI Call Tracker
Our call tracker, ServiceCall.AI, is the most powerful phone system for HVAC, plumbing, electrical, appliance repair, and other field service contractors.
Read more >
Manage video during calls - An Azure Communication ...
Use Azure Communication Services SDKs to manage video calls. ... Currently only one outgoing local video stream is supported.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found