envoyproxy / envoyproxy/nighthawk
--stats-sinks aborts at startup: no stats sink implementation is registered
- Dominant language
- C++
- Stars
- 414
- Forks
- 95
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 11
Description
*Title*: --stats-sinks aborts at startup: no stats sink implementation is registered
*Description*:
The README documents `--stats-sinks` with a statsd example, and the flush worker / `NighthawkStatsSinkFactory` plumbing exists, but no factory implementation is linked into the binaries (the only one is a test fake). Any `--stats-sinks` value therefore aborts at startup. Expected: the documented statsd config works, pushing counters and Nighthawk's latency histograms to a statsd/DogStatsD receiver so a run can be observed live.
*Reproduction steps*:
```
nighthawk_client --stats-sinks '{name:"envoy.stat_sinks.statsd",typed_config:{"@type":"type.googleapis.com/envoy.config.metrics.v3.StatsdSink",address:{socket_address:{address:"127.0.0.1",port_value:8125}}}}' http://127.0.0.1:8080/
```
*Logs*:
```
[I] loading stats sink configuration in Nighthawk
[E] Fatal EnvoyException exception: Didn't find a registered implementation for 'envoy.stat_sinks.statsd' with type URL: 'envoy.config.metrics.v3.StatsdSink'
libc++abi: terminating due to uncaught exception of type Envoy::EnvoyException
```
*Call Stack*:
Uncaught exception at startup (`ProcessImpl::setupStatsSinks` -> `Envoy::Config::Utility::getAndCheckFactory`), no memory fault.
Contributor guide
Research direction
Start at ProcessImpl::setupStatsSinks and trace the NighthawkStatsSinkFactory plumbing, then compare the test fake with how implementations are linked into the binaries. Reproduce the documented --stats-sinks command and verify that startup succeeds and counters plus latency histograms reach a statsd or DogStatsD receiver.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- observability
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100