Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

statsd sampling rate fix. #4

Merged
merged 1 commit into from

2 participants

@manu844

there was a missing "|" inbetween sample rate and count metric which was rendering sampling obsolete.

@manu844 manu844 statd sampling rate typo
there was a missing "|" inbetween sample rate and count metric which was rendering sampling obsolete.
12c988c
@zacman85 zacman85 merged commit f47c634 into zebrafishlabs:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 27, 2013
  1. @manu844

    statd sampling rate typo

    manu844 authored
    there was a missing "|" inbetween sample rate and count metric which was rendering sampling obsolete.
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 ngx_http_statsd.c
View
4 ngx_http_statsd.c
@@ -288,7 +288,7 @@ ngx_http_statsd_handler(ngx_http_request_t *r)
len = s.len;
len += sizeof(":") - 1;
len += NGX_INT_T_LEN;
- len += sizeof("|c@0.00") - 1;
+ len += sizeof("|c|@0.00") - 1;
if (line_len < len) {
// Redimension buffer.
@@ -305,7 +305,7 @@ ngx_http_statsd_handler(ngx_http_request_t *r)
if (stat.type == STATSD_TYPE_COUNTER) {
if (ulcf->sample_rate < 100) {
- p = ngx_sprintf(line, "%V:%d|c@0.%02d", &s, n, ulcf->sample_rate);
+ p = ngx_sprintf(line, "%V:%d|c|@0.%02d", &s, n, ulcf->sample_rate);
} else {
p = ngx_sprintf(line, "%V:%d|c", &s, n);
}
Something went wrong with that request. Please try again.