Skip to content

Commit 7e64ab4

Browse files
committed
Fix example plugin metrics config and cleanup
1 parent 644a461 commit 7e64ab4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

sponge/example-plugin/src/main/java/com/example/ExamplePlugin.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
import org.spongepowered.plugin.PluginContainer;
1414
import org.spongepowered.plugin.builtin.jvm.Plugin;
1515

16+
import java.net.URI;
17+
1618

1719
@Plugin("example")
1820
public class ExamplePlugin {
@@ -30,7 +32,7 @@ public class ExamplePlugin {
3032
@Listener
3133
public void onServerStart(final StartedEngineEvent<Server> event) {
3234
this.metrics = factory
33-
// .url(URI.create("https://metrics.example.com/v1/collect")) // For self-hosted metrics servers only
35+
.url(URI.create("https://metrics.example.com/v1/collect")) // For self-hosted metrics servers only
3436

3537
// Custom example charts
3638
// For this to work you have to create a corresponding data source in your project settings first
@@ -47,9 +49,8 @@ public void onServerStart(final StartedEngineEvent<Server> event) {
4749

4850
//.debug(true) // Enable debug mode for development and testing
4951

50-
.token("bafe240e8d1a4b919e5083928539799d") // required -> token can be found in the settings of your project
52+
.token("YOUR_TOKEN_HERE") // required -> token can be found in the settings of your project
5153
.create(pluginContainer);
52-
ERROR_TRACKER.trackError(new RuntimeException("Something went wrong!", new Exception("Cause")));
5354
}
5455

5556
@Listener

0 commit comments

Comments
 (0)