OpenTelemetry can be used to report various monitoring data (including metrics, logs and traces) and is a de-facto industry standard.
This mod provides additional instrumentation for the OpenTelemetry JavaAgent so that various game metrics can be reported. The overall functionality is similar to fabric-exporter
.
- Make sure you have an endpoint where OpenTelemetry data can be ingested.
This could be a OpenTelemetry Collector hosted by you or by someone else (e.g. in the Grafana Cloud). - Setup the OpenTelemetry Java Agent so that it sends data to your ingestion service.
- Add the OpenTelemetry Agent Helper Extension for Fabric.
- This is required so that the OpenTelemetry Agent is correctly detecting and utilizing the mod.
- Simply add and (optionally) configure this mod. It should work out of the box.
- Import the provided dashboard into Grafana
- From Grafana Dashboards
- From the local demo in the repo
You may also have a look at the corresponding development setup as it contains an locally running deployment of the full infrastructure.
Example integrations
- For
itzg/minecraft-server
see here
The default configuration of the mod should usually work out of the box.
If you wish to customize it, open config/oie.json
and tune the corresponding values.
Further documentation can be found directly inside the corresponding Java Code.
- Make sure that you have Docker and IntelliJ installed
- Checkout the repository
- Download the OpenTelemetry JavaAgent and put it into the
run
folder - Go into
_monitoring_dev_infra
and start it withdocker compose up
- Log in to Grafana at
localhost:3000
(username and password areadmin
) - Open IntelliJ and run the
Minecraft Server (OTEL-AGENT)
launcher
Installation guide for the latest release
Add the following to build.gradle
:
dependencies {
modImplementation 'net.litetex.mcm:otel-instrumentation-extension:<version>'
// Further documentation: https://wiki.fabricmc.net/documentation:fabric_loom
}
Note
The contents are hosted on Maven Central. You shouldn't have to change anything as this is the default maven repo.
If this somehow shouldn't work you can also try Modrinth Maven.
See the contributing guide for detailed instructions on how to get started with our project.