helper/logging/transport.go http.RoundTripper implementation allow correlating request and responses #546
Labels
enhancement
New feature or request
subsystem/observability
Issues and feature requests related to observability (traces, logging, etc.) inside of providers.
Milestone
SDK version
Master branch
Use-cases
I was spending some time debugging a performance issue with the TF Okta provider. As part of this exercise, I set the log TF_LOG level to trace. Through this code, we get nice output for request/response. Unfortunately, as far as I can tell there is no way to correlate a request with a given response in this http.RoundTripper implementation (especially in the
IsDebugOrHigher
branch) .Attempted Solutions
Proposal
It would be nice to be able to add enough information to correlate a request/response pair. This could be as simple as adding a UUID that would be printed when
IsDebugOrHigher
for both the request and response output. I'm happy to submit the change if appropriate!Alternatively, it would be really nice if we can start instrumenting terraform and providers with opentelemetry.
References
The text was updated successfully, but these errors were encountered: