Upgrade to Zipkin Reporter 3.4.0 #40343
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm only raising this manually for documentation:
Spring currently configures the Brave
AsyncSpanHandler
with default settings. These defaults included 3 thresholds to flush a backlog, whichever comes first.The estimated size in bytes threshold (
queuedMaxBytes=1pct memory
) has been disabled by default and deprecated, due to appearing pinned when virtual threads are in use (-Djdk.tracePinnedThreads
). This is effectively no impact due to the other two flush thresholds (queuedMaxSpans=10000
,messageTimeout=1s
), most importantly that in the default case (such as spring-boot not setting anything), you are much more likely to hit 1s timeout prior to 1pct of memory of 10k spans.See https://github.com/openzipkin/zipkin-reporter-java/releases/tag/3.4.0 for more
Trivia time
OpenTelemetry's defaults are also in use in
BatchSpanProcessorBuilder
. There is noqueuedMaxBytes
analogue in their setup (in hindsight a good thing probably).maxQueueSize=2048
vs zipkin-reporterqueuedMaxSpans=10000
scheduleDelay=5s
vs zipkin-reportermessageTimeout=1s
My unsolicited 2p is that the
maxQueueSize=2048
while arbitrary is better than thequeuedMaxSpans=10000
in zipkin-reporter.. I thought it was 10 year old from original brave, but that was 500 🤷. I raised this issue as 2048 is good, even if maybe smaller could be better.scheduleDelay=5s
might not be a great default though. I do remember changing zipkin-reporter tomessageTimeout=1s
, as beginning devs are impatient and wondered what was wrong prior to 5s :p