The reporter component makes it easy to wire-in support for the following in your components:
- Event reporting to riemann
- Metric reporting with metrics with support for JMX, Riemann and Console output
- Error captures to sentry
- Expose prometheus metrics via HTTP
- Send metrics to PushGateway
Reporter provides a component in order to be declared as a dependency in other components.
- Reporter's
sentry
config supports the following keys:dsn, :environment, :release, :tags
sentry-options
are deprecated
- Migrating from
exoscale/raven
toio.sentry/sentry-clj
SENTRY_
env vars are no longer automatically forwarded
raven-options
renamed tosentry-options
withinspootnik.reporter.impl/Reporter
signature
- Allow arbitray values for counter
- Use :ca-cert config key instead of :authority
- Mark global reporter as :redef
- Bump prometheus simpleclient to 0.8.0
- Add embedded HTTP server for prometheus metrics
- A reporter instance is now available in the
spootnik.reporter
namespace.
- Prometheus output
- Log exceptions in
capture!
even if the sentry dsn is not configured.
- Fix 0.1.38
- Fix stop! to accept a context rather than an alias
- Updated Clojure to 1.10.0
- Updated Component to 0.4.0
- Updated raven dependency to 0.4.6
- Add slf4j as a destination (#28)
- Extract build-metrics-reporter from build-metrics-reporters (#26)
- Replace when + not with when-not (#25)
- Updated raven dependency to 0.4.5
- Updated raven dependency to 0.4.4
- Added support for multiple aleph options.
- Updated raven dependency to 0.4.2
- Added support for passing aleph connection pools to raven.
- Updated raven dependency to 0.3.1
- Allow multiple Riemann events
- Sentry events now log the Sentry UUID
- Switched to Raven 0.3.0
- Fixed arity bug in forwarding tags to Raven
- Added support for new raven (capture!) arity
- Switched to raven 0.2.0
- Dependency updates
- Bump to metrics-clojure 2.8.0
- No more reflection
- Make uncaught exception handler optional.
- Start a registry, even with no reporters configured.
- Improve default configuration
- When tags are provided ensure that they are as a seq
- Implement the protocol for nil
- Allow TLS connections in the riemann client
- Send raven captures for uncaught exceptions.
Reporter exposes a schema if you wish to validate config, simply pull-in schema.core and either use spootnik.reporter/config-schema
as an argument to schema.core/validate
or use the handy function spootnik.reporter/config-validator
.
Start the component with
(spootnik.reporter/initialize! reporter-config)
Once started, the spootnik.reporter/reporter
variable will contain your component. You can then use the following signatures:
(defprotocol RiemannSink
(send! [this e]))
(defprotocol SentrySink
(capture! [this e]))
(defprotocol PushGatewaySink
(gauge! [this e])
(counter! [this e]))
(defprotocol MetricHolder
(instrument! [this prefix])
(build! [this type alias] [this type alias f])
(inc! [this alias] [this alias v])
(dec! [this alias] [this alias v])
(mark! [this alias])
(update! [this alias v])
(time-fn! [this alias f])
(start! [this alias])
(stop! [this alias]))
The spootnik.reporter
namespace contains helper functions to interact with the reporter instance.
Copyright © 2016 Pierre-Yves Ritschard pyr@spootnik.org, MIT/ISC License.