diff --git a/examples/react-load/react/src/web-tracer.js b/examples/react-load/react/src/web-tracer.js index 984374bfbe..9a09d6dfad 100644 --- a/examples/react-load/react/src/web-tracer.js +++ b/examples/react-load/react/src/web-tracer.js @@ -3,6 +3,7 @@ import { WebTracerProvider } from '@opentelemetry/sdk-trace-web'; import { BaseOpenTelemetryComponent } from '@opentelemetry/plugin-react-load'; import { ZoneContextManager } from '@opentelemetry/context-zone'; import { CollectorTraceExporter } from '@opentelemetry/exporter-collector'; +import { diag, DiagConsoleLogger } from '@opentelemetry/api'; export default (serviceName) => { const provider = new WebTracerProvider(); @@ -21,7 +22,7 @@ export default (serviceName) => { const tracer = provider.getTracer(serviceName); BaseOpenTelemetryComponent.setTracer(serviceName) - BaseOpenTelemetryComponent.setLogger(provider.logger) + diag.setLogger(new DiagConsoleLogger()); return tracer; }