Hello all,

I've created a PR to add Micrometer to Geode: 
https://github.com/apache/geode/pull/3153

I invite your review.

The Micrometer system includes a rich suite of Meter types for
instrumenting code, and several styles of meter registries for
maintaining the meters.  It also includes (as separate jars) additional
registry types for publishing metrics to a variety of external
monitoring systems (e.g. Prometheus, JMX, and Influx).

See http://micrometer.io/ for details about Micrometer,

This PR adds a Micrometer-based metrics system to Geode.

On startup, Geode configures a "primary" meter registry. Developers use
the primary registry to create meters (gauges, counters, timers, and
others) to instrument Geode and client code.

Internally, the meter registry is a "composite" registry, which allows
attaching any number of "downstream" registries. Each downstream
registry will typically publish the metrics to an external monitoring
system, or provide an endpoint where an external monitoring system can
"scrape" the metrics.

In Geode, when a meter is added or removed from the primary registry,
the primary registry adds or removes a corresponding meter in each
downstream registry.  When a meter in the primary registry is updated
(e.g. incremented), the primary registry forwards each operation to the
corresponding meter in each downstream registry.

A MetricsCollector provides access to the primary registry, and includes
methods for adding and removing downstream registries.

The MetricsCollector itself is currently available via a method on
InternalDistributedSystem.  Eventually we plan to  make the
MetricsCollector available through DistributedSystem, or some other
non-internal class or interface.

The key components of this change are:
- MetricsCollector (interface) allows access to the primary registry,
  and allows adding and removing downstream registries.
- CompositeMetricsCollector is the concrete implementation of
  MetricsCollector, and creates the internal composite registry.
- InternalDistributedSystem creates the MetricsCollector and makes it
  available via a new getMetricsCollector() method.
- The Micrometer system for instrumenting and maintaining metrics (added
  to Geode as a dependency).

Cheers,
Dale

> On Jan 15, 2019, at 9:37 AM, Mark Hanson <mhan...@pivotal.io> wrote:
> 
> Hello All,
> 
> I would like to propose that we incorporate Micrometer into Geode to allow us 
> to collect statistics and make them more easily available to external 
> services should someone chose to implement support for that.
> 
> In some basic testing, it does not appear to have a significant impact on 
> performance to hook this in. I think that in the long run it will really 
> improve the visibility of the systems stats in real-time… This will also 
> allow some extensibility for people who want to hook into their tracking 
> infrastructure, such as New Relic or Data Dog, though we are not putting that 
> in.
> 
> 
> What do people think?
> 
> Thanks,
> Mark
> 
> 

Reply via email to