to use managerModifyRequest and managerModifyResponse to implement this instrumentation
instead of wrapping original http-client's Manager
Why
a lot of wrapping and unwrapping are necessary because the wrapper type is different from the original one of course when using http-client instrumentation
How
ManagerSetting provides hooks for requests and responses
to call createSpan in a hook for a request and to call endSpan in a hook for a response
ThreadLocalStorage is used to transport span data created in a hook for a request to a hook for a response
Note
Cachix @sandydoo seems to implement a similar instrumentation.
What
managerModifyRequest
andmanagerModifyResponse
to implement this instrumentationManager
Why
How
ManagerSetting
provides hooks for requests and responsescreateSpan
in a hook for a request and to callendSpan
in a hook for a responseThreadLocalStorage
is used to transport span data created in a hook for a request to a hook for a responseNote
Cachix @sandydoo seems to implement a similar instrumentation.
https://github.com/cachix/hs-opentelemetry-instrumentation-http-client/
This PR includes diffs of #142.