Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Feature Request: Emit `requestFinished` Event for Per-Request Bandwidth Tracking

Aperta
#589 7 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
15/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
nodejs, typescript
Ambito
networking

Direzione di ricerca

The payload names only the existing connectionClosed event as the reference point, so begin by finding where that event is emitted in the proxy's socket-handling code. The open question is how to define a request boundary on a reused keep-alive socket, which the issue itself admits is hard, so settle that design with the maintainers before writing code. Done would mean an agreed definition of requestFinished, its payload, and a test showing it fires once per request-response cycle.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

good first issue medium priority product enhancement t-unblocking

Currently, the library emits a connectionClosed event, which is helpful for tracking the overall bandwidth usage of a socket connection. However, in many real-world scenarios involving persistent connections (e.g., HTTP keep-alive), it's valuable to monitor bandwidth usage on a per-request basis.

Feature Request

I’d like to propose adding support for a new event, requestFinished, which would be emitted at the end of each individual HTTP/HTTPS request-response cycle.

While precise per-request bandwidth usage may not be trivial to isolate due to socket reuse, this event would still provide:

  • A time-based approximation of bandwidth usage across requests.
  • Insight into request frequency, response size patterns, and endpoint behavior.
  • A hook for logging, monitoring, or quota management per request.
Why This Matters

Tracking only at the socket level can obscure usage spikes or performance anomalies associated with individual requests—especially under connection pooling or when clients reuse a single proxy connection.

Lingua principale
TypeScript
Stelle
1k
Fork
167
Merge medio
16h 22m
PR unite (30g)
16

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apify/proxy-chain

Tutte le issue di apify/proxy-chain

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.