Skip to content

Commit

Permalink
Fix OpenTracing.Shim example
Browse files Browse the repository at this point in the history
  • Loading branch information
Kielek committed Aug 30, 2023
1 parent 2ae8e1a commit f3bc6a2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/Console/TestOpenTracingShim.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@ internal class TestOpenTracingShim
{
internal static object Run(OpenTracingShimOptions options)
{
// Enable OpenTelemetry for the source "MyCompany.MyProduct.MyWebServer"
// Enable OpenTelemetry for the source "opentracing-shim"
// and use Console exporter.
using var tracerProvider = Sdk.CreateTracerProviderBuilder()
.AddSource("MyCompany.MyProduct.MyWebServer")
.AddSource("opentracing-shim")
.ConfigureResource(r => r.AddService("MyServiceName"))
.AddConsoleExporter()
.Build();

// Instantiate the OpenTracing shim. The underlying OpenTelemetry tracer will create
// spans using the "MyCompany.MyProduct.MyWebServer" source.
// spans using the "opentracing-shim" source.
var openTracingTracerShim = new TracerShim(
TracerProvider.Default.GetTracer("MyCompany.MyProduct.MyWebServer"),
TracerProvider.Default,
Propagators.DefaultTextMapPropagator);

// The OpenTracing Tracer shim instance must be registered prior to any calls
Expand Down

0 comments on commit f3bc6a2

Please sign in to comment.