OpenTelemetry or Prometheus output

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

satmd
Manual Inserter
Manual Inserter
Posts: 1
Joined: Tue Jun 16, 2026 8:09 pm
Contact:

OpenTelemetry or Prometheus output

Post by satmd »

Hello fellow factorio players, modders and developers,

I've been looking to make my little private cooperative factorio server output metrics in opentelemetry or prometheus format. I've come across several plugins which do work mostly, but have some shortcomings (missing entities in output) or solve this inefficiently (rcon, uploading lua) or disable achievements.

So, instead of writing/using mods to generate output, it would really love to see a native implementation which either opens a port on localhost (or unix socket even) or writes to a stats file every X time.

A native implementation probably also would have the advantage that it'd always knows all how to present all possible entities, fluids and stuff instead of having a mod that only knows the entities that it had been accounted for, right?

One suggested format is the Prometheus text-based (file) format documented at https://prometheus.io/docs/instrumentin ... sed-format
It's line based and pretty simple to produce.

Example line taken from the non-native implementation from https://mods.factorio.com/mod/graftorio2-geo:
factorio_entity_build_count_input{force="player",name="iron-chest",surface="nauvis"} 84

I only know little about the "metrics" file formats commonly in use, but I've taken the recommendation from my day job to prefer "counters" over "rates", because it's a) simpler and b) you can calculate the latter from the former.

Right now I've settled with graftorio2-geo which seems to forget some of its metrics after while, writes the output to a file and voids achievements.

Is this something we can get in away that doesn't take away achievements? My friends and me are planning to make a Space Age run together and it'd sure be fun to watch the spikes of power loss and restoration as well as encounters with enemy in plots. :3

Thank you very much!
Post Reply

Return to “Ideas and Suggestions”