We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently, there is no support for tracking disk usage. It will help to set up alerts where disk size grows beyond a set threshold.
The text was updated successfully, but these errors were encountered:
I think this would be a good feature request for the system metrics instrumentation in https://github.com/open-telemetry/opentelemetry-python-contrib. But this should work:
import psutil import logfire from opentelemetry.metrics import CallbackOptions, Observation logfire.configure() def disk_usage_callback(_options: CallbackOptions): usage = psutil.disk_usage("/") yield Observation(usage.percent / 100) logfire.metric_gauge_callback("system.disk.utilization", [disk_usage_callback])
Sorry, something went wrong.
Shall we, at least, document?
alexmojaki
No branches or pull requests
Description
Currently, there is no support for tracking disk usage. It will help to set up alerts where disk size grows beyond a set threshold.
The text was updated successfully, but these errors were encountered: