-
-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add Sentry * add curl dep * add recursive * try to fix ci * try again * update linux ci
- Loading branch information
Showing
12 changed files
with
163 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule sentry-native
added at
04eb4e
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#include "TelemetryService.hpp" | ||
|
||
namespace et { | ||
TelemetryService::TelemetryService(bool _allow, const string& databasePath, | ||
const string& environment) | ||
: allowed(_allow) { | ||
if (allowed) { | ||
sentry_options_t* options = sentry_options_new(); | ||
|
||
// this is an example. for real usage, make sure to set this explicitly to | ||
// an app specific cache location. | ||
sentry_options_set_database_path(options, databasePath.c_str()); | ||
sentry_options_set_dsn( | ||
options, | ||
"https://[email protected]/" | ||
"5574732"); | ||
sentry_options_set_symbolize_stacktraces(options, true); | ||
sentry_options_set_release(options, "EternalTerminal@" ET_VERSION); | ||
sentry_options_set_environment(options, environment.c_str()); | ||
|
||
sentry_init(options); | ||
} | ||
} | ||
|
||
TelemetryService::~TelemetryService() { sentry_shutdown(); } | ||
|
||
void TelemetryService::log(sentry_level_e level, const std::string& message) { | ||
if (!allowed) return; | ||
sentry_capture_event( | ||
sentry_value_new_message_event(level, "stderr", message.c_str())); | ||
} | ||
|
||
shared_ptr<TelemetryService> TelemetryService::telemetryServiceInstance; | ||
} // namespace et |
Oops, something went wrong.