-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Open
Labels
C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.Z-build-analysisNightly: build-analysisNightly: build-analysis
Description
Problem
With -Zbuild-analysis, Cargo assigns a unique session ID to each invocation for logging purpose. However, this creates challenges when Cargo calls itself recursively (for example cargo fix) or when external build orchestrators call Cargo multiple times within a single "build session." These use cases might want a way to correlate all calls.
Currently, each nested call gets its own session ID, making it difficult to associate related logs across the entire build process.
Proposed Solution
Some possible solutions:
- Do nothing. Nested calls get unique IDs (timestamp will be different unless the machine is really, really fast)
- Allow callers to specify a custom session ID that nested calls can inherit or reference.
- For logging we might need to capture this field as well. For example
build-startedevent can have acustom_metadatafield for external build orchestrators
- For logging we might need to capture this field as well. For example
- Generate hierarchical session IDs automatically. For example, parent session ID as prefix, and with unique suffixes for each nested call
Notes
Part of #15844
See also
Metadata
Metadata
Assignees
Labels
C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.Z-build-analysisNightly: build-analysisNightly: build-analysis