GithubHelp home page GithubHelp logo

chonton / dogstatd-client Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 249 KB

A java client to push UDP messages to a local dogstatd.

License: Apache License 2.0

Java 100.00%
java metrics up-for-adoption

dogstatd-client's Introduction

UP FOR ADOPTION

dogstatd-client

A java client to push UDP messages to a local dogstatd.

Javadoc and build reports are available.

Requirements

  • Minimal latency in the mainline processing
  • Some, but not extreme buffering of outgoing messages
  • Non-blocking write of UDP message
  • Thread-safe sender
  • Lack of dogstatd collector will be noted, but not cause failure of mainline processing

Assumptions

  • A local (on the same host) dogstatd collector
  • Firing a UDP message per application event will be cheaper than in-process aggregation of events

Use with Maven

To include dogstatd-client in your maven build, use the following fragment in your pom.

      <dependency>
        <groupId>org.honton.chas</groupId>
        <artifactId>dogstatd-client</artifactId>
        <version>0.0.3</version>
      </dependency>

Typical Java Use

In setup code

  // you only need a single instance, Sender is thread safe and send method does not block caller
  static public final Sender METRICS = new Sender();

Sending some example metrics

  METRICS.send(new Histogram("histogram.name", latency);
  
  METRICS.send(new Gauge("round", i, tag));
  
  METRICS.send(new Counter("pi", 3.14));
  
  METRICS.send(new Event("title", "message", "tag1", "tag2"));

0.2 to 0.3

  • Added public constructors for Event
  • Added public constructors for ServiceCheck
  • Metric changed to abstract
  • Tags changed to package protected
  • Validator changed to package protected

dogstatd-client's People

Contributors

chonton avatar

Watchers

 avatar  avatar  avatar

dogstatd-client's Issues

Missing Public constructors

The constructors of Event and ServiceCheck classes have no access modifiers so it cannot be instantiated outside their package. They should have public constructors

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.