diff --git a/example/opencensus/main.go b/example/opencensus/main.go index 60493db6deb3..4d1d1d04beb1 100644 --- a/example/opencensus/main.go +++ b/example/opencensus/main.go @@ -87,7 +87,7 @@ func tracing(otExporter sdktrace.SpanExporter) { tp.ForceFlush(ctx) log.Println("Creating OpenTelemetry span\n-- It should have the OpenCensus span as a parent, since the OpenCensus span was written with using OpenTelemetry APIs.") - ctx, otspan := tracer.Start(ctx, "OpenTelemetrySpan") + ctx, otspan := tp.Tracer("simple").Start(ctx, "OpenTelemetrySpan") otspan.End() tp.ForceFlush(ctx)