Skip to content

Commit

Permalink
refactor(swift): Use BatchSpanProcessor instead of SimpleSpanProcessor (
Browse files Browse the repository at this point in the history
#11)

## Which problem is this PR solving?
Use `BatchSpanProcessor` instead of `SimpleSpanProcessor` since it is
the recommended span processor to use in production apps.

Leaving this in draft to start because this might affect smoke tests
since it might take a few seconds for the spans to batch send with this
change so we might need to add in a wait mechanism.

## Short description of the changes
- Use `BatchSpanProcessor` from OTel as the default span processor to
send spans.

## How to verify that this has the expected result
- Smoke tests still pass
  • Loading branch information
pkanal authored Sep 26, 2024
1 parent bda87b4 commit dbcf439
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Sources/Honeycomb/Honeycomb.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import StdoutExporter
//
// * DeterministicSampler.
// * BaggageSpanProcessor.
// * BatchSpanProcessor.
// * LoggingMetricExporter.
// * Debug logging.

Expand Down Expand Up @@ -95,7 +94,7 @@ public class Honeycomb {
} else {
traceExporter
}
let spanProcessor = SimpleSpanProcessor(spanExporter: spanExporter)
let spanProcessor = BatchSpanProcessor(spanExporter: spanExporter)

let tracerProvider = TracerProviderBuilder()
.add(spanProcessor: spanProcessor)
Expand Down

0 comments on commit dbcf439

Please sign in to comment.