Skip to content

feat: expose request statistics via ApifyClient.stats - #1228

Merged
vdusek merged 12 commits into
apify:masterfrom
cobanfurkanx:feat/expose-client-statistics
Nov 16, 2026
Merged

vdusek merged 12 commits into
apify:masterfrom
cobanfurkanx:feat/expose-client-statistics

Conversation

@cobanfurkanx

@cobanfurkanx cobanfurkanx commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Closes: #1175

  • Add a read-only stats property to ApifyClient and ApifyClientAsync. It returns the statistics of the HTTP client in use, so with with_custom_http_client it reports the custom client's counts.
  • Add a stats property to HttpClientBase.
  • Export ClientStatistics from apify_client and add it to the API docs.
  • Document request statistics in the retries guide, with sync and async examples.
  • Add unit tests for the default and custom HTTP clients, sync and async.

The name stats matches client.stats in the JS client and the public stats attribute of v2.

✍️ Drafted by Claude Code

@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Nov 15, 2026
@vdusek
vdusek requested a review from szaganek as a code owner November 16, 2026 08:06
@vdusek vdusek changed the title feat: expose request statistics on ApifyClient feat: expose request statistics via ApifyClient.stats Nov 16, 2026

@vdusek vdusek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@vdusek
vdusek merged commit 27a3f61 into apify:master Nov 16, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose request statistics on ApifyClient

2 participants