Skip to content

brave v3.4.0

Compare
Choose a tag to compare
@kristofa kristofa released this 10 Jan 13:22
· 1409 commits to master since this release

Release notes

  • #118 and #121 : Replace TraceFilter with Sampler. The TraceFilter implementation in version <= 3.3.0 works on span id instead of trace id and had different semantics than the samplers used in other implementations. This is changed now and we rely on a default Sampler implementation which is properly tested and benchmarked.
  • #119 : Removes SpanCollector.close
  • #119 : Deprecate SpanCollector.addDefaultAnnotation
  • #120 : Http SpanCollector support.

Migration instructions

  • TraceFilter becomes Sampler:
    • If you don't configure FixedSampleRateTraceFilter today you don't need to change anything. Every request will be traced like before.
    • If you configure FixedSampleRateTraceFilter today to adapt default sample rate your code won't break but your sample ratio will be ignored. Instead you will have to configure Sampler with your sample rate which is a percentage now. For example Sampler.create(0.1f) will sample 10% of requests.
    • If using ZooKeeper you'll need to change your maven dependencies to include brave-sampler-zookeeper module and change to the ZookeeperSampler + re-assign your rate in ZK to a percentage instead of a ratio.
  • Remove of SpanCollector.close: Implementing classes can decide the appropriate way to close a SpanCollector if needed. We don't enforce the Closeable in the interface anymore but you can still add it to you implementation.
  • Deprecation of SpanCollector.addDefaultAnnotation: SpanCollector.addDefaultAnnotation was originally added and used to add a default annotation to every span that indicates the environment (eg staging, testing, production) from which the trace originated. However adding addDefaultAnnotation makes the SpanCollector mutable and harder to implement. Going forward similar functionality can be implemented by decorating your SpanCollector with one that adds the default annotations.
  • Http SpanCollector: The HttpSpanCollector lives in brave-core so you don't need an extra dependency. Can be used to send spans over http to zipkin-java-server. Can be used instead of the Scribe or Kafka SpanCollector.