Skip to content

Commit 40d320a

Browse files
Add bstats info to see whether local linking is used on backend servers (#600)
1 parent b469c0c commit 40d320a

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

core/src/main/java/org/geysermc/floodgate/util/Metrics.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
import org.geysermc.floodgate.config.FloodgateConfig.MetricsConfig;
4747
import org.geysermc.floodgate.event.lifecycle.ShutdownEvent;
4848
import org.geysermc.floodgate.platform.util.PlatformUtils;
49+
import org.geysermc.floodgate.platform.util.PlatformUtils.AuthType;
4950

5051
@Listener
5152
@AutoBind
@@ -101,6 +102,15 @@ public final class Metrics {
101102
new SimplePie("floodgate_version", () -> Constants.VERSION)
102103
);
103104

105+
metricsBase.addCustomChart(
106+
new SimplePie("using-backend-server-linking", () -> {
107+
if (platformUtils.authType() == AuthType.PROXIED) {
108+
return String.valueOf(config.getPlayerLink().isEnableOwnLinking());
109+
}
110+
return "false";
111+
})
112+
);
113+
104114
metricsBase.addCustomChart(
105115
new DrilldownPie("platform", () -> Collections.singletonMap(
106116
implementationName,

0 commit comments

Comments
 (0)