Better instructions for running gRPC examples (#1526)

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
This commit is contained in:
Alan West 2020-11-12 16:35:32 -08:00 committed by GitHub
parent 48ea77fd1b
commit 6c2c19a2d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 0 deletions

View File

@ -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;
}
}

View File

@ -33,6 +33,7 @@ namespace Examples.GrpcService
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
webBuilder.UseUrls("https://localhost:44335");
});
}
}