Skip to content

Conversation

alexmojaki
Copy link
Contributor

@alexmojaki alexmojaki commented Mar 14, 2025

Discussion in https://pydantic.slack.com/archives/C0813FX362E/p1741867835353059

In open-telemetry/opentelemetry-python-contrib#3250, these:

        'process.runtime.memory': ['rss', 'vms'],
        'process.runtime.cpu.time': ['user', 'system'],
        'process.runtime.cpu.utilization': None,
        'process.runtime.thread_count': None,
        'process.runtime.context_switches': ['involuntary', 'voluntary'],

were deprecated in favour of:

        'process.memory.usage': None,
        'process.memory.virtual': None,
        'process.cpu.time': ['user', 'system'],
        'process.cpu.utilization': ['user', 'system'],
        'process.thread.count': None,
        'process.context_switches': ['involuntary', 'voluntary'],

The new metrics are already being emitted alongside the old ones when using logfire.instrument_system_metrics(base='full'), we just note this in the docs and update the tests.

The default logfire.instrument_system_metrics() hasn't changed and isn't yet.

Both should be updated next time we make a major release: #932

Also added a new metric process.cpu.core_utilization which is equivalent to process.runtime.cpu.utilization in value. process.cpu.utilization isn't equivalent because it's divided by the number of cores which makes it less useful IMO.

Update to dashboard template: https://github.com/pydantic/platform/pull/8435

Copy link
Contributor

hyperlint-ai bot commented Mar 14, 2025

PR Change Summary

Documented the deprecation of certain process runtime metrics and introduced new metrics in the system metrics documentation.

  • Deprecated old process runtime metrics in favor of new metrics.
  • Updated documentation to reflect the new metrics being emitted alongside the old ones.
  • Clarified that the default metrics will be updated in the next major release.

Modified Files

  • docs/integrations/system-metrics.md

How can I customize these reviews?

Check out the Hyperlint AI Reviewer docs for more information on how to customize the review.

If you just want to ignore it on this PR, you can add the hyperlint-ignore label to the PR. Future changes won't trigger a Hyperlint review.

Note specifically for link checks, we only check the first 30 links in a file and we cache the results for several hours (for instance, if you just added a page, you might experience this). Our recommendation is to add hyperlint-ignore to the PR to ignore the link check for this PR.

What is Hyperlint?

Hyperlint is an AI agent that helps you write, edit, and maintain your documentation.

Learn more about the Hyperlint AI reviewer and the checks that we can run on your documentation.

Copy link

cloudflare-workers-and-pages bot commented Mar 14, 2025

Deploying logfire-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8f450cc
Status: ✅  Deploy successful!
Preview URL: https://14e4230d.logfire-docs.pages.dev
Branch Preview URL: https://alex-system-metrics-update.logfire-docs.pages.dev

View logs

@alexmojaki alexmojaki merged commit 19b4a0a into main Mar 14, 2025
16 checks passed
@alexmojaki alexmojaki deleted the alex/system-metrics-update branch March 14, 2025 16:53
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.

1 participant