Skip to content
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

Rust: use tracing/tracing-subscriber for logging #18608

Merged
merged 6 commits into from
Feb 14, 2025
Merged

Conversation

aibaars
Copy link
Contributor

@aibaars aibaars commented Jan 28, 2025

This PR changes the logging system in the Rust codebase to use the tracing and tracing-subscriber crates and configures them the same way as the Ruby extractor. In addition it adds the possibility to collect flame graph data by ssetting CODEQL_EXTRACTOR_RUST_OPTION_FLAME_LOG to a file path. The collected data can be visualised as a flame graph or chart using the inferno tool .

@github-actions github-actions bot added the Rust Pull requests that update Rust code label Jan 28, 2025
@aibaars aibaars marked this pull request as ready for review February 3, 2025 10:22
@Copilot Copilot bot review requested due to automatic review settings February 3, 2025 10:22
@aibaars aibaars requested a review from a team as a code owner February 3, 2025 10:22

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again, by re-requesting a review.

rust/extractor/src/main.rs Outdated Show resolved Hide resolved
rust/extractor/src/main.rs Outdated Show resolved Hide resolved
rust/extractor/src/rust_analyzer.rs Outdated Show resolved Hide resolved
rust/extractor/src/rust_analyzer.rs Outdated Show resolved Hide resolved
rust/extractor/src/translate/base.rs Outdated Show resolved Hide resolved
shared/tree-sitter-extractor/src/extractor/mod.rs Outdated Show resolved Hide resolved
@aibaars aibaars force-pushed the aibaars/tracing branch 2 times, most recently from 2df8d57 to a813140 Compare February 12, 2025 11:58
Copy link
Contributor

@redsun82 redsun82 left a comment

Choose a reason for hiding this comment

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

Thanks a lot!

@redsun82 redsun82 merged commit e1f92b4 into main Feb 14, 2025
50 checks passed
@redsun82 redsun82 deleted the aibaars/tracing branch February 14, 2025 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants