diff --git a/examples/Console/TestGrpcNetClient.cs b/examples/Console/TestGrpcNetClient.cs index a4fc9167df0..ade965950c8 100644 --- a/examples/Console/TestGrpcNetClient.cs +++ b/examples/Console/TestGrpcNetClient.cs @@ -27,6 +27,20 @@ internal class TestGrpcNetClient { 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 @@ internal static object Run() } } + System.Console.WriteLine("Press Enter key to exit."); + return null; } } diff --git a/examples/GrpcService/Program.cs b/examples/GrpcService/Program.cs index 2016a454555..5207d243c33 100644 --- a/examples/GrpcService/Program.cs +++ b/examples/GrpcService/Program.cs @@ -33,6 +33,7 @@ public static IHostBuilder CreateHostBuilder(string[] args) => .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup(); + webBuilder.UseUrls("https://localhost:44335"); }); } }