Skip to content

[#57] URLSessionTaskMetrics 기반 전송 관측 경계를 구성한다 - #63

Merged
opficdev merged 8 commits into
developfrom
feat/#57
Aug 23, 2026
Merged

opficdev merged 8 commits into
developfrom
feat/#57

Conversation

@opficdev

Copy link
Copy Markdown
Owner

🔗 연관된 이슈

📝 작업 내용

📌 요약

NXURLSessionTransportURLSessionTaskMetricsSendable snapshot으로 변환하고 NXNetworkMetricsObserver에 비동기로 전달하는 전송 관측 경계 추가.

🔍 상세

  • NXNetworkMetrics, NXNetworkTransactionMetrics, NXNetworkMetricsObserver 공개 경계 추가
  • NXURLSessionTransport(urlSession:metricsObserver:)의 기본 인수로 기존 NXHTTPTransportNXURLSessionTransport(urlSession:) 호출 호환성 유지
  • 요청별 NXURLSessionTaskMetricsDelegate가 Foundation metrics를 값 source로 즉시 복사한 뒤 snapshot 변환
  • custom NXHTTPTransport, cache hit, 기존 logger event 순서와 request result 유지
  • redirect, transaction 순서·수, DNS·연결·TLS·first byte 구간, 재사용 연결, observer 한 번 전달, 느린 observer의 응답 완료 비차단 test 추가
  • DocC, README.md, README.ko.md의 사용법과 제약 범위 동등 갱신
  • PR 템플릿의 이미지 선택 항목을 변경 흐름 Mermaid 항목으로 교체

🔄 변경 흐름

flowchart LR
    transport[NXURLSessionTransport]
    session[URLSession]
    raw[NXRawResponse]
    delegate[NXURLSessionTaskMetricsDelegate]
    metrics[NXNetworkMetrics]
    observer[NXNetworkMetricsObserver]

    transport -. 제거된 기존 호출 .-> session
    transport -->|요청과 delegate 전달| session
    session -->|응답 반환| transport
    transport --> raw

    transport -->|observer 전달| delegate
    session -->|metrics callback| delegate
    delegate -->|Sendable snapshot| metrics
    metrics -->|비동기 record| observer
Loading

@opficdev opficdev self-assigned this Aug 23, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6dbc6a23f9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Sources/Runtime/NXURLSessionTransport.swift
Comment thread Sources/Runtime/NXURLSessionTransport.swift Outdated
@opficdev
opficdev merged commit 0ac161f into develop Aug 23, 2026
4 checks passed
@opficdev
opficdev deleted the feat/#57 branch August 23, 2026 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

URLSessionTaskMetrics 기반 전송 관측 경계를 구성한다

1 participant