armeria-0.64.0
New features
-
An annotated service can now inject multiple HTTP headers into
List<String>,Set<String>orIterable<String>. #1164public 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 andDistributionSummarys created by Armeria customizable. #1170 #1176MoreMeters.setDistributionStatisticConfig( DistributionStatisticConfig.builder() .percentiles(/* custom percentiles */) .expiry(/* custom expiry */) .build());
-
MeterIdPrefixFunction.ofDeault()now adds thestatustag to meter IDs. #1172 -
Added the setters for
ExceptionHandlerFunction,RequestConverterFunctionandResponseConverterFunctiontoAnnotatedServiceRegistrationBean. #1141 #1173 -
Added more decorator setters to all
*ServiceRegistrationBeans. #1080 #1174 -
Added the access log format tokens for logging the properties of
RequestLog. #1195- See Retrieving values from RequestLog for more information.
-
You can now customize the timestamp format in access log. #1195
- See Customizing timestamp format for more information.
-
You can now customize how
CircuitBreakerClientdetermines whether a request was successful or not. #1192- See CircuitBreakerStrategy for more information.
-
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-rxjavawhich provides a plugin for RxJava 2. By enabling this plugin, your RxJava functions will always be invoked with thread-localRequestContextset. #1194RequestContextAssembly.enable();
-
Added a new module
armeria-tomcat8.5for Tomcat 8.5 users. #1212 -
Added more convenience methods to
HttpData. #1188 #1214HttpData.toInputStream()HttpData.toReader()HttpData.toReaderUtf8()HttpData.toReaderAscii()
Improvements
- Reduced unnecessary
CompositeByteBufallocation in gRPC. #1167 CorsServiceis now compatible with Internet Explorer. #1186
Bug fixes
- Fixed
NullPointerExceptionwhen an annotated service method returnsvoid. #1165 #1166 - Fixed
NoClassDefFoundErrorinarmeria-spring-boot*whenarmeria-thriftis 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 DropwizardHistogramandTimer. #1190 - The requests handled by
HealthCheckServicedo not hinder timely graceful shutdown anymore. #1196 - Fixed HTTP version autodetection issues with some HTTP/1 only servers. #1201 #1210
Deprecations
MoreMeters.summaryWithDefaultQuantiles()andtimerWithDefaultQuantiles()have been deprecated. UseMoreMeters.newDistributionSummary()andnewTimer(). #1176*ServiceRegistrationBean.setDecorator()has been deprecated. UsesetDecorators(). #1174
Breaking changes
- The function returned by
MeterIdPrefixFunction.ofDefault()now adds thestatustag. Adjust your metric collection and monitoring system accordingly. #1172 CircuitBreakerClientis now an abstract class. UseCircuitBreakerHttpClientorCircuitBreakerRpcClient. #1192CircuitBreakerBasedThrottlingStrategyhas 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
statustag added by the function returned byMeterIdPreficFunction.ofDefault()tohttpStatusin our next release.