Skip to content

Commit

Permalink
Changed web tracer to use batch processor (open-telemetry#819)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinkuba authored Mar 31, 2023
1 parent bd74376 commit 49f116d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions src/frontend/utils/telemetry/FrontendTracer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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',
})
Expand Down

0 comments on commit 49f116d

Please sign in to comment.