fabio
fabio copied to clipboard
Question about fabio metrics names
This is the metrics section of my fabio.properties file
metrics.target = statsd
metrics.prefix = fabio.
I've analyzed packets getting sent from fabio to statsd exporter using wireshark and I see that before statsd transforms, the metrics names have format like fabio--http.status.404.count and fabio--notfound.count
Is there anyway to remove the --
via fabio.properties so that the name is fabio.http.status.404.count, fabio.notfound.count
It seems like this behavior is related to the go-metrics-statsd
module:
https://github.com/fabiolb/fabio/blob/c034d4fae1d604adbb5ff98034cad138eab3a771/metrics/gometrics.go#L13
https://github.com/pubnub/go-metrics-statsd/blob/7da61f429d6bdaa79d5d5746998e0db9622c56fc/statsd.go#L69-L109
The reason for this prefix is very legacy. The statsd-librato
plugin allows for the source of a metric to be pulled off the front of metric name delimitated by --
: https://github.com/librato/statsd-librato-backend/blob/3e7d7e2a76478892da5f59e3c6da4a8a3a5f9670/lib/librato.js#L268-L273
And here's a test demonstrating that behavior: https://github.com/librato/statsd-librato-backend/blob/3e7d7e2a76478892da5f59e3c6da4a8a3a5f9670/test/librato_tests.js#L559-L560