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

Use default registry to get automatic ProcessCollector #23

Closed

Conversation

hairyhenderson
Copy link

Fixes #22

Removes the custom CollectorRegistry in favour of using the default, which already has a ProcessCollector registered on it. In particular, this expose process_start_time_seconds (along with other useful metrics).

Signed-off-by: Dave Henderson [email protected]

@@ -17,8 +17,6 @@ class PrometheusExporterPlugin(octoprint.plugin.BlueprintPlugin,
octoprint.plugin.ProgressPlugin,
octoprint.plugin.EventHandlerPlugin):

_registry = CollectorRegistry(auto_describe=True)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually it is needed based on this commit.

@tg44
Copy link
Owner

tg44 commented Oct 23, 2021

I close this without merge. The "custom" registry is needed, bcs when octoprint reloaded the plugin the whole thing broke. (We tried to register metrics what was already registered.)

@tg44 tg44 closed this Oct 23, 2021
@hairyhenderson
Copy link
Author

Ah, forgot about this 😓... no problem!

@hairyhenderson hairyhenderson deleted the use-default-regsitry-22 branch October 24, 2021 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The app_start label of octoprint_infos_info should be a separate metric
2 participants