-
Notifications
You must be signed in to change notification settings - Fork 2.9k
fix(git): report Git operation statistics at end of run #39596
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
+159
−0
Conversation
This file contains hidden or 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
secustor
reviewed
Nov 27, 2025
4eba28c to
6e53101
Compare
9f74cc8 to
3c36ae1
Compare
This comment was marked as outdated.
This comment was marked as outdated.
12 tasks
This comment was marked as outdated.
This comment was marked as outdated.
6e53101 to
2aca5e2
Compare
secustor
reviewed
Nov 29, 2025
2aca5e2 to
0918850
Compare
9bd3f58 to
fa88ff4
Compare
Contributor
Author
|
Let's get #39653 in first |
jamietanna
commented
Dec 1, 2025
jamietanna
commented
Dec 1, 2025
Now we have instrumented our Git operations with tracing, we can make sure that users who are not using OpenTelemetry still get insights into their Git operation usage using a debug log output. Following how other insights are produced, we can introduce a new type in `lib/util/stats` for `GitOperationStats`, which will track the overall execution for each operation type, and output them in the same style as we use for other timing reports. At the end of a Renovate run, we'll then make sure that this is logged into a debug log for further investigation. To create the report, we can make sure that we introduce a new OpenTelemetry `SpanProcessor`, which will run when we end our Run, and store any Git operations in `GitOperationStats`. This adapts code from GPT-4.1 and code from [0]. Co-authored-by: gpt-4.1 <[email protected]> [0]: https://github.com/yurisouza/monitoria-sdk/blob/ca9d751fa7c3a785a04f87b8966bb782b4617021/src/adapters/nestjs/span-duration-tracker.ts#L18-L27
fa88ff4 to
e6f3c57
Compare
viceice
approved these changes
Dec 1, 2025
Contributor
|
🎉 This PR is included in version 42.29.3 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This was referenced Dec 1, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
Now we have instrumented our Git operations with tracing, we can make
sure that users who are not using OpenTelemetry still get insights into
their Git operation usage using a debug log output.
Following how other insights are produced, we can introduce a new type
in
lib/util/statsforGitOperationStats, which will track theoverall execution for each operation type, and output them in the same
style as we use for other timing reports.
At the end of a Renovate run, we'll then make sure that this is logged
into a debug log for further investigation.
To create the report, we can make sure that we introduce a new
OpenTelemetry
SpanProcessor, which will run when we end our Run, andstore any Git operations in
GitOperationStats.Context
Please select one of the below:
AI assistance disclosure
Did you use AI tools to create any part of this pull request?
Please select one option and, if yes, briefly describe how AI was used (e.g., code, tests, docs) and which tool(s) you used.
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via:
The public repository:
Evidence
When tested with:
With:
backstage/backstage
A large repository, with many possible branches, let's see how long it takes to run.
JamieTanna-Mend-testing/elastic-poetry-1-forced-csp-security-policies (fork of https://github.com/elastic/csp-security-policies/)
A smaller repository, where we'd need to invoke
poetry(although not tested in dry-run mode)