Add Sumologic and Sentry to the run parameters

This commit is contained in:
runebaas 2020-06-20 00:20:00 +02:00
parent f23b8099f1
commit 3213e10b88
No known key found for this signature in database
GPG key ID: 2677AF508D0300D6
5 changed files with 21 additions and 12 deletions

View file

@ -18,13 +18,13 @@ namespace Geekbot.net.Lib.ErrorHandling
private readonly IRavenClient _raven;
private readonly bool _errorsInChat;
public ErrorHandler(IGeekbotLogger logger, ITranslationHandler translation, bool errorsInChat)
public ErrorHandler(IGeekbotLogger logger, ITranslationHandler translation, RunParameters runParameters)
{
_logger = logger;
_translation = translation;
_errorsInChat = errorsInChat;
_errorsInChat = runParameters.ExposeErrors;
var sentryDsn = Environment.GetEnvironmentVariable("SENTRY");
var sentryDsn = runParameters.SentryEndpoint;
if (!string.IsNullOrEmpty(sentryDsn))
{
_raven = new RavenClient(sentryDsn) { Release = Constants.BotVersion(), Environment = "Production" };