Skip to content
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

feat: toggleable CC metrics #4

Merged
merged 5 commits into from
Nov 21, 2022
Merged

Conversation

Lemmmy
Copy link
Contributor

@Lemmmy Lemmmy commented Nov 21, 2022

This adds a config option, computercraft, to enable/disable the CC metrics. This makes cc-prometheus usable as a standalone vanilla/JVM metrics exporter without requiring CC in the environment. Totally understand if this is out of scope for the mod so feel free to reject, I just thought it might make more sense than me pulling out half the exporter code.

I left the startup phase as-is since the config can't be read during mod initialization. It works fine in testing for Fabric so hopefully there are no problems with that. I have not tested Forge. For both loaders, the CC mod is no longer marked as mandatory.

I also added a missing dependency, simpleclient_common, which was causing issues under Fabric.

Lemmmy and others added 2 commits November 21, 2022 05:13
As we no longer depend on CC:T being present, we need to include() it.
@SquidDev
Copy link
Member

Thank you for working on this!

I wonder if we should detect CC:T's presence instead (either via doing a try { Class.forName(...) } or with mod-loader-specific APIs), rather than having a config option for it?

Lemmmy and others added 2 commits November 21, 2022 17:27
Co-authored-by: Jonathan Coates <git@squiddev.cc>
On the off-chance we'll ever support other mods I guess??
@SquidDev SquidDev merged commit 3c432e4 into SquidDev-CC:master Nov 21, 2022
@SquidDev
Copy link
Member

<3 Thank you so much!

@Lemmmy Lemmmy deleted the feat/toggle-cc branch November 21, 2022 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants