Hi folks!
I'm trying to configure metrics logging within a Vapor app. On my development box, I have Graphite running and collecting stats on port 2003
.
The following command succeeds:
PORT=2003 SERVER=localhost echo "local.random.diceroll 4 `date +%s`" | nc ${SERVER} ${PORT}
But when I try to begin logging metrics from within the Vapor app, like so:
let statsdClient = try StatsdClient(host: "localhost", port: 2003)
MetricsSystem.bootstrap(statsdClient!)
let counter = Counter(label: "com.companyname.engine.startup")
counter.increment()
No stats are logged and I get the following log output:
[6479:7983275] [si_destination_compare] send failed: Invalid argument
[6479:7983275] [si_destination_compare] send failed: Undefined error: 0
Any clue as to what is going on? I assume it is some sort of connectivity error inside the networking layer. Thanks for any help you can provide!