Skip to content

Java Distribution Summaries

Distribution Summaries are created using the Registry, which will be setup as part of application initialization. For example:

```java public class Server {

private final DistributionSummary requestSize;

@Inject public Server(Registry registry) { requestSize = registry.distributionSummary("server.requestSize"); } ```

Then call record when an event occurs:

java public Response handle(Request request) { requestSize.record(request.sizeInBytes()); } } Note: If the amount recorded is less than 0 the value will be dropped.