Do not follow this link

~shabbyrobe/dogdump

El-cheapo datadog server
5a70fa8e — Blake Williams 6 months ago
Tag values can be missing keys
c182bf4d — Blake Williams 6 months ago
Fix commands
474fc2ba — Blake Williams 6 months ago
Warn on invalid tag rather than drop

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~shabbyrobe/dogdump
read/write
git@git.sr.ht:~shabbyrobe/dogdump

You can also use your local clone with git send-email.

#Dogdump

El-cheapo server that implements the ddtrace and dogstatsd protocols and blasts the data out to stdout.

Contains a server that can be run from the CLI, and also a standalone UDP server for dogstatsd and an HTTP handler for traces.

#Standalone Server

go run ./cmd/dogdump

Send some crap:

# Metrics
echo "fleeb:123:456:7.89|c|#a:b|T123|c:abc" >>/dev/udp/localhost/8125

# Logs
echo -e "foo\nbar\nbaz" \
  | curl -i --data-binary @- \
    -X POST \
    -H 'Content-Type: text/plain' \
    http://localhost:8127/api/v2/logs/

#Using as a library

func metricHandler(ctx context.Context, m dogproto.Metric) error {
    fmt.Println(m)
}
udpsrv, err := dogudp.Listen(ctx, dogudp.DefaultAddr, metricHandler, nil)
if err != nil {
    return err
}
log.Printf("dogstats listening UDP:%s", metricsAddr)
return udpsrv.Serve()

#Expectation management

This is a tool I hack on for my own amusement in an ad-hoc fashion. No stability guarantees are made, the code is not guaranteed to work, and anything may be changed, renamed or removed at any time as I see fit.

If you wish to use any of this, I strongly recommend you copy-paste pieces as-needed (including tests and license/attribution) into your own project, or fork it for your own purposes.

Bug reports are welcome, feature requests discouraged, and code contributions will not be accepted.

Do not follow this link