-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add fallback logic for rust CLI detector and additional telemetry (#990)
* Add fallback logic for rust CLI detector and additional telemetry tracing * Fix build tests * Add fallback tests * resolve comments
- Loading branch information
1 parent
88939b5
commit 45431f1
Showing
8 changed files
with
843 additions
and
51 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
src/Microsoft.ComponentDetection.Common/Telemetry/Records/RustGraphTelemetryRecord.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
namespace Microsoft.ComponentDetection.Common.Telemetry.Records; | ||
|
||
public class RustGraphTelemetryRecord : BaseDetectionTelemetryRecord | ||
{ | ||
public override string RecordName => "RustGraph"; | ||
|
||
public string CargoTomlLocation { get; set; } | ||
|
||
public bool WasRustFallbackStrategyUsed { get; set; } | ||
|
||
public string FallbackReason { get; set; } | ||
|
||
public bool FallbackCargoLockFound { get; set; } | ||
|
||
public string FallbackCargoLockLocation { get; set; } | ||
|
||
public bool DidRustCliCommandFail { get; set; } | ||
|
||
public string RustCliCommandError { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
353 changes: 317 additions & 36 deletions
353
src/Microsoft.ComponentDetection.Detectors/rust/RustCliDetector.cs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.