File tree Expand file tree Collapse file tree
dd-trace-core/src/main/java/datadog/trace/common/writer Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ public void addTrace(List<? extends CoreSpan<?>> trace) {
6868 // there are alternative approaches to avoid blocking here, such as
6969 // introducing an unbound queue and another thread to do the IO
7070 // however, we can't block the application threads from here.
71- if (null == mapper || null == packer || !packer .format (trace , mapper )) {
71+ if (null == mapper || !packer .format (trace , mapper )) {
7272 healthMetrics .onFailedPublish (
7373 trace .isEmpty () ? 0 : trace .get (0 ).samplingPriority (), trace .size ());
7474 }
@@ -79,14 +79,13 @@ private void selectMapper() {
7979 if (mapperDiscovery .getMapper () == null ) {
8080 mapperDiscovery .discover ();
8181 }
82-
8382 mapper = mapperDiscovery .getMapper ();
84- if ( null != mapper && null == packer ) {
85- batchTimer =
86- monitoring . newTimer ( "tracer.trace.buffer.fill.time" , "endpoint:" + mapper . endpoint ());
87- packer = new MsgPackWriter ( new FlushingBuffer ( mapper .messageBufferSize (), this ));
88- batchTimer . start ( );
89- }
83+ }
84+ if ( null == packer && null != mapper ) {
85+ batchTimer =
86+ monitoring . newTimer ( "tracer.trace.buffer.fill.time" , "endpoint:" + mapper .endpoint ( ));
87+ packer = new MsgPackWriter ( new FlushingBuffer ( mapper . messageBufferSize (), this ) );
88+ batchTimer . start ();
9089 }
9190 }
9291
You can’t perform that action at this time.
0 commit comments