OpenTelemetry Core
Who this mod is for
The target players for this mod are players of "factory-style" Minecraft packs that want to track the game state of their world from outside, like the mods BlueMap or Create Track Map: Forge also do.
To gain any benefit from using this mod, you will need to have some observability software outside of Minecraft like Prometheus and Grafana, as such a knowledge about these tools is sadly a prerequisite.
What this is
This mod mainly focuses on providing a centralized framework for other mods that want to export player defined data from Minecraft worlds as OpenTelemetry metrics.
Players can define custom metrics and then configure blocks called "Scrapers" to record data from the block in front of them and export it to a selected metric. Some builtin default metrics are also exported (see below).
What this is not / Privacy
This mod does not send any data to servers maintained by its developers (unless you explicitly configure it to do that, technically). In fact, in order for the data to be able to leave Minecraft at all, you need to have an OpenTelemetry SDK configured (see below for how to do that) where you also control where the data should be sent. While the mod needs to be installed on both client and server, the OpenTelemetry SDK only needs to be configured on the server.
Content
This mod only includes the following, see other projects like OpenTelemetry-Compat for mod-specific functionality:
- Scrapers:
- Redstone Scraper: Can observe Redstone signal strength or comparator-like output
- Item Scraper: Observes the inventory in front of it, providing data like fill ratio and present items.
- Fluid Scraper: Like Item Scraper, but for tanks/fluids.
- Energy Scraper: Like Item Scraper, but for energy. On fabric uses TechReborn Energy API.
- Builtin metrics: See the GitHub wiki page.
How to install
Put the jar in the mods folder. On clients, that should already be enough and you are done. On servers however, you will probably (= unless another mod already does this) also need to configure an OpenTelemetry SDK. The easiest way we found to do this is using the OpenTelemetry javaagent. See its documentation for details, essentially, you need to download their javaagent and then start the server with the -javaagent:<path-to-javaagent-jar> parameter and then tell the javaagent where to export the data to.