ClickHouse/base/daemon/SentryWriter.h

28 lines
892 B
C++
Raw Normal View History

#pragma once
#include <string>
2020-05-27 20:15:33 +00:00
namespace Poco { namespace Util { class LayeredConfiguration; }}
class StackTrace;
2020-06-16 12:56:28 +00:00
/// \brief Sends crash reports to ClickHouse core developer team via https://sentry.io
///
/// This feature can enabled with "send_crash_reports.enabled" server setting,
/// in this case reports are sent only for official ClickHouse builds.
///
/// It is possible to send those reports to your own sentry account or account of consulting company you hired
/// by overriding "send_crash_reports.endpoint" setting. "send_crash_reports.debug" setting will allow to do that for
namespace SentryWriter
{
void initialize(Poco::Util::LayeredConfiguration & config);
void shutdown();
2020-06-16 12:56:28 +00:00
/// Not signal safe and can't be called from a signal handler
void onFault(
int sig,
const std::string & error_message,
2020-07-31 20:16:31 +00:00
const StackTrace & stack_trace);
};