avito-tech / bioyino

High performance and high-precision multithreaded StatsD server
The Unlicense
228 stars 22 forks source link

[bug] Frequent gauge metric incorrect interpretation #77

Open stepanho opened 1 year ago

stepanho commented 1 year ago

Description

In case of send some gauge metric more than 200 times per server stats interval / discrete period, count of sends replaces actual value.

Example:

Send path:2|g 200 times (or more).

send_to_statsd () {
  nc -u 127.0.0.1 8125;
}

generate_metrics () {
  local I=1;

  while true; do
    echo "path:2|g";
    usleep 1000;
    I=$((${I}+1))
    if [ ${I} -gt 200 ]; then
      break;
    fi
  done
}

generate_metrics | send_to_statsd

Expected behavior:

Path value equals 2.

Actual behavior:

Path value equals 200.

Addition

Value doesn't matter. Probably 200 means update-count-threshold server parameter.

Albibek commented 1 year ago

Hi. Are you using any postfix overrides? The example for postfixes in the naming.default section of the config is a little bit misguiding as it sets updates postfix to "", so it may be overwriting the original value.

If yes, can you try commenting out this section or setting a non-empty value for the updates and see if problem goes away?

syatihoko commented 11 months ago

Hello, @stepanho. For information. In bioyino, gause does not work as in Statsd. I have previously asked, researched. The functionality has been removed to ensure better performance. Gause works as Count (you can see it in the source code).