ClickHouse/base/daemon/SentryWriter.h

25 lines
533 B
C++
Raw Normal View History

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