statsd-influxdb-backend icon indicating copy to clipboard operation
statsd-influxdb-backend copied to clipboard

How to stop translating '/' to '-' in statsd key?

Open hbprotoss opened this issue 8 years ago • 2 comments

We use statsd to measure api time cost and count. I pass http uri as key to statsd, but it seems that influxdb receives data with key translated by statsd.

I comment out line 288 .replace(/\//g, '-') and restart statsd, but still doesn't work

hbprotoss avatar Feb 02 '16 08:02 hbprotoss

@hbprotoss I think it is first sanitized by statsd

https://github.com/etsy/statsd/blob/243a1f2a166c2d573f7582dc0c42f50f257e4150/stats.js#L167

longtian avatar Mar 01 '16 10:03 longtian

@hbprotoss it looks like you can stop the sanitization with a statsd config:

keyNameSanitize = false

markkimsal avatar Mar 02 '16 18:03 markkimsal