-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
149 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,6 +83,8 @@ CONSTEXPR(uint32_t, controllerPeriodicStateRecorderMsec, 10800000, 60000, 0) | |
constexpr const char* SENTRY_DER = | ||
"https://[email protected]/" | ||
"6719480"; | ||
constexpr const char* SENTRY_ENVELOPE_INGESTION = | ||
"https://o1396220.ingest.sentry.io/api/6719480/envelope/"; | ||
|
||
constexpr const char* API_PRODUCTION_URL = "https://vpn.mozilla.org"; | ||
constexpr const char* API_STAGING_URL = | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this | ||
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
android{ | ||
LIBS += $$PWD/../../.tmp/sentry_install/lib/libsentry.a | ||
LIBS += $$PWD/../../.tmp/sentry_install/lib/libunwindstack.a | ||
INCLUDEPATH += $$PWD/../../.tmp/sentry_install/include | ||
SOURCES += sentry/sentryadapter.cpp | ||
DEFINES += SENTRY_ENABLED | ||
|
||
# We need custom transport on android | ||
DEFINES += SENTRY_TRANSPORT_ENABLED | ||
}else{ | ||
SOURCES += sentry/dummysentryadapter.cpp | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
#include "tasksentry.h" | ||
#include "errorhandler.h" | ||
#include "leakdetector.h" | ||
#include "logger.h" | ||
#include "mozillavpn.h" | ||
#include "networkrequest.h" | ||
|
||
namespace { | ||
Logger logger(LOG_MAIN, "TaskSentry"); | ||
} | ||
|
||
TaskSentry::TaskSentry(const QByteArray& envelope) : Task("TaskSentry") { | ||
MVPN_COUNT_CTOR(TaskSentry); | ||
m_envelope = envelope; | ||
} | ||
|
||
TaskSentry::~TaskSentry() { MVPN_COUNT_DTOR(TaskSentry); } | ||
|
||
void TaskSentry::run() { | ||
NetworkRequest* request = NetworkRequest::createForSentry(this, m_envelope); | ||
|
||
connect(request, &NetworkRequest::requestFailed, this, | ||
[this](QNetworkReply::NetworkError error, const QByteArray&) { | ||
Q_UNUSED(error); | ||
logger.error() << "Failed to send envelope"; | ||
emit completed(); | ||
}); | ||
connect(request, &NetworkRequest::requestCompleted, this, | ||
[this](const QByteArray& data) { | ||
Q_UNUSED(data); | ||
logger.debug() << "Sentry sent events"; | ||
emit completed(); | ||
}); | ||
} |
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,26 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
#ifndef TASKSENTRY_H | ||
#define TASKSENTRY_H | ||
|
||
#include "task.h" | ||
|
||
#include <QObject> | ||
#include <QByteArray> | ||
|
||
class TaskSentry final : public Task { | ||
Q_DISABLE_COPY_MOVE(TaskSentry) | ||
|
||
public: | ||
TaskSentry(const QByteArray& envelope); | ||
~TaskSentry(); | ||
|
||
void run() override; | ||
|
||
private: | ||
QByteArray m_envelope; | ||
}; | ||
|
||
#endif // TASKSENTRY_H |