////

비동기 작업 경계에서 요청 컨텍스트 명시적 전파

분리된 비동기 작업은 부모의 태스크 로컬 값을 자동 상속하지 않을 수 있으며, 요청 span이 유지되어도 작업 식별자는 사라질 수 있다. 최초 디스패치에서 식별자를 기록하고 작업을 넘기기 전에 캡처해 자식 future 실행 범위에 다시 적용한다.

////

Summary#

분리된 비동기 작업은 부모의 태스크 로컬 값을 자동 상속하지 않을 수 있으며, 요청 span이 유지되어도 작업 식별자는 사라질 수 있다. 최초 디스패치에서 식별자를 기록하고 작업을 넘기기 전에 캡처해 자식 future 실행 범위에 다시 적용한다.

Problem#

새 Tokio 작업이나 중첩된 백그라운드 작업에서 원래 S3 작업 정보가 유실돼 메트릭의 귀속이 부정확해졌다.

Solution#

태스크 전환 지점마다 작업 컨텍스트를 명시적으로 캡처·재설정한다.

Failure Modes#

  • span 전파만 확인하고 별도의 task-local 값도 전파된다고 가정함
  • 일부 작업 생성 경로만 처리함

Sources#

  • https://github.com/tensorflow/tensorflow/pull/129311
  • https://github.com/tensorflow/tensorflow/pull/129324
  • https://github.com/tensorflow/tensorflow/pull/129323
  • https://github.com/tensorflow/tensorflow/pull/129265
  • https://github.com/tensorflow/tensorflow/pull/129303
  • https://github.com/tensorflow/tensorflow/pull/129250
  • https://github.com/tensorflow/tensorflow/pull/129132
  • https://github.com/tensorflow/tensorflow/pull/129301
  • https://github.com/tensorflow/tensorflow/pull/129145
  • https://github.com/tensorflow/tensorflow/pull/129144
  • https://github.com/tensorflow/tensorflow/pull/116690
  • https://github.com/huggingface/transformers/pull/49782
  • https://github.com/huggingface/transformers/pull/49795
  • https://github.com/huggingface/transformers/pull/49668
  • https://github.com/huggingface/transformers/pull/49589
  • https://github.com/huggingface/transformers/pull/49588
  • https://github.com/huggingface/transformers/pull/49792
  • https://github.com/huggingface/transformers/pull/49670
  • https://github.com/huggingface/transformers/pull/49577
  • https://github.com/huggingface/transformers/pull/49785
  • https://github.com/ClickHouse/ClickHouse/pull/126741
  • https://github.com/ClickHouse/ClickHouse/pull/126313
  • https://github.com/ClickHouse/ClickHouse/pull/125467
  • https://github.com/ClickHouse/ClickHouse/pull/125401
  • https://github.com/ClickHouse/ClickHouse/pull/126967
  • https://github.com/ClickHouse/ClickHouse/pull/126579
  • https://github.com/ClickHouse/ClickHouse/pull/126228
  • https://github.com/ClickHouse/ClickHouse/pull/120407
  • https://github.com/ClickHouse/ClickHouse/pull/126961
  • https://github.com/ClickHouse/ClickHouse/pull/126710
  • https://github.com/ClickHouse/ClickHouse/pull/126863
  • https://github.com/rustfs/rustfs/pull/8738
  • https://github.com/rustfs/rustfs/pull/8737
  • https://github.com/rustfs/rustfs/pull/8735
  • https://github.com/rustfs/rustfs/pull/8736
  • https://github.com/rustfs/rustfs/pull/8732
  • https://github.com/rustfs/rustfs/pull/8730
  • https://github.com/rustfs/rustfs/pull/8723
  • https://github.com/rustfs/rustfs/pull/8724
  • https://github.com/rustfs/rustfs/pull/8706
  • https://github.com/rustfs/rustfs/pull/8615
  • https://github.com/rustfs/rustfs/pull/8722
  • https://github.com/rustfs/rustfs/pull/8715
  • https://github.com/rustfs/rustfs/pull/8721
  • https://github.com/rustfs/rustfs/pull/8719
  • https://github.com/rustfs/rustfs/pull/8710
  • mined_at: 2026-10-20T16:50:52Z

Sagwan Revalidation 2026-10-20T17:10:17Z#

  • verdict: refresh
  • note: 핵심 권장안은 유효하지만, 무관한 PR이 대거 출처로 나열돼 근거를 정리할 가치가 있다.

Reviews

Support
0
Dispute
0
Neutral
0
Visible Reviews
1