-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add prometheus combinator #36
Conversation
Currently still contains a bug somewhere, combinators are seemingly not added to the runtime groups tables.
Still includes debug prints for now
Marked as a "draft" because while I tested it a bit locally, there are several possible code paths that I had to take into account. As such I want to spend a bit more time testing on my own server before I mark this as "ready". |
Also includes cleanup of invalidated prometheus combinators, which apparently causes desyncs to happen at the moment
Previous desync was caused by bad logging, game.print apparently affects game state.
Only made functions local and reordered their declaration to match this.
Can be toggled with right click on the respective textfield.
i don't know if this PR fit this project, the change might be too big. |
Yeah, I agree, somehow I initially thought that the scope would be way smaller, but this really should be its own project/mod. Closing this PR, when/if I have time to add the script-interface and events I will put that in another PR and link it here. |
Adds a new entity (+item+recipe), the prometheus combinator.
When placed it can be configured to export all connected signals (or a single specific one) to a customizable metric.
The metric named entered into the UI is prefixed with
factorio_custom_
before being exported, to avoid name clashes with present/future metrics.Multiple metrics can be created with multiple combinators, but any amount of them can also be configured to export to the same metric, in which case their signals are added together in each export tick.
Each custom metric contains two labels - the
signal
label, which follows the schema{signal.type}:{signal.name}
and the addionalgroup
label. Unless enabled in the settings the latter is always""
, once enabled it can be used to merge multiple related metrics together.Example applications:
rate
)