fabio icon indicating copy to clipboard operation
fabio copied to clipboard

Question about fabio metrics names

Open mwalters-workmarket opened this issue 5 years ago • 1 comments

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

mwalters-workmarket avatar Oct 23 '19 13:10 mwalters-workmarket

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

CodyPubNub avatar Feb 03 '20 19:02 CodyPubNub