The primary change is to fix a memory leak reported in
Netflix/spectator#264. Each time a gauge was updated it
was creating a new registration and because the map holds
a strong reference these would never get collected.
Further, the aggregate value created by the multiple
registrations was not correct.
In addition I added some test cases around the various
inputs and checked that the results were reflected as
expected in the registry. I noticed the timer values
had a unit of milliseconds, but it isn't immediately
clear if the reported value can ever less than 1.0. The
conversion to long is now delayed until after converting
to nanoseconds so duration values less than 1.0 will now
work instead of just recording 0.
For the histogram I changed to just using a cast to `long`
to avoid boxing to a `Double`. As an FYI for the future,
there is a DoubleDistributionSummary we have experimented
with in spectator-ext-sandbox that might be more appropriate
for this use-case.
The Apcahe client does not allow empty body for PATCH, nor does it
allow a request to be pre-populated with a Content-Length. Spring
Cloud tests were trying to do the former, and Feign allows the latter.
Apparently we already support eureka.datacenter as an alias for
archaius.deployment.datacenter and it looks like when that code
was written we intended to support eureka.environment in a similar way.
But it was never finished off, so this change adds the necessary one
line of code.
Fixes gh-791
Otherwise apps register the wrong health and status URLs by default. If
there is no explicit management.port we just need a default that is
the same as server.port.
A change in Zuul in NetflixOSS means that it buffers all requests unless
you switch it off at the level of the servlet. And even when you do that
you need to ensure that Spring Cloud doesn't re-introduce a buffer through
the Servlet30RequestWrapper.
This change restores the feature in Spring Cloud Angel that multipart files
posted to /zuul/* go straight through the servlet and are not buffered in
memory.
Fixes gh-773
More often than not what Route.path was used it had to be concatenated
with the prefix. This change just encapsulates that concern in the
Route itself.
The RouteLocator interface wasn't very useful to anyone in its
1.0.x form. If ProxyRouteLocator features are consolidated into
the RouteLocator interface then users can supply their own
strategies more easily.
Also added RefreshableRouteLocator for implementations that need
to recompute routes when something changes. SimpleRouteLocator
doesn't need to do that because all the routes are in the configuration.
Added spring-cloud-starter-archaius so downstream projects
like consul and zookeeper don't need to maintain the list of
archaius depenencies.
fixes gh-765
The new module is a BOM that doesn't have any parent or direct
dependency management in spring-boot-*. So users can include it
in their dependency management without polluting the spring boot
dependency versions.
Luckily it can also be used in the main spring-cloud-netflix pom,
which should no longer be used as a BOM.