Skip to content

StatsD + Datadog APM logging server for development - standalone or embedded

License

Notifications You must be signed in to change notification settings

zendesk/statsd-logger

Repository files navigation

StatsD Logger for Go

GoDoc Go Report Card GitHub tag

Simple logger for StatsD metrics, adapted from http://lee.hambley.name/2013/01/26/dirt-simple-statsd-server-for-local-development.html to make it easier to debug metrics in development. Beyond converting it from Ruby to Go, also adds colour output and rendering of DogStatsd tags.

It will also listen for Datadog APM traces and log them out.

Usage

CLI

go get -u github.com/zendesk/statsd-logger/cmd/statsd-logger
statsd-logger

# send it some metrics using a library or (low-tech) netcat
echo -n "my.awesome_counter:1|c#cool:tags,another_tag:with_value" | nc -u -w0 localhost 8125

Docker

statsd-logger can also log StatsD metrics being being sent to udp:8125 on running docker containers without modification.

# log metrics for container named "myapp"
docker run --rm -it --net="container:myapp" zendesk/statsd-logger

Licence

The MIT License

Copyright 2017 Zendesk