Skip to content

orbit-legacy/orbit-dropwizard-metrics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Orbit Dropwizard Metrics Extension

Release Maven Central Javadocs Build Status Gitter

Developer & License

This project was developed by Electronic Arts and is licensed under the BSD 3-Clause License.

Introduction

Allows for the collection of metrics in relation to how an application interacts with Orbit.

Metrics Exposed

  • OrbitMetricsActorExtension
    • Actor Activation Timer
      • orbit.actors.activation_time[actor:%s]
    • Actor Lifetime Timer
      • orbit.actors.lifetime[actor:%s]
    • Actor Deactivation Timer
      • orbit.actors.deactivation_time[actor:%s]
    • Actor Active Count
      • orbit.actors.count[actor:%s]
    • Actor Message Receive Rate Meter
      • orbit.actors.msg_received_rate[actor:%s]
  • OrbitMetricsMessagingExtension
    • Inbound Message Timer per Message Type
      • orbit.messaging[type:%s,direction:inbound]
    • Outbound Message Meter per Message Type
      • orbit.messaging[type:%s,direction:outbound]
  • OrbitMetricsInvocationHandler
    • Invocation Timers
      • orbit.actors.methodresponsetime[actor:%s,method:%s]
      • orbit.actors.chainresponsetime[actor:%s,method:%s]

Instructions

If no MetricRegistry is provided to the Extension or InvocationHandler then it will construct a MetricRegistry and make it available by calling the getter method. Otherwise the provided MetricRegistry will be used.

MetricRegistry metricRegistry = new MetricRegistry();

OrbitMetricsActorExtension actorExtension = new OrbitMetricsActorExtension(metricRegistry);
OrbitMetricsMessagingExtension messagingExtension = new OrbitMetricsMessagingExtension(metricRegistry);

OrbitMetricsInvocationHandler invocationHandler = new OrbitMetricsInvocationHandler(metricRegistry);

Builder builder = new Stage.Builder();
builder.extensions(actorExtension, messagingExtension);
builder.invocationHandler(invocationHandler);
Stage stage = builder.build();
stage.start();