ITADN

Propagate managerWrapException setting in mkManagerSettingsContext'

#565Pull Requestadithyaov 创建于 2025-04-16
A
adithyaovcommented
`mkManagerSettingsContext'` replaces a few modifiers in the `Manager`, which prevents the `managerWrapException` from the input settings from being propagated, resulting in the loss of input behaviour. The change in this PR uses `managerWrapException` from the input manager settings and then applies the handling function. `mkManagerSettingsContext'` was originally idempotent; this change breaks that idempotency. The only issue I see is that multiple applications of `mkManagerSettingsContext'` will nest the handler in `managerWrapException`. This occurs when we do something like `newTlsManagerWith tlsManagerSettings`. **NOTE:** The same issue applies to `managerRetryableException`. ### Some context on why this is required: We want to hook telemetry (`hs-opentelemetry`) into the HTTP manager. The ideal way to hook telemetry is to integrate it with `managerModifyRequest` and `managerModifyResponse`. However, `managerModifyRequest` may be called multiple times, so it cannot be used for telemetry purposes. As a workaround, we use `managerWrapException`.
合并状态:未合并 1 条评论