Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Cookiezaurs committed May 15, 2023
2 parents a398ed8 + 3be86c2 commit 504f8aa
Show file tree
Hide file tree
Showing 8 changed files with 360 additions and 336 deletions.
5 changes: 5 additions & 0 deletions bin/upgrade/23.03/upgrade_fs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ then
#get web sdk
countly update sdk-web

#use localhost instead of IPv4 local IP address to be IPv6 friendly
find /etc/nginx/ -type f -exec sed -i 's#http://127.0.0.1#http://localhost#g' {} +
nginx -t
nginx -s reload

if [ "$1" != "combined" ]; then
countly upgrade;
else
Expand Down
644 changes: 322 additions & 322 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"grunt-contrib-sass": "2.0.0",
"grunt-contrib-uglify": "5.2.2",
"icanhazip": "^1.0.3",
"jimp": "0.22.7",
"jimp": "0.22.8",
"json2csv": "5.0.7",
"jsonwebtoken": "9.0.0",
"later": "1.2.0",
Expand All @@ -77,7 +77,7 @@
"moment-timezone": "0.5.43",
"mongodb": "4.9.1",
"nginx-conf": "2.1.0",
"nodemailer": "6.9.1",
"nodemailer": "6.9.2",
"object-hash": "3.0.0",
"offline-geocoder": "git+https://github.com/Countly/offline-geocoder.git",
"properties-parser": "0.3.1",
Expand Down
17 changes: 14 additions & 3 deletions plugins/crashes/api/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ plugins.setConfigs("crashes", {
report_limit: 100,
grouping_strategy: "error_and_file",
smart_preprocessing: true,
smart_regexes: "{.*?}\n/.*?/"
smart_regexes: "{.*?}\n/.*?/",
same_app_version_crash_update: false
});

/**
Expand Down Expand Up @@ -677,8 +678,18 @@ plugins.setConfigs("crashes", {
if (crashGroup.latest_version && common.versionCompare(report.app_version.replace(/\./g, ":"), crashGroup.latest_version.replace(/\./g, ":")) > 0) {
group.latest_version = report.app_version;
group.latest_version_for_sort = versionUtils.transformAppVersion(report.app_version);
group.error = report.error;
group.lrid = report._id + "";
}
if (plugins.getConfig('crashes').same_app_version_crash_update) {
if (crashGroup.latest_version && common.versionCompare(report.app_version.replace(/\./g, ":"), crashGroup.latest_version.replace(/\./g, ":")) >= 0) {
group.error = report.error;
group.lrid = report._id + "";
}
}
else {
if (crashGroup.latest_version && common.versionCompare(report.app_version.replace(/\./g, ":"), crashGroup.latest_version.replace(/\./g, ":")) > 0) {
group.error = report.error;
group.lrid = report._id + "";
}
}
if (crashGroup.resolved_version && crashGroup.is_resolved && common.versionCompare(report.app_version.replace(/\./g, ":"), crashGroup.resolved_version.replace(/\./g, ":")) > 0) {
group.is_resolved = false;
Expand Down
4 changes: 2 additions & 2 deletions plugins/crashes/api/parts/stacktrace.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ var trace = {
seed = seed.replace(/(?<!\S)\d+(?!\S)/gim, "");

//remove content between / / like regex values (SyntaxError: Invalid regular expression: /.*(2672960366.*/: Unterminated group)
//seed = seed.replace(/\/.*?\//gim, "");
seed = seed.replace(/\/.*?\//gim, "");

//remove object contents like (android.app.XyzException: Context.method() did not then call Service.method():Object{3e13d46 u14 com.example/.Service})
//seed = seed.replace(/Object\{.*?\}/gim, "");
seed = seed.replace(/\{.*?\}/gim, "");

//remove protocol (http://test)
seed = seed.replace(/[a-zA-Z]*.:\/\//gim, "/");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ configs.help.crashes-smart_preprocessing = Merges together more groups by removi
crashes.smart_regexes = Smart regexes to remove information from stacktrace
configs.help.crashes-smart_regexes = JavaScript regex as string without needed options, one regex per new line, (example removing contents between {} brackets: {.*?}), test: stack.replace(new RegExp(reg, "gim"), "");

crashes.same_app_version_crash_update = Latest crash update
configs.help.crashes-same_app_version_crash_update = Update latest crash in crashgroup even when incoming crash has the same app version as latest crash

crashes.home.total = Total number of crashes or crash groups occurrences for the applied filter, in the selected time period.
crashes.home.unique = Number of crashes (fatal or non-fatal) that occurred uniquely, in the selected time period. Only the first occurrence of the crash is recorded.
crashes.home.per-session=Number of crashes for the applied filter occurring per session, expressed as a percentage, in the selected time period.
Expand Down
6 changes: 3 additions & 3 deletions plugins/dbviewer/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 9 additions & 4 deletions plugins/push/api/send/data/message.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,18 @@ class Message extends Mongoable {
*/
static filter(date, play, state = State.Streamable) {
let $lte = new Date(date.getTime() + play),
$gte = new Date(date.getTime() - play);
$gte = new Date(date.getTime() - play),
lte_plus = new Date(date.getTime() + play + 15 * 60 * 60 * 1000),
gte_minus = new Date(date.getTime() - play - 15 * 60 * 60 * 1000);
return {
state: {$bitsAllSet: state},
$or: [
{triggers: {$elemMatch: {kind: TriggerKind.Plain, start: {$lte}}}},
{triggers: {$elemMatch: {kind: TriggerKind.Cohort, start: {$lte}, $or: [{end: {$gte}}, {end: {$exists: false}}]}}},
{triggers: {$elemMatch: {kind: TriggerKind.Event, start: {$lte}, $or: [{end: {$gte}}, {end: {$exists: false}}]}}},
{triggers: {$elemMatch: {kind: TriggerKind.Plain, tz: false, start: {$lte}}}}, // either almost now for non timezoned messages
{triggers: {$elemMatch: {kind: TriggerKind.Plain, tz: true, start: {$lte: lte_plus}}}}, // or UTC+-15 (max possible with DST)
{triggers: {$elemMatch: {kind: TriggerKind.Cohort, time: {$exists: false}, start: {$lte}, $or: [{end: {$gte}}, {end: {$exists: false}}]}}},
{triggers: {$elemMatch: {kind: TriggerKind.Cohort, time: {$exists: true}, start: {$lte: lte_plus}, $or: [{end: {$gte: gte_minus}}, {end: {$exists: false}}]}}},
{triggers: {$elemMatch: {kind: TriggerKind.Event, time: {$exists: false}, start: {$lte}, $or: [{end: {$gte}}, {end: {$exists: false}}]}}},
{triggers: {$elemMatch: {kind: TriggerKind.Event, time: {$exists: true}, start: {$lte: lte_plus}, $or: [{end: {$gte: gte_minus}}, {end: {$exists: false}}]}}},
{triggers: {$elemMatch: {kind: TriggerKind.API, start: {$lte}, $or: [{end: {$gte}}, {end: {$exists: false}}]}}},
]
};
Expand Down

0 comments on commit 504f8aa

Please sign in to comment.