Skip to content

Stop implicitly emitting deprecated process runtime metrics #932

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

Merged
merged 5 commits into from
Jul 22, 2025

Conversation

alexmojaki
Copy link
Contributor

@alexmojaki alexmojaki commented Mar 14, 2025

Builds on #930

These are breaking changes that should be included in the next major release.

Copy link
Contributor

hyperlint-ai bot commented Mar 14, 2025

PR Change Summary

Updated system metrics instrumentation to stop emitting deprecated process runtime metrics and introduced new metric names for clarity.

  • Replaced deprecated metric 'process.runtime.cpu.utilization' with 'process.cpu.utilization'.
  • Removed deprecated metrics related to process runtime from the instrumentation configuration.
  • Clarified documentation regarding the metrics and their values.

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.

Copy link

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

Deploying logfire-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 568c813
Status: ✅  Deploy successful!
Preview URL: https://57fd9b88.logfire-docs.pages.dev
Branch Preview URL: https://alex-system-metrics-breaking.logfire-docs.pages.dev

View logs

@alexmojaki
Copy link
Contributor Author

I'll resolve merge conflicts after the base gets merged, or maybe not at all until we want to make a major release.

Base automatically changed from alex/system-metrics-update to main March 14, 2025 16:53
@alexmojaki alexmojaki requested a review from Copilot July 18, 2025 15:05
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes deprecated process runtime metrics from the default system metrics configuration and replaces them with their newer equivalents. This is part of a major release breaking change to align with OpenTelemetry standards.

  • Removes deprecated process.runtime.* metrics from default configurations
  • Replaces deprecated metrics with their modern equivalents (e.g., process.runtime.cpu.utilizationprocess.cpu.utilization)
  • Maintains backward compatibility by allowing deprecated metrics to be explicitly requested

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
logfire/_internal/integrations/system_metrics.py Removes deprecated metrics from type definitions and configurations, adds logic to explicitly exclude them from FULL_CONFIG
tests/otel_integrations/test_system_metrics.py Updates test expectations to reflect removal of deprecated metrics and adds test for explicit deprecated metric usage
docs/integrations/system-metrics.md Updates documentation to remove references to deprecated metrics and simplify explanations
Comments suppressed due to low confidence (2)

tests/otel_integrations/test_system_metrics.py:72

  • The test only verifies that the deprecated metric name is collected, but doesn't verify the actual metric functionality or values. Consider adding assertions to verify the metric produces expected values.
    logfire.instrument_system_metrics({'process.runtime.cpu.utilization': None}, base=None)  # type: ignore

@alexmojaki alexmojaki marked this pull request as ready for review July 22, 2025 12:24
@alexmojaki alexmojaki merged commit 445ed10 into main Jul 22, 2025
16 checks passed
@alexmojaki alexmojaki deleted the alex/system-metrics-breaking-changes branch July 22, 2025 14: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