clj-commons / clj-commons/aleph

HTTP client connection stat callbacks are only attached to default pool

Open
#770 0 comments 0 reactions 0 assignees View on GitHub
bug good first issue
Dominant language
Clojure
Stars
2.6k
Forks
242
Avg merge
4d 5h
Merged PRs (30d)
1

Description

# Problem

When creating a custom connection pool via `aleph.http/connection-pool`, it doesn't have the stat callbacks registered via `register-connection-stats-callback` attached to it. There's also no (clean) way to manually attach them because the `aleph.http/connection-stats-callbacks` var is private.

# Solution

Instead of only attaching the stat callbacks to `default-connection-pool`, make them the default value for the `:stats-callback` option of `aleph.http/connection-pool`.

Contributor guide

Open the contributing guide

Research direction

Start at aleph.http/connection-pool and compare its :stats-callback default with default-connection-pool and register-connection-stats-callback. Trace how aleph.http/connection-stats-callbacks is used. Done means custom connection pools receive the registered callbacks by default, matching the stated behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure
Domain
api, backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.