java-dogstatsd-client

A tiny library allowing Java applications to communicate with DataDog statsd instances easily.

License

License

Categories

Categories

Java Languages CLI User Interface
GroupId

GroupId

com.indeed
ArtifactId

ArtifactId

java-dogstatsd-client
Last Version

Last Version

2.0.16
Release Date

Release Date

Type

Type

jar
Description

Description

java-dogstatsd-client
A tiny library allowing Java applications to communicate with DataDog statsd instances easily.
Project URL

Project URL

https://github.com/indeedeng/java-dogstatsd-client
Source Code Management

Source Code Management

http://github.com/indeedeng/java-dogstatsd-client

Download java-dogstatsd-client

How to add to project

<!-- https://jarcasting.com/artifacts/com.indeed/java-dogstatsd-client/ -->
<dependency>
    <groupId>com.indeed</groupId>
    <artifactId>java-dogstatsd-client</artifactId>
    <version>2.0.16</version>
</dependency>
// https://jarcasting.com/artifacts/com.indeed/java-dogstatsd-client/
implementation 'com.indeed:java-dogstatsd-client:2.0.16'
// https://jarcasting.com/artifacts/com.indeed/java-dogstatsd-client/
implementation ("com.indeed:java-dogstatsd-client:2.0.16")
'com.indeed:java-dogstatsd-client:jar:2.0.16'
<dependency org="com.indeed" name="java-dogstatsd-client" rev="2.0.16">
  <artifact name="java-dogstatsd-client" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.indeed', module='java-dogstatsd-client', version='2.0.16')
)
libraryDependencies += "com.indeed" % "java-dogstatsd-client" % "2.0.16"
[com.indeed/java-dogstatsd-client "2.0.16"]

Dependencies

test (3)

Group / Artifact Type Version
org.hamcrest : hamcrest-core jar 1.3
org.hamcrest : hamcrest-library jar 1.3
junit : junit jar 4.8.2

Project Modules

There are no modules declared in this project.

Project Moved

This project has merged with datadog/java-dogstatsd-client. This repository primarily exists for historical purposes. Please file issues and pull requests at datadog/java-dogstatsd-client.

java-dogstatsd-client

A statsd client library implemented in Java. Allows for Java applications to easily communicate with statsd.

This version is forked from the upstream java-statsd-client project, adding support for Datadog extensions for use with dogstatsd.

This version also adds support for empty or null prefixes, to allow a client to send arbitrary statistic names.

Downloads

The client jar is distributed via maven central, and can be downloaded here.

<dependency>
    <groupId>com.indeed</groupId>
    <artifactId>java-dogstatsd-client</artifactId>
    <version>2.0.16</version>
</dependency>

Usage

import com.timgroup.statsd.StatsDClient;
import com.timgroup.statsd.NonBlockingStatsDClient;

public class Foo {

  private static final StatsDClient statsd = new NonBlockingStatsDClient(
    "my.prefix",                          /* prefix to any stats; may be null or empty string */
    "statsd-host",                        /* common case: localhost */
    8125,                                 /* port */
    new String[] {"tag:value"}            /* Datadog extension: Constant tags, always applied */
  );

  public static final void main(String[] args) {
    statsd.incrementCounter("foo");
    statsd.recordGaugeValue("bar", 100);
    statsd.recordGaugeValue("baz", 0.01); /* Datadog extension: support for floating-point gauges */
    statsd.recordHistogramValue("qux", 15);    /* Datadog extension: histograms */
    statsd.recordHistogramValue("qux", 15.5);  /* ...also floating-point */

    /* expects times in milliseconds
     */
    statsd.recordExecutionTime("bag", 25, "cluster:foo"); /* Datadog extension: cluster tag */
  }
}
com.indeed

Indeed Engineering

Versions

Version
2.0.16
2.0.15
2.0.14
2.0.13
2.0.12
2.0.11
2.0.10
2.0.9
2.0.8
2.0.7
2.0.6
2.0.5