Files
memgraph/src/telemetry/requests.hpp
Matej Ferencevic 44821a918c Initial implementation of telemetry
Summary:
Add telemetry to main memgraph binary

Add resource usage collector

Add telemetry flag

Change telemetry collector logic

Fix utils compilation

Add timestamp

Add first version of interactive test

Started working on test runner

Implement all tests

Flake8 on runner.py

Integrate test with Apollo

Add TODO

Reviewers: buda, teon.banek

Reviewed By: buda, teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1419
2018-06-20 14:49:07 +02:00

27 lines
663 B
C++

#pragma once
#include <string>
#include <json/json.hpp>
namespace telemetry {
/**
* This function is called by the main telemetry `Init` function to initialize
* the requests library.
*/
void RequestsInit();
/**
* This function sends a POST request with a JSON payload to the `url`.
*
* @param url url to which to send the request
* @param data json payload
* @param timeout the timeout that should be used when making the request
* @return bool true if the request was successful, false otherwise.
*/
bool RequestPostJson(const std::string &url, const nlohmann::json &data,
const int timeout = 10);
} // namespace telemetry