apple / apple/swift-statsd-client
Getting [si_destination_compare] send failed: Invalid argument upon stats send
- Dominant language
- Swift
- Stars
- 71
- Forks
- 23
- Avg merge
- 5d 4h
- Merged PRs (30d)
- 2
Description
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:
```bash
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:
```swift
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!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with StatsdClient(host:port:) and the counter.increment() call, then reproduce the failure against Graphite on localhost:2003 using the example configuration. Done means the counter is accepted by the metrics backend without the reported send errors and the metric is visible in Graphite.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- observability-sre
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100