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

[Tracing] Provide more subspans

Aperta
#875 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
swift

Direzione di ricerca

Inizia leggendo l’issue #868 e seguendo il codice intorno a HTTPClient.execute, quindi identifica come il connection pooling, il DNS, la configurazione della connessione e lo streaming di richieste/risposte sono attualmente rappresentati negli span emessi. Il lavoro è completato quando il trace espone le fasi temporali annidate richieste, inclusi l’accodamento o il riutilizzo, la creazione della connessione, il DNS e l’attività di richiesta/risposta HTTP.

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

Descrizione

Similar to #868, but represented as spans.

Right now, requests appear to be taking way longer than I would expect, and I suspect that's because of the connection pool warming up, not the actual request. This should be visible in the emitted spans.

From #868:

  • How long did this request spend in the connection pool queue
  • How long did it take to make a connection (if one didn't already exist)
  • How long did it take to send the request
  • DNS timings

Mapped to spans, one way this could look that'd allow me to better understand where time is being spent:

| ---------------------------------------------- HTTPClient.execute ----------------------------------------------------- |
| ----------------------- Request 1 ---------------------- | | --------- Request 2 (redirect to the same host) -------- |
| ------ New connection ------ | | ----- HTTP req/res ---- | | --- Queued/reused connection --- | | -- HTTP req/res -- |

And zooming in:

| ------------------------ New connection ------------------------- |
| --- DNS lookup --- | | --- TCP est --- | | --- TLS handshake --- |

And (below is an example of bidi streaming, when the request and response bodies overlap; in a simple non-streaming example, the request and response wouldn't overlap - important bit is that all 4 subspans would have "HTTP req/res" as the parent span)

| ------------------------------------------- HTTP req/res ------------------------------------------ |
| --- HTTP req head --- | | ------------ HTTP req body ------ |
                                           | --- HTTP res head --- | | ------- HTTP res body ---- |

The goal is for you to be able to gland at the trace and quickly identify where the bulk of time was spent - mainly: pre-request or inside the request.

Lingua principale
Swift
Stelle
1.1k
Fork
156
Merge medio
1h 54m
PR unite (30g)
4

Preparare l'ambiente

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 swift-server/async-http-client

Tutte le issue di swift-server/async-http-client

Issue simili

Altre issue su Swift

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.