-
Notifications
You must be signed in to change notification settings - Fork 77
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
System Instrumentation: How to use properly #599
Comments
logfire.instrument_system_metrics()
while True:
time.sleep(60)
I don't know if you really need this as opposed to just also exporting system-wide metrics from your main application processes. But if you do, then the two calls to If you want to instrument both process and system metrics within a single process, then call |
Thanks! Any ideas about the errors below
I still get them |
Reported open-telemetry/opentelemetry-python-contrib#3005
This is not the same kind of mismatch, I can't reproduce these errors if I only call |
Added a docs label for us to make it clearer that instrument_system_metrics should only be called once. |
This is my code, you've to probably wait for a couple of minutes for the errors to start showing up. Operating system: I'm using MacOS 14.1.1, M1 chipset |
That only gives me |
Yes, you're correct, I might have been instrumenting both system_metrics and process_metrics thinking they're mutually exclusive. It's just the |
Question
I want to use logfire to push some system as well as process metrics, however it feels like the documentation could be more complete.
Looking at the documentation, I added up this code
My goal was
base=None
argument.Is the above way the right way to do so?
While running this code, I get couple of issues
I believe this is occurring because of the while loop, but then again if I don't have the while loop the script just starts and shuts and all I see on my dashboard is single data point.
Am I missing any step or doing something incorrectly?
The text was updated successfully, but these errors were encountered: