rust-lang / rust-lang/rust

Tracking Issue for Metrics Initiative

Open
#128,914 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

-Zmetrics-dir A-diagnostics A-metrics C-tracking-issue D-diagnostic-infra T-compiler
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

The Metrics Initiative

This is a tracking issue for the Metrics Initiative. Tracking issues are used to record the overall progress of implementation. They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions. A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature. Instead, please:

Please file dedicated issues for specific concerns that you wish to register. Discussions or concerns become very hard to track on GitHub issues once they reach more than a couple of comments, and GitHub's UI will then collapse discussions.

Context

Motivation

Excerpt from the Council Zulip thread as summary (edited by me):

We're envisioning three use cases for the Metrics Initiative:

  1. Supporting feature development, e.g. answering specific questions such as when the old and new trait solvers diverge, or helping identify and resolve bugs.
  2. Guiding improvements to User Experience, e.g. knowing which compiler errors are causing the most confusion or are hit the most frequently, focusing on improving those first, and verifying that the improvements help.
  3. Improving perf feedback loops and insight, e.g. helping identify pathological edge cases, similar to work @nnethercote has done manually in the past

We're focusing initially on the first use case since we see that as the most likely to have a significant impact.
We want to get to the point where other contributors can leverage the metrics to answer their own questions while we continue to build up the supporting infrastructure.

To do that, we'd like to gather specific use cases where people would like to leverage metrics and build the supporting infrastructure around those real-world needs

Guiding Aims

  • Trust: Do not violate the trust of our users
    • NO TELEMETRY, NO NETWORK CONNECTIONS
    • Emit metrics locally
    • User information should never leave their machine in an automated manner; sharing their metrics should always be opt-in, clear, and manual.
    • All of this information would only be stored on disk, with some minimal retention policy to avoid wasteful use of users’ hard drives
  • Feedback: improving feedback loops to assist with iterative improvement within the project
    • answer questions from real production environments in a privacy-preserving way
    • improve legibility of rare or intermittent issues
    • earlier warnings for ICEs and other major issues on nightly, improving the likelihood that we'd catch them before they hit stable.
  • Performance impact
    • leave no trace (minimize performance impact, particularly for default-enabled metrics)
  • Extensible:
    • it should be easy to add new metrics as needed
    • Only add metrics as a way to answer a specific question in mind, with an explicitly documented rationale
  • User experience:
    • improving user experience of reporting issues to the project
    • improving the user experience of using the compiler, measuring the impact of changes to user experience

Suggested Use Cases

TODO

  • Inform project members of the initiative and gather real-world needs to build initial metrics infrastructure around
  • Complete the metrics loop (e.g., design and implement tools to send metrics back to the project for analysis, tools to analyze metrics locally and notify users when issues we want insight into have been encountered, analyzing metrics in crater runs)
  • Automated cleanup of metrics to prevent unbounded disk usage

Concerns and Related Issues

Related Labels

Implementation History

  • #128702

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the WIP planning document and the linked implementation history issue #128702, then review the TODO items and related issues #128594 and #129296. This tracking issue does not name a file, test, or self-contained change; completion is framed as advancing the metrics loop and automated cleanup work, with progress recorded here.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers, observability-sre
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.