hashicorp / terraform-plugin-framework

A next-generation framework for building Terraform providers.
https://developer.hashicorp.com/terraform/plugin/framework
Mozilla Public License 2.0
284 stars 92 forks source link

implement helper/logging/NewLoggingHTTPTransport as SDKv2 #976

Closed azrdev closed 2 months ago

azrdev commented 2 months ago

Module version

current framework v1.7.0

Use-cases

Logging all backend API communications for debugging (esp. during provider development) should be simple.

Attempted Solutions

one can write a request/response logger manually, but it's some dozens of sloc for a common purpose

Proposal

Implement a ready-to-use "log all requests" component, like SDKv2 provides: https://pkg.go.dev/github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging#NewLoggingHTTPTransport

References

bflad commented 2 months ago

Drive-by comment: https://github.com/hashicorp/terraform-plugin-log/issues/91 is a related feature request for whomever triages this.

bendbennett commented 2 months ago

Hi @azrdev 👋

Thank you for raising this issue.

This appears to be a duplicate of Consider tflog http.Transport Implementation, so I'm going to close this issue.

Please feel free to upvote Consider tflog http.Transport Implementation and we'll evaluate moving forwards with that issue on the basis of the level of community interest. Thanks.

github-actions[bot] commented 1 month ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.