Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates documentation on how to send a test metric to the statsd rece…
…iver (#30499) Updates the documentation on how to send a test metric to the statsd receiver, since the current command doesn't work on all machines. The issue is that the component lets the `net` package decide whether to listen for either IPV6 or IPV4 UDP packets. That decision seems dependent on the OS. If the server picks IPV4, and localhost resolves to an IPV6 address, then the packet is not received. This [stackoverflow](https://superuser.com/questions/1238038/trouble-with-netcat-over-udp) question helped me figure out the problem **Testing:** <Describe what testing was performed and which tests were added.> In my case, using macOS, the net library decides to use IPV4: ``` workspace/opentelemetry-collector-contrib - (improve_statsd_test_command_documentation) > lsof -i | grep 8125 ___go_bui 42575 sswartz 10u IPv4 0xa2b466eb54dcda69 0t0 UDP localhost:8125 ``` So only sending a IPV4 packet (using `-4`) works: ``` echo "test.metric:42|c|#myKey:myVal" | nc -w 1 -u -4 localhost 8125; ```
- Loading branch information