Ryan O'Neill

@ryanoneill

Posted June 24, 2020

June 2020 Release Notes - Version 20.6.0

Summer is happening 🏖️, and with that comes the June release of Finagle, Finatra, Scrooge, Twitter Server, and Util 😎.

Finagle

Runtime Behavior Changes

  • finagle-core: FailFastFactory is now disabled at runtime when a client’s destination has only one endpoint, since the client cannot do anything meaningful by breaking the circuit early. This is recommended as a best practice anyway, now it’s the default behavior. Less things to configure and worry about! f2c100e8
  • finagle-core: namer annotations are prefixed with “clnt/”. c8680fff
  • finagle-core: namer.success & namer.failure are not annotated as they are not request based. namer.tree annotation was also removed to reduce the size of traces. c8680fff
  • finagle-core: The offload filter client annotation is annotated under the child request span instead of its parent. The offload filter annotations are also changed to be binary annotations with the key (clnt|srv)/finagle.offload_pool_size and the value being the pool size 011f096d
  • finagle-memcached: The key in RetrievalCommand are ommited in traces. The total number of Hits and Misses are annotated via a counter instead under clnt/memcached.(hits/misses) 6fd0e2c9

Breaking API Changes

  • finagle-core: Migrated List[Tracer] to Seq[Tracer] in Tracing, and tracersCtx. cb06890b
  • finagle-core: PayloadSizeFilter and WireTracingFilter are now public APIs. fc1951a5
  • finagle-zipkin-core: initialSampleRate flag will now fail if the sample rate is not in the range [0.0, 1.0]. 180f333c
  • finagle-mysql: mysql client annos are prefixed with clnt/ 37d55c2a

New Features

  • finagle-thrift: Expose c.t.f.thrift.exp.partitioning.PartitioningStrategy, the bundled PartitioningStrategy APIs are public for experiments. bf1d47be
  • finagle-http: Add LoadBalancedHostFilter to allow setting host header after LoadBalancer 5304ce69
  • finagle-core: Trace the request’s protocol identified by the ProtocolLibrary of the client stack. This is annotated under clnt/finagle.protocol. 464bbeb6
  • finagle-core: Add letTracers to allow setting multiple tracers onto the tracer stack. cb06890b
  • finagle-core: DeadlineFilter now exposes a metric admission_control/deadline/remaining_ms which tracks the remaining time in non-expired deadlines on the server side. An increase in this stat, assuming request latency is constant and timeout configurations upstream have not changed, may indicate that upstream services have become slower. 939f9a3e
  • finagle-redis: Make partitionedClient accessible. 7ba107e1
  • finagle-core, finagle-http, finagle-thriftmux: introduce MethodBuilder maxRetries configuration. A ThriftMux or HTTP method can now be configured to allow a specific number of maximum retries per request, where the retries are gated by the configured RetryBudget. This configuration can be applied via Http.client.methodBuilder(name).withMaxRetries(n) or ThriftMux.client.methodBuilder(name).withMaxRetries(n). 4328896d
  • finagle-memcached: Annotate the shard id of the backend the request will reach. 6fd0e2c9

Bug Fixes

  • finagle-zipkin-core: Remove flush and late-arrival annotations, which artificially extend trace durations. 967ef1fc
  • finagle-core: namer annotations are added at the Service level instead of ServiceFactory as traces are intended to be request based c8680fff

Finatra

Added

  • inject-app: You can now inject Flag values of any type (not just primitive types). Most of the common Flag types are already supported out of the box (e.g., Seq[InetSocketAddress]), but it’s also possible to register your own converters derived from any Flaggable instance. 92a47062
  • inject-stack: Move StackTransformer from inject/inject-core to inject/inject-stack to remove the finagle-core dependency from inject/inject-core. 554e367e
  • inject-server: adding httpPostAdmin test method. 067b45cf

Changed

  • thrift/http: Introduce a Common Log Format type of formatting for Thrift access logging to replace the current prelog text. Ensure the HTTP and Thrift access logging filters are aligned in functionality and behavior. f7108618
  • inject-slf4j: Remove Jackson dependency. Case classes which wish to use the slf4j Logging functionality should use the finatra/jackson c.t.finatra.jackson.caseclass.SerdeLogging trait which provides a @JsonIgnoreProperties to ignore logging fields. 70111cd8

Util

New Features

  • util-stats: Add two new Java-friendly methods to StatsReceiver (addGauge and provideGauge) that take java.util.function.Supplier as well as list vararg argument last to enable better developers’ experience. 77c76e41
  • util-app: Add a Flaggable instance for java.time.LocalTime. 19f13a07
  • util-app: Add two new methods to retrieve flag’s unparsed value (as string): Flag.getUnparsed and Flag.getWithDefaultUnparsed. 4ef3c9b9

Twitter Server

Scrooge