Commit graph

78 commits

Author SHA1 Message Date
Ruth Linehan
df4e36a1aa (TK-316) Add metrics support
This commit adds metrics support to the http client (clojure and java, sync
and async). A metric registry can optionally be passed into the client as a
client option on creation. If a metric registry is present, timers will be
added to time each request.

By default, a timer is added for the URL (stripped of username, password,
query string, and path fragments) and the URL plus the method used for the
request. In addition, a request can include a `metric-id` option, which takes
a tuple of metric ids. If this request option is specified, a timer will be
created for each element of the metric id tuple - thus if the tuple is [:foo
:bar :baz] there will be a foo timer, a foo.bar timer, and a foo.bar.baz
timer.

In addition, each timer has a "MetricType" - currently there is only one
metric type, bytes-read, which is stopped when the full response has been
read. In the future, we may add "response-init" timers that get stopped when
the first byte of the response has been read.

This commit also adds a `get-client-metrics`/`.getClientMetrics` function that
takes a client instance and returns the http client-specific metrics from the
metric registry and a `get-client-metrics-data`/`.getClientMetricsData`
function for clojure and java sync and async clients to get out metrics data
from the client. This function takes a client instance and returns a map of
metric name to a map of metric data (for clojure) or a ClientMetricData object
(for java), both of which include the mean, count, and aggregate for the timer

These `get-client-metrics*`/`.getClientMetrics*` functions also have versions
that take a url, url and method, or metric id to allow for filtering of the
timers/metrics data returned by these functions.

The clojure versions of these functions take a metric filter map. There are
also metric filter builder functions to build up the type of metric filter
desired from a url, a url and method, or a metric id. These will prevent users
from having to know the specifics of how to build a metric themselves; instead
they can use a convenience function.

An empty metric id can be passed in to the filter to return all metric-id
timers.
2016-04-19 13:13:10 -07:00
Jenkins CI
5a9d80d90e Version 0.5.1-SNAPSHOT 2016-02-02 15:42:30 -08:00
Jenkins CI
c3ac698398 Version 0.5.0 2016-02-02 15:42:25 -08:00
Alex Dreyer
6e11d2074f (maint) update changelog for 0.4.7 release. 2016-02-02 15:23:23 -08:00
Jenkins CI
e431b5036f Version 0.4.7-SNAPSHOT 2016-01-09 16:42:34 -08:00
Jenkins CI
2b7af91c24 Version 0.4.6 2016-01-09 16:42:27 -08:00
Chris Price
e7c9d22aa4 (MAINT) Update to latest apache httpasyncclient
This commit updates us to the latest version of the Apache
HTTPAsyncClient.  This is necessary in order to make it
possible to use this library in the same VM as the latest
version of clj-http, because they have some common dependencies.

The commit also cleans up some other dependencies while I was
in there.
2015-12-18 12:21:27 -08:00
Jenkins CI
7c4f95ddfd Version 0.4.6-SNAPSHOT 2015-10-13 07:13:14 -07:00
Jenkins CI
3a1aec68c7 Version 0.4.5 2015-10-13 07:13:06 -07:00
Jenkins CI
8a03faacd6 Version 0.4.5-SNAPSHOT 2015-04-15 07:33:01 -07:00
Jenkins CI
52a4fc7be4 Version 0.4.4 2015-04-15 07:32:57 -07:00
Dylan Paris
a75a9eea4b (TK-196) Update prismatic library dependencies
The prismatic/plumbing and prismatic/schema library dependencies are
lagging behind the latest stable version. This will increasingly
cause conflicts in trapperkeeper projects. This patch updates the
dependencies and fixes several functions which were validating against
schemas incompatible with the new versions.

* Update project.clj dependencies
* Use protocol schema instead of the protocol object directly
2015-04-09 15:03:57 -07:00
Jenkins CI
b21b595aee Version 0.4.4-SNAPSHOT 2015-03-20 12:43:09 -07:00
Jenkins CI
964ba2d9c2 Version 0.4.3 2015-03-20 12:43:05 -07:00
Jeremy Barlow
9b55ed31b6 (TK-134) Add connect and socket timeout client configuration
This commit enables http clients to optionally configure a connect
and/or socket timeout for requests.  For persistent clients, the
timeout values can only be configured at the client and not a
per-request level.  Non-persistent client requests support the
configuration of these timeouts.

This commit also bumps a few dependencies - tk-jetty9 to 1.2.0,
trapperkeeper to 1.10, ssl-utils to 0.8.0, and clojure to 1.6.0 -
and adds the 'test' tk-jetty9 library as a dev dependency for
testing.
2015-03-16 12:22:35 -07:00
Jenkins CI
09dd79741a lein-release plugin: bumped version from 0.4.2 to 0.4.3-SNAPSHOT for next development cycle 2015-02-13 15:32:02 -08:00
Jenkins CI
0cfa80ba64 lein-release plugin: preparing 0.4.2 release 2015-02-13 15:31:41 -08:00
Kevin Corcoran
ad93e3822f (maint) nothing to see here, move along.
* add an exclusion on a dev dependency in project.clj to make Cursive
  happy.
* clean up imports
2015-02-13 10:53:11 -08:00
Nate Wolfe
60030a3b30 (TK-143) Allow SSLv3 during unit tests
This commit enables all algorithms (by disabling none) during unit
testing so that our SSLv3 unit tests can work properly.
2015-02-12 17:05:06 -08:00
Jenkins CI
f9d6f8b200 lein-release plugin: bumped version from 0.4.1 to 0.4.2-SNAPSHOT for next development cycle 2015-01-26 10:56:40 -08:00
Jenkins CI
afb46fb72e lein-release plugin: preparing 0.4.1 release 2015-01-26 10:56:19 -08:00
Nate Wolfe
e164bb12d7 (SERVER-101) Upgrade jvm-ca dependency to 0.7.0
This commit changes the usages to reflect the new name of the library
and API.
2015-01-23 17:33:02 -08:00
Nate Wolfe
017c950f60 (MAINT) Upgrade trapperkeeper dependency to 1.0.1 2015-01-23 15:10:26 -08:00
Nate Wolfe
e8546660e0 (MAINT) Upgrade kitchensink dependency to 1.0.0 2015-01-23 14:58:23 -08:00
Jenkins CI
91e29aebeb lein-release plugin: bumped version from 0.4.0 to 0.4.1-SNAPSHOT for next development cycle 2014-11-17 15:54:26 -08:00
Jenkins CI
7e5729bffd lein-release plugin: preparing 0.4.0 release 2014-11-17 15:54:04 -08:00
Jeremy Barlow
74ef5ee0fc (MAINT) Update CHANGELOG and project.clj for 0.4.0 release 2014-11-17 14:04:56 -08:00
Jenkins CI
6ec9d10867 lein-release plugin: bumped version from 0.3.1 to 0.3.2-SNAPSHOT for next development cycle 2014-10-22 16:22:43 -07:00
Jenkins CI
b9628bce0d lein-release plugin: preparing 0.3.1 release 2014-10-22 16:22:23 -07:00
Jenkins CI
f447810c9d lein-release plugin: bumped version from 0.3.0 to 0.3.1-SNAPSHOT for next development cycle 2014-10-21 14:39:55 -07:00
Jenkins CI
dffa48cbc1 lein-release plugin: preparing 0.3.0 release 2014-10-21 14:39:35 -07:00
Preben Ingvaldsen
6815653183 Update CHANGELOG and version for 0.3.0 release 2014-10-21 14:34:26 -07:00
Chris Price
c2cbb11d5d (TK-97) Update dependencies to latest versions
Update dependencies (trapperkeeper, trapperkeeper-webserver-jetty9,
etc.) to the latest versions and fix tests accordingly.
2014-10-17 19:50:08 -07:00
Jenkins CI
9057fe3333 lein-release plugin: bumped version from 0.2.8 to 0.2.9-SNAPSHOT for next development cycle 2014-10-01 14:33:27 -07:00
Jenkins CI
ca52067a64 lein-release plugin: preparing 0.2.8 release 2014-10-01 14:33:07 -07:00
Jenkins CI
af09a0e97c lein-release plugin: bumped version from 0.2.7 to 0.2.8-SNAPSHOT for next development cycle 2014-09-18 18:36:54 -07:00
Jenkins CI
4ad2cbb976 lein-release plugin: preparing 0.2.7 release 2014-09-18 18:36:33 -07:00
Jenkins User
611218fb23 lein-release plugin: bumped version from 0.2.6 to 0.2.7-SNAPSHOT for next development cycle 2014-08-27 13:30:26 -07:00
Jenkins User
cfd9505016 lein-release plugin: preparing 0.2.6 release 2014-08-27 13:30:02 -07:00
Jenkins User
f61a49d50a lein-release plugin: bumped version from 0.2.5 to 0.2.6-SNAPSHOT for next development cycle 2014-08-22 15:37:56 -07:00
Jenkins User
63ea9fbea9 lein-release plugin: preparing 0.2.5 release 2014-08-22 15:37:33 -07:00
Jenkins User
2ac2e11ab5 lein-release plugin: bumped version from 0.2.4 to 0.2.5-SNAPSHOT for next development cycle 2014-08-22 08:08:18 -07:00
Jenkins User
350de616f2 lein-release plugin: preparing 0.2.4 release 2014-08-22 08:07:55 -07:00
Jenkins User
98df1ebbb6 lein-release plugin: bumped version from 0.2.3 to 0.2.4-SNAPSHOT for next development cycle 2014-08-21 14:48:39 -07:00
Jenkins User
654265d585 lein-release plugin: preparing 0.2.3 release 2014-08-21 14:48:16 -07:00
Jenkins User
de7259759c lein-release plugin: bumped version from 0.2.2 to 0.2.3-SNAPSHOT for next development cycle 2014-08-19 14:33:00 -07:00
Jenkins User
ea0a709941 lein-release plugin: preparing 0.2.2 release 2014-08-19 14:32:38 -07:00
Jenkins User
ba78a4e2e7 lein-release plugin: bumped version from 0.2.1 to 0.2.2-SNAPSHOT for next development cycle 2014-08-12 16:24:58 -07:00
Jenkins User
9cde4b47f4 lein-release plugin: preparing 0.2.1 release 2014-08-12 16:24:38 -07:00
Chris Price
78ae3a8ab3 Update to apache 4.0.2 2014-08-12 16:17:09 -07:00