dab95af366
Reviewers: teon.banek, mferencevic Reviewed By: teon.banek, mferencevic Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D1546
34 lines
646 B
C++
34 lines
646 B
C++
/// @file
|
|
|
|
#pragma once
|
|
|
|
#include <thread>
|
|
#include <vector>
|
|
|
|
#include "gflags/gflags.h"
|
|
|
|
#include "io/network/endpoint.hpp"
|
|
|
|
namespace stats {
|
|
|
|
/**
|
|
* Start sending metrics to StatsD server.
|
|
*
|
|
* @param prefix prefix to prepend to exported keys
|
|
*/
|
|
void InitStatsLogging(std::string prefix = "");
|
|
|
|
/**
|
|
* Stop sending metrics to StatsD server. This should be called before exiting
|
|
* program.
|
|
*/
|
|
void StopStatsLogging();
|
|
|
|
/**
|
|
* Send a value to StatsD with current timestamp.
|
|
*/
|
|
void LogStat(const std::string &metric_path, double value,
|
|
const std::vector<std::pair<std::string, std::string>> &tags = {});
|
|
|
|
} // namespace stats
|