Project was migrated to clj-commons org and new source is clj-commons/metrics-clojure
- Added ORIGINATOR and CODEOWNERS files.
- Renamed links to use new github url
- Fixed readthedocs publishing - account was transfered to @ieugen
- Upgraded com.izettle/dropwizard-metrics-influxdb to 1.3.4 since 1.2.4 is no longer on Maven Central.
- Added bb.edn with test task to automate project testing
Added a Dockerfile using sphinx image so documentation can be built without having sphinx locally.
Migration was done using lein2deps
tool for each repo
bb -Sdeps '{:deps {io.github.borkdude/lein2deps {:git/sha "1fdaf45577edc9a6aeee027501e50924b9b793f5"}}}' -m lein2deps.api --write-file deps.edn
- Added deps.edn to metrics-clojure-core and dropped codahale repo since service shut down
- Added deps.edn to metrics-clojure-ganglia
- Added deps.edn to metrics-clojure-graphite
- Added deps.edn to metrics-clojure-health
- Added deps.edn to metrics-clojure-influxdb
- Added deps.edn to metrics-clojure-jvm
- Added deps.edn to metrics-clojure-riemann
- Added deps.edn to metrics-clojure-ring
Riemann Client was migrated to io.riemann package from com.aphyr as of version 0.4.3.
Contributed by Marcus Spiegel.
GitHub issue: #119
Contributed by Andy Chambers.
GitHub issue: #122
Contributed by Taylor Wood.
GitHub issue: #117
Contributed by Joe Littlejohn.
GitHub issue: #125.
Contribyted by Shantanu Kumar.
The misspelled :group-guages
option was renamed to :group-gauges
.
Contributed by Pierre-Yves Ritschard.
Contributed by Pierre-Yves Ritschard.
Contributed by Pierre-Yves Ritschard.
Contributed by Andrew Jones.
Ning Sun contributed several new functions that instantiate various reservoir types:
metrics.core/uniform-reservior
metrics.core/exponentially-decaying-reservoir
metrics.core/sliding-time-window-reservoir
metrics.core/sliding-window-reservoir
and a few more.
GH issue: #104
Ning Sun contributed several new functions that retrieve different type of metrics from a registry:
metrics.core/meters
metrics.core/histograms
metrics.core/timers
metrics.core/gauges
metrics.core/counters
GH issue: #102
Contributed by Pierre-Yves Ritschard.
Contribited by Ragnar Dahlén.
DropWizard Metrics was upgraded to 3.1.2
.
Contributed by Matthias Nüßler.
Cheshire was upgraded to 5.5.0
.
Contributed by Shantanu Kumar.
metrics.core/remove-metrics
is a new function that removes
metrics based on a predicate.
Contributed by Vincent Bernat.
Ganglia reporter had an infinite recursion.
GH issue: #71.
Added the macro metrics.timers/start-stop-time
to enable timing expressions that include parking functions in core.async/go
blocks.
Contributed by Wil Yegelwel.
Type hints across the libraries now use fully-qualified names, which means returned types don't have to be imported in the caller namespaces.
Contributed by Jason Whitlark.
metrics.timers/rate
return value now includes :total
.
Contributed by Andrew Rudenko.
metrics-clojure
Now has a function to remove all existing metrics from a given registry.
Contributed by Jason Whitlark.
metrics-clojure
is now based on Metrics 3.1.1.
Contributed by Jason Whitlark.
metrics-clojure
is now based on Metrics 3.1.0.
metrics-clojure-ring
now instruments the scheme of requests, (http or https).
Contributed by Jason Whitlark.
metrics.timers
now provides two new functions, start
and stop
.
Contributed by Jason Whitlark.
metrics-clojure-health
is a new sub-project that makes implementing
health checks easier in Clojure.
Contributed by Jason Whitlark.
metrics-clojure-ganglia
is a new sub-project that makes using the Ganglia
reporter easier from Clojure.
Contributed by Jason Whitlark.
CSV reporter is now provided in metrics.reporters.csv
.
Contributed by Jason Whitlark.
JMX reporter is now provided in metrics.reporters.jmx
.
Contributed by Jason Whitlark.
All reporter namespace now provide a new function, stop
, that stops
their respective reporter.
Contributed by Jason Whitlark.
metrics.reporters.graphite/start
is a function that starts the reporter,
just like other reporter namespaces (e.g. console) do.
Contributed by Jason Whitlark.
Contributed by Jason Whitlark.
metrics.reporters.graphite
is a new sub-project that contains
a Graphite reporter.
The Ring extension now respects user-provided registries instead of always using the default one.
Contributed by David Smith.
- Fixed
metrics.core/default-registry
to have a valid reflection hint (no longer causes compile error when used in interop.) Fix planned on 2.1.x as well. Contributed by Tim McCormack.
It is now possible to use metrics.ring.expose
with a custom
registry:
(require '[metrics.ring.expose :refer [expose-metrics-as-json]])
(expose-metrics-as-json ring-app "/ops/metrics" registry {:pretty-print? true})
The project now also has a JVM instrumentation extension that covers:
- Number of threads and their states
- GC stats, heap, off heap memory
- File descriptors
To enable full instrumenting, use
(require '[metrics.jvm.core :refer [instrument-jvm]])
(instrument-jvm metric-registry)
Contributed by John Cowie (ThoughtWorks).
metrics.timers/mean
now returns mean value (not rate)
of the timer.
Contributed by Steve Miner.
The Ring extension is now updated for Metrics core 2.0 API.
Contributed by John Cowie (ThoughtWorks).
metrics-clojure
1.x maintained a metrics registry in a dynamic var.
This approach makes the library a little easier for beginners but
also much harder to use in more sophisticated cases, e.g. in concurrent
applications or those that use a Component-like approach to
program structure.
As such, metrics-clojure
2.0+ makes metrics registry a required
explicit argument to most functions in the API:
(require '[metrics.meters :as meters])
;; with 1.x
(meters/rate-mean)
(meters/mark! 10)
;; with 2.0
(let [m (meters/meter ["test" "meters" "test-rate-mean-update-multiple"])]
(meters/rate-mean m)
(meters/mark! m 10))
The library maintains a default registry in metrics.core/default-registry
which tries to keep the 1.x
API as functional as possible but using
your own registry is encouraged.
To instantiate a registry, use metrics.core/new-registry
:
(require '[metrics.core :as mtr])
(mtr/new-registry)
See GH #19 for discussion.
In metrics-clojure
1.x, metrics.gauges/defgauge
could accept
a function or a bunch of forms (body). In 2.0, it only accepts
a function. This is in part due to the new API structure but also
make the API more straightforward and works much better with explicit
registry management now advocated by the library.
Metrics 3.0 uses nanoseconds precision in timers.
Metrics 3.0 is now used internally by the library.
Clojure 1.3 is no longer supported by the library.
Ring integration now tracks rates of requests that use TRACE, OPTION, CONNECT, and non-standard HTTP verbs.
Contributed by Joe Littlejohn (Nokia).
The project now depends on org.clojure/clojure
version 1.6.0
. It is
still compatible with Clojure 1.4 and if your project.clj
depends on
a different version, it will be used, but 1.6 is the default now.
The project now uses Cheshire 5.3.