Skip to content

Commit

Permalink
Update dependencies.
Browse files Browse the repository at this point in the history
Update dropwizard dependencies to 4.x.

Use the dropwizard metrics 4.x based Riemann reporter.

Use the InfluxDB reporter that supports Java 9+.

metrics-clojure-jvm: depend on new
module. com.codahale.metrics.JmxReporter →
com.codahale.metrics.jmx.JmxReporter.

metrics-clojure-jvm: com.codahale.metrics.JvmAttributeGaugeSet →
com.codahale.metrics.jvm.JvmAttributeGaugeSet.
  • Loading branch information
atw-gr committed May 7, 2019
1 parent f10e54b commit e68ddb4
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 11 deletions.
3 changes: 2 additions & 1 deletion metrics-clojure-core/project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
:url "https://github.com/sjl/metrics-clojure"
:license {:name "MIT"}
:dependencies [[org.clojure/clojure "1.8.0"]
[io.dropwizard.metrics/metrics-core "3.2.2"]]
[io.dropwizard.metrics/metrics-core "4.0.5"]
[io.dropwizard.metrics/metrics-jmx "4.0.5"]]
:repositories {"repo.codahale.com" "http://repo.codahale.com"
;; to get Clojure snapshots
"sonatype" {:url "http://oss.sonatype.org/content/repositories/releases"
Expand Down
7 changes: 4 additions & 3 deletions metrics-clojure-core/src/metrics/reporters/jmx.clj
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
(ns metrics.reporters.jmx
"JMX reporting"
(:require [metrics.core :refer [default-registry]])
(:import java.util.concurrent.TimeUnit
[com.codahale.metrics JmxReporter MetricRegistry MetricFilter]))
(:import [com.codahale.metrics MetricRegistry MetricFilter]
com.codahale.metrics.jmx.JmxReporter
java.util.concurrent.TimeUnit))

(defn ^com.codahale.metrics.JmxReporter reporter
(defn ^JmxReporter reporter
([opts]
(reporter default-registry opts))
([^MetricRegistry reg opts]
Expand Down
2 changes: 1 addition & 1 deletion metrics-clojure-graphite/project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
:license {:name "MIT"}
:profiles {:dev {:global-vars {*warn-on-reflection* true}}}
:dependencies [[metrics-clojure "3.0.0-SNAPSHOT"]
[io.dropwizard.metrics/metrics-graphite "3.2.2"]])
[io.dropwizard.metrics/metrics-graphite "4.0.5"]])
2 changes: 1 addition & 1 deletion metrics-clojure-health/project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
:license {:name "MIT"}
:profiles {:dev {:global-vars {*warn-on-reflection* true}}}
:dependencies [[metrics-clojure "3.0.0-SNAPSHOT"]
[io.dropwizard.metrics/metrics-healthchecks "3.2.2"]])
[io.dropwizard.metrics/metrics-healthchecks "4.0.5"]])
3 changes: 2 additions & 1 deletion metrics-clojure-influxdb/project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
:license {:name "MIT"}
:profiles {:dev {:global-vars {*warn-on-reflection* true}}}
:dependencies [[metrics-clojure "3.0.0-SNAPSHOT"]
[com.izettle/dropwizard-metrics-influxdb "1.2.2"]])
;; FIXME: not yet released upstream
[com.izettle/dropwizard-metrics-influxdb "1.2.4"]])
2 changes: 1 addition & 1 deletion metrics-clojure-jvm/project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
:license {:name "MIT"}
:profiles {:dev {:global-vars {*warn-on-reflection* true}}}
:dependencies [[metrics-clojure "3.0.0-SNAPSHOT"]
[io.dropwizard.metrics/metrics-jvm "3.2.2"]])
[io.dropwizard.metrics/metrics-jvm "4.0.5"]])
4 changes: 2 additions & 2 deletions metrics-clojure-jvm/src/metrics/jvm/core.clj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(ns metrics.jvm.core
(:import (com.codahale.metrics MetricRegistry JvmAttributeGaugeSet)
(:import (com.codahale.metrics MetricRegistry)
(com.codahale.metrics.jvm ThreadStatesGaugeSet GarbageCollectorMetricSet FileDescriptorRatioGauge
MemoryUsageGaugeSet))
MemoryUsageGaugeSet JvmAttributeGaugeSet))
(:require [metrics.core :refer [add-metric default-registry]]))

(defn register-jvm-attribute-gauge-set
Expand Down
3 changes: 2 additions & 1 deletion metrics-clojure-riemann/project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
:license {:name "MIT"}
:profiles {:dev {:global-vars {*warn-on-reflection* true}}}
:dependencies [[metrics-clojure "3.0.0-SNAPSHOT"]
[io.riemann/metrics3-riemann-reporter "0.4.6"]])
;; FIXME: this does not yet exist in clojars
[io.riemann/metrics4-riemann-reporter "0.5.1"]])

0 comments on commit e68ddb4

Please sign in to comment.