Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

output-metics module #80

Open
janm399 opened this issue Nov 14, 2013 · 1 comment
Open

output-metics module #80

janm399 opened this issue Nov 14, 2013 · 1 comment
Labels

Comments

@janm399
Copy link
Member

janm399 commented Nov 14, 2013

Implement a module that exposes the CounterInterface for the http://metrics.codahale.com/.

@vonnagy
Copy link
Contributor

vonnagy commented Nov 14, 2013

I have a working module that supports this, but need to work out to major issues before making it an official "pull request".

The first hurdle is to potentially add the ability to create the monitoring actor within an existing actor system (see #79 ).

The second is to plan out the default naming scheme for statistics that will be sent to the Codahale metrics registry. This format is most likely different then the statsd implementation that gets sent to DataDog. This should probably be a combination of the aspect and the actor path concatenated into some sort of dot notation.

For example:

Prefix: my-prefix
Aspect: akka.actor.delivered
ActorPath: akka://system/user/my-actor

my-prefix.my-actor.delivered

The above example is very simple, but the point is that I am looking for some recommendations for what the default input should be. The implementation I have been working on uses a naming marshaller that can be defined in the output.conf so the defaults could always be overwritten.

Example:

trait NameMarshaller {
  def prefix: String
  def buildName(aspect: String, tags: Seq[String]): String
}

class DefaultNameMarshaller(val prefix: String) extends NameMarshaller {

  require(prefix.isEmpty || prefix.endsWith("."), "Prefix must be empty or end with '.'")

  override def buildName(aspect: String, tags: Seq[String]): String = {
     // Put the default naming logic here
     ""
  }
}

The META-INF/monitor/output.conf would have something like the following:

org.eigengo.monitor.output.metrics {
    registry-class: "org.eigengo.monitor.output.metrics.DefaultRegistryProvider"
    naming-class: "org.eigengo.monitor.output.metrics.DefaultNameMarshaller"
    prefix: ""
    refresh: 5
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants