Better instructions for running gRPC examples (#1526)
Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
This commit is contained in:
parent
48ea77fd1b
commit
6c2c19a2d8
|
|
@ -27,6 +27,20 @@ namespace Examples.Console
|
|||
{
|
||||
internal static object Run()
|
||||
{
|
||||
// Prerequisite for running this example.
|
||||
// In a separate console window, start the example
|
||||
// ASP.NET Core gRPC service by running the following command
|
||||
// from the reporoot\examples\GrpcService\.
|
||||
// (eg: C:\repos\opentelemetry-dotnet\examples\GrpcService\)
|
||||
//
|
||||
// dotnet run
|
||||
|
||||
// To run this example, run the following command from
|
||||
// the reporoot\examples\Console\.
|
||||
// (eg: C:\repos\opentelemetry-dotnet\examples\Console\)
|
||||
//
|
||||
// dotnet run grpc
|
||||
|
||||
using var openTelemetry = Sdk.CreateTracerProviderBuilder()
|
||||
.AddGrpcClientInstrumentation()
|
||||
.AddSource("grpc-net-client-test")
|
||||
|
|
@ -51,6 +65,8 @@ namespace Examples.Console
|
|||
}
|
||||
}
|
||||
|
||||
System.Console.WriteLine("Press Enter key to exit.");
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ namespace Examples.GrpcService
|
|||
.ConfigureWebHostDefaults(webBuilder =>
|
||||
{
|
||||
webBuilder.UseStartup<Startup>();
|
||||
webBuilder.UseUrls("https://localhost:44335");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue