mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-21 11:43:27 +00:00
fix sentry safeguard info
This commit is contained in:
parent
44af23ba2e
commit
77b4253624
@ -976,7 +976,7 @@ public class Iris extends VolmitPlugin implements Listener {
|
|||||||
event.setTag("iris.nms", INMS.get().getClass().getCanonicalName());
|
event.setTag("iris.nms", INMS.get().getClass().getCanonicalName());
|
||||||
var context = IrisContext.get();
|
var context = IrisContext.get();
|
||||||
if (context != null) event.getContexts().set("engine", context.asContext());
|
if (context != null) event.getContexts().set("engine", context.asContext());
|
||||||
event.getContexts().set("safeguard", ServerBootSFG.allIncompatibilities);
|
event.getContexts().set("safeguard", IrisSafeguard.asContext());
|
||||||
return event;
|
return event;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -2,6 +2,8 @@ package com.volmit.iris.core.safeguard;
|
|||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
import com.volmit.iris.core.IrisSettings;
|
import com.volmit.iris.core.IrisSettings;
|
||||||
|
import com.volmit.iris.util.collection.KList;
|
||||||
|
import com.volmit.iris.util.collection.KMap;
|
||||||
|
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
|
|
||||||
@ -35,5 +37,23 @@ public class IrisSafeguard {
|
|||||||
return "stable";
|
return "stable";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static KMap<String, Object> asContext() {
|
||||||
|
KMap<String, Object> m = new KMap<>();
|
||||||
|
m.put("diskSpace", !ServerBootSFG.hasEnoughDiskSpace);
|
||||||
|
m.put("javaVersion", !ServerBootSFG.isCorrectJDK);
|
||||||
|
m.put("jre", ServerBootSFG.isJRE);
|
||||||
|
m.put("missingAgent", ServerBootSFG.missingAgent);
|
||||||
|
m.put("missingDimensionTypes", ServerBootSFG.missingDimensionTypes);
|
||||||
|
m.put("failedInjection", ServerBootSFG.failedInjection);
|
||||||
|
m.put("unsupportedVersion", ServerBootSFG.unsuportedversion);
|
||||||
|
m.put("serverSoftware", !ServerBootSFG.passedserversoftware);
|
||||||
|
KList<String> incompatiblePlugins = new KList<>();
|
||||||
|
ServerBootSFG.incompatibilities.forEach((plugin, present) -> {
|
||||||
|
if (present) incompatiblePlugins.add(plugin);
|
||||||
|
});
|
||||||
|
m.put("plugins", incompatiblePlugins);
|
||||||
|
return m;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user