0.98.3 release notes

25th February 2020

🌟 New features

  • RequestContextExporter and RequestContextExportingAppender for Logback can now export the current request ID into MDC. #2511
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
      <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
          <pattern>%d{HH:mm:ss.SSS} %X{req.id} %msg%n</pattern>
        </encoder>
      </appender>
      <appender name="RCEA" class="com.linecorp.armeria.common.logback.RequestContextExportingAppender">
        <appender-ref ref="CONSOLE" />
        <export>req.id</export>
      </appender>
    </configuration>
  • Client-side options API (ClientOption and ClientFactoryOption) has been revamped. #2523
    • ClientOptions.get() and ClientFactoryOptions.get() never throw an exception. A default value is returned for an unspecified option. Therefore, other getter methods such as getOrElse() have been removed.

📈 Improvements

  • You'll now get a ClosedStreamException instead of Http2Exception when your HTTP/2 connection was closed due to an RST_STREAM frame. #2508

🛠️ Bug fixes

  • *ClientBuilder.options(ClientOptions) now overrides only the specified options. #2516
    ClientFactory factory = ClientFactory.insecure();
    ClientOptions options = ClientOptions.builder()
                                         .responseTimeMillis(5000)
                                         .build();
    WebClient client = WebClient.builder("http://foo.com")
                                .factory(factory)
                                .options(options)
                                .build();
    // This assertion does not fail anymore.
    assert client.options().factory() == ClientFactory.insecure();
  • Fixed a bug where DocService throws the java.lang.IllegalStateException: zip file closed exception while starting up. #2518 #2519
  • MetricCollectingClient does not count the request that failed initially due to a connection refused error and then succeeded after a retry as failure anymore. #2517
  • Fixed a bug where LoggingClient and LoggingSerivce does not push the current context when logging. #2528
  • RequestContextExporter and RequestContextExportingAppender can now export a single custom attribute into multiple MDC properties. #2521
  • RequestContextExporter and RequestContextExportingAppender does not export outdated custom attributes anymore. #2520
  • Renamed incorrect meter ID armeria.server.pendingResponses into armeria.server.pending.responses. #2506
  • The Date header is now encoded properly even when System.nanoTime() returns a negative value. #2530
  • GrpcStatus.fromThrowable() now treats ContentTooLargeException as RESOURCE_EXHAUSTED rather than INTERNAL_ERROR. #2523

☢️ Breaking changes

  • ClientOptions.getOrElse() and getOrNull() have been removed. get() always returns a non-null value now. #2523
  • ClientOptions.asMap() and ClientFactoryOptions.asMap() now return only the options overridden by a user. You can get the Set of available options using ClientOptions.allOptions() or ClientFactoryOptions.allOptions(): #2516 #2523
    ClientOptions myOptions = ...;
    Map<ClientOption<?>, Object> map = new IdentityHashMap<>();
    for (ClientOption o : ClientOptions.allOptions()) {
        map.put(myOptions.get(o));
    }
  • ClientOptions.valueOf() and ClientFactoryOptions.valueOf() have been split into two methods: define() and of() #2523.
    • Use of() if you're getting an existing option.
    • Use define() if you're defining a new option.
  • You might need to adjust your monitoring system if you were watching armeria.server.pendingResponses, which has been renamed to armeria.server.pending.responses in this release. #2506

⛓ Dependencies

  • Dropwizard 1.3.18 → 1.3.19
  • Dropwizard Metrics 4.1.2 → 4.1.3
  • java-jwt 3.9.0 → 3.10.0
  • RxJava 2.2.17 → 2.2.18
  • Shaded dependencies
    • Reflections 0.9.12 → 0.9.11 (Downgrade)

🙇 Thank you