Skip to content

armeria-0.64.0

Choose a tag to compare

@trustin trustin released this 21 May 06:53
bfedfb2

New features

  • An annotated service can now inject multiple HTTP headers into List<String>, Set<String> or Iterable<String>. #1164

    public class MyAnnotatedService {
        // The values of 'x-delete-options` are injected into 'xDeleteOptions'.
        @Delete("/users/:userId")
        public void deleteUser(@Param String userId, @Header List<String> xDeleteOptions) {
            ...
        }
    }
  • Added PrometheusRegistries.defaultRegistry #1171 #1181

    // Before
    PrometheusMeterRegistry r = PrometheusRegistries.newRegistry(CollectorRegistry.defaultRegistry);
    // After
    PrometheusMeterRegistry r = PrometheusRegistries.defaultRegistry;
  • Made the Timers and DistributionSummarys created by Armeria customizable. #1170 #1176

    MoreMeters.setDistributionStatisticConfig(
            DistributionStatisticConfig.builder()
                                       .percentiles(/* custom percentiles */)
                                       .expiry(/* custom expiry */)
                                       .build());
  • MeterIdPrefixFunction.ofDeault() now adds the status tag to meter IDs. #1172

  • Added the setters for ExceptionHandlerFunction, RequestConverterFunction and ResponseConverterFunction to AnnotatedServiceRegistrationBean. #1141 #1173

  • Added more decorator setters to all *ServiceRegistrationBeans. #1080 #1174

  • Added the access log format tokens for logging the properties of RequestLog. #1195

  • You can now customize the timestamp format in access log. #1195

  • You can now customize how CircuitBreakerClient determines whether a request was successful or not. #1192

  • Added a new service type called TransientService, the requests handled by it is not taken into account during graceful shutdown. #1196

  • Added a new unsafe gRPC client option GrpcClientOptions.UNSAFE_WRAP_RESPONSE_BUFFERS. #1204

  • Added a new module armeria-rxjava which provides a plugin for RxJava 2. By enabling this plugin, your RxJava functions will always be invoked with thread-local RequestContext set. #1194

    RequestContextAssembly.enable();
  • Added a new module armeria-tomcat8.5 for Tomcat 8.5 users. #1212

  • Added more convenience methods to HttpData. #1188 #1214

    • HttpData.toInputStream()
    • HttpData.toReader()
    • HttpData.toReaderUtf8()
    • HttpData.toReaderAscii()

Improvements

  • Reduced unnecessary CompositeByteBuf allocation in gRPC. #1167
  • CorsService is now compatible with Internet Explorer. #1186

Bug fixes

  • Fixed NullPointerException when an annotated service method returns void. #1165 #1166
  • Fixed NoClassDefFoundError in armeria-spring-boot* when armeria-thrift is not added to the dependencies. #650 #1182
  • The percentile and histogram gauges ('.percentile' and '.histogram'), implicitly exported by Micrometer default settings, have been blacklisted for DropwizardMeterRegistry, because the monitoring systems based on Dropwizard Metrics would prefer using the distribution stats provided by Dropwizard Histogram and Timer. #1190
  • The requests handled by HealthCheckService do not hinder timely graceful shutdown anymore. #1196
  • Fixed HTTP version autodetection issues with some HTTP/1 only servers. #1201 #1210

Deprecations

  • MoreMeters.summaryWithDefaultQuantiles() and timerWithDefaultQuantiles() have been deprecated. Use MoreMeters.newDistributionSummary() and newTimer(). #1176
  • *ServiceRegistrationBean.setDecorator() has been deprecated. Use setDecorators(). #1174

Breaking changes

  • The function returned by MeterIdPrefixFunction.ofDefault() now adds the status tag. Adjust your metric collection and monitoring system accordingly. #1172
  • CircuitBreakerClient is now an abstract class. Use CircuitBreakerHttpClient or CircuitBreakerRpcClient. #1192
  • CircuitBreakerBasedThrottlingStrategy has been removed without an alternative. See #1209 for rationale.

Dependencies

  • Brave 4.19.1 -> 4.19.2
  • gRPC 1.11.0 -> 1.12.0
  • Guava 24.1 -> 25.0
  • Jetty 9.4.9 -> 9.4.10
  • Micrometer 1.0.3 -> 1.0.4
  • Netty 4.1.24 -> 4.1.25
  • Prometheus 0.3.0 -> 0.4.0
  • Spring Boot 2.0.1 -> 2.0.2, 1.5.12 -> 1.5.13
  • Tomcat 9.0.7 -> 9.0.8, 8.5.30 -> 8.5.31, 8.0.51 -> 8.0.52
  • Zipkin 2.7.1 -> 2.8.3
  • ZooKeeper 3.4.11 -> 3.4.12

Known issues

  • We will rename the status tag added by the function returned by MeterIdPreficFunction.ofDefault()to httpStatus in our next release.