~shabbyrobe/dogdump

El-cheapo datadog server
5e858b1e — Blake Williams 3 months ago
Dump in API trace format
e8bb9c30 — Blake Williams 4 months ago
Document discovery
f9e041ab — Blake Williams 6 months ago
Add some error checks, remove stutter from span name

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.