Skip to content

Commit

Permalink
out_prometheus_remote_write: update cutoff treshold
Browse files Browse the repository at this point in the history
This treshold was added to stop metrics older than one hour 
being sent to prometheus. It seems that during compilation, atleast on windows, 
this number gets changed to 817405952, which is significantly lower and 
results in all metrics being thrown.

The treshold have been changed to a static value that persists through compilation.

Signed-off-by: gmhomb <gjerthomb@hotmail.com>
  • Loading branch information
gmhomb authored and edsiper committed Mar 31, 2024
1 parent 582b0f1 commit 925afca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/cmetrics/cmt_encode_prometheus_remote_write.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <prometheus_remote_write/remote.pb-c.h>

#define CMT_ENCODE_PROMETHEUS_REMOTE_WRITE_ADD_METADATA CMT_FALSE
#define CMT_ENCODE_PROMETHEUS_REMOTE_WRITE_CUTOFF_THRESHOLD 60L*60L*1000000000L
#define CMT_ENCODE_PROMETHEUS_REMOTE_WRITE_CUTOFF_THRESHOLD 3600000000000L /* One hour in nanoseconds */

#define CMT_ENCODE_PROMETHEUS_REMOTE_WRITE_SUCCESS 0
#define CMT_ENCODE_PROMETHEUS_REMOTE_WRITE_ALLOCATION_ERROR 1
Expand Down

0 comments on commit 925afca

Please sign in to comment.