diff --git a/CHANGELOG.md b/CHANGELOG.md index d36c3bbefe..cdfc137440 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,8 @@ release. ([#814](https://github.com/open-telemetry/opentelemetry-demo/pull/814)) * Reduce Kafka mem allocation ([#798](https://github.com/open-telemetry/opentelemetry-demo/pull/798)) +* Updated frontend web tracer to us batch processor + ([#819](https://github.com/open-telemetry/opentelemetry-demo/pull/819)) ## v0.1.0 diff --git a/src/frontend/utils/telemetry/FrontendTracer.ts b/src/frontend/utils/telemetry/FrontendTracer.ts index 06952ffe1b..797a67cb1e 100644 --- a/src/frontend/utils/telemetry/FrontendTracer.ts +++ b/src/frontend/utils/telemetry/FrontendTracer.ts @@ -14,7 +14,7 @@ import { CompositePropagator, W3CBaggagePropagator, W3CTraceContextPropagator } from '@opentelemetry/core'; import { WebTracerProvider } from '@opentelemetry/sdk-trace-web'; -import { SimpleSpanProcessor } from '@opentelemetry/sdk-trace-base'; +import { BatchSpanProcessor } from '@opentelemetry/sdk-trace-base'; import { registerInstrumentations } from '@opentelemetry/instrumentation'; import { getWebAutoInstrumentations } from '@opentelemetry/auto-instrumentations-web'; import { Resource, detectResources, browserDetector } from '@opentelemetry/resources'; @@ -41,7 +41,7 @@ const FrontendTracer = async (collectorString: string) => { provider.addSpanProcessor(new SessionIdProcessor()); provider.addSpanProcessor( - new SimpleSpanProcessor( + new BatchSpanProcessor( new OTLPTraceExporter({ url: NEXT_PUBLIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT || collectorString || 'http://localhost:4318/v1/traces', })