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

I could not find the extension method "EnableCallContextPropagation" . #33049

Closed
yerald231ger opened this issue Jul 11, 2024 · 3 comments
Closed
Assignees
Labels
aspnet-core/svc grpc/subsvc gRPC seQUESTered Identifies that an issue has been imported into Quest. Source - Docs.ms Docs Customer feedback via GitHub Issue

Comments

@yerald231ger
Copy link

yerald231ger commented Jul 11, 2024

Description

image

[Enter feedback here]

Page URL

https://learn.microsoft.com/en-us/aspnet/core/grpc/clientfactory?view=aspnetcore-8.0

Content source URL

https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/grpc/clientfactory.md

Document ID

caebee8f-f4aa-17a4-3681-d10c4695e9c0

Article author

@JamesNK


Associated WorkItem - 284706

@wadepickett
Copy link
Contributor

@yerald231ger, thanks for relating your experience with the topic.

You do have the right NuGet package and the latest version of it. EnableCallContextPropagation() would be available. However there must be a context here under which it would not be, and I am not spotting it.

This would seem fine, adding a gRPC client for SationConsole.SationConsoleClient with the server address set to http://localhost:5050. Then, it’s attempting to enable call context propagation for that client:

services.AddGrpcClient<SationConsole.SationConsoleClient>("GaxVol.Client", options =>
{
    options.Address = new Uri("http://localhost:5050");
}).EnableCallContextPropagation();

Assuming the namespace is made available:
using Grpc.AspNetCore.Server.ClientFactory;

Given it is likely very specific to the context of your specific app/code, I recommend posting to a community support group like Stack Overflow with the asp.net-core tag. There is also a grpc-dotnet tag.
grpchttps://stackoverflow.com/questions/tagged/grpc-dotnet.
Stack Overflow
ASP.NET Core Slack
ASP.NET Gitter
Potential bugs in the ASP.NET Core framework and product feedback can be reported at dotnet/aspnetcore issues (include full repro steps and cross-link to a repro project in GH when appropriate).

@JamesNK, in case there is an opportunity for content improvement that would be related to this example.

@JamesNK
Copy link
Member

JamesNK commented Jul 12, 2024

The docs already say which package is required here: https://learn.microsoft.com/en-us/aspnet/core/grpc/clientfactory?view=aspnetcore-8.0

I don't think there is anything to improve.

@yerald231ger
Copy link
Author

yerald231ger commented Jul 12, 2024 via email

@wadepickett wadepickett added the reQUEST Triggers an issue to be imported into Quest label Jul 12, 2024
@sequestor sequestor bot added seQUESTered Identifies that an issue has been imported into Quest. and removed reQUEST Triggers an issue to be imported into Quest labels Jul 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aspnet-core/svc grpc/subsvc gRPC seQUESTered Identifies that an issue has been imported into Quest. Source - Docs.ms Docs Customer feedback via GitHub Issue
4 participants