Commit Graph

16 Commits

Author SHA1 Message Date
Sergei Zharinov e77f3d1fbb fix(stats): avoid max argument overflow (#44494) 2026-07-11 15:08:11 +00:00
Mike Ryan f635ae29c4 chore(instrumentation): add timing statistics for getReleases (#42523)
* feat: timing statistics for getReleases

Adds collection and reporting of timing statistics for
`datasource.getReleases()` calls. Each call records the datasource, registryUrl,
packageName, and duration. The intent is to visibility into where
renovate is retrieving release information and how long that might take.

The report consists of a nested data-structure that provides increasing
detail as we descend datasource, registryUrl, and packageName.

The full report  is logged at trace level
`getReleases statistics with packages`.

A summary report including only datasources and registryUrls is logged
at debug level `getReleases statistics summary`.

* add GetReleasesSpanProcessor

- Re-instrument getReleases calls using open telemetry.
- Adds GetReleasesSpanProcessor, which can adapt
  `getReleases` spans to GetReleasesStats.

* fixup instrumentation tests

* pr feedback

* pr feedback: naming

* pr feedback: comments
2026-04-14 17:36:37 +00:00
Sergei Zharinov 9d857c1f68 refactor(lint): Organize imports with biome (#40966) 2026-02-06 13:40:01 +00:00
Sergei Zharinov 930cf6633c refactor: Rewrite imports with .ts extensions (#40700)
fix: Additional vi.mock path corrections and prettier formatting
2026-01-26 22:48:17 +00:00
Jamie Tanna b5cd0317cf fix(git): report Git operation statistics at end of run (#39596)
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 <jamie.tanna+github-copilot@mend.io>

[0]: https://github.com/yurisouza/monitoria-sdk/blob/ca9d751fa7c3a785a04f87b8966bb782b4617021/src/adapters/nestjs/span-duration-tracker.ts#L18-L27
2025-12-01 15:53:26 +00:00
Jamie Tanna ee1840dd62 test: correct test name (#38431) 2025-10-14 10:06:45 +00:00
Sergei Zharinov a02dd076df feat: Abandoned packages logging (#36090)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
2025-05-23 05:31:04 +00:00
Michael Kriese 19c115c813 test: cleanup (#34785) 2025-03-13 17:52:09 +00:00
Trim21 6e5731b554 test: migrate from jest to vitest (#34499) 2025-02-26 14:18:38 +00:00
Sergei Zharinov 7229d962f7 feat: Stats for datasource cache (#30623) 2024-08-11 08:07:16 +00:00
Rhys Arkins 73ed5a17b9 chore(logs): log url stats as trace (#30421) 2024-07-27 08:49:01 +00:00
Sergei Zharinov 5e02f6eb81 refactor: Compact HTTP cache stats (#28011) 2024-03-19 15:07:15 +00:00
Sergei Zharinov 5d7372f917 feat: Http cache stats (#27956) 2024-03-16 13:17:10 +00:00
Sergei Zharinov fd8684ba6e refactor: Extract "HttpStats" utility class (#27944) 2024-03-15 12:39:31 +00:00
Sergei Zharinov 998705d5b0 refactor: Package cache stats utility (#27936) 2024-03-14 15:06:53 +00:00
Sergei Zharinov 9c06813697 refactor: Create utility for stats collection and reporting (#27919) 2024-03-14 09:46:56 +00:00