2020-05-27 19:11:04 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <common/types.h>
|
|
|
|
#include <Common/StackTrace.h>
|
|
|
|
|
2020-05-27 20:15:33 +00:00
|
|
|
#include <Poco/Util/LayeredConfiguration.h>
|
|
|
|
|
2020-05-27 19:11:04 +00:00
|
|
|
#include <string>
|
|
|
|
|
2020-05-29 20:08:05 +00:00
|
|
|
/// Sends crash reports to ClickHouse core developer team via https://sentry.io
|
2020-05-27 19:11:04 +00:00
|
|
|
class SentryWriter
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
SentryWriter() = delete;
|
|
|
|
|
2020-05-27 20:15:33 +00:00
|
|
|
static void initialize(Poco::Util::LayeredConfiguration & config);
|
2020-05-27 19:11:04 +00:00
|
|
|
static void shutdown();
|
|
|
|
static void onFault(
|
|
|
|
int sig,
|
|
|
|
const siginfo_t & info,
|
|
|
|
const ucontext_t & context,
|
|
|
|
const StackTrace & stack_trace
|
|
|
|
);
|
|
|
|
};
|