Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider tflog http.Transport Implementation #91

Open
bflad opened this issue Aug 1, 2022 · 1 comment
Open

Consider tflog http.Transport Implementation #91

bflad opened this issue Aug 1, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@bflad
Copy link
Member

bflad commented Aug 1, 2022

terraform-plugin-log version

v0.7.0

Use cases

terraform-plugin-sdk/v2 was recently updated to include a new tflog based http.Transport implementation to replace the Go standard library log based one. Given that this code enhances/configures Go standard library functionality, is tightly coupled to terraform-plugin-log, and doesn't necessarily apply to just terraform-plugin-sdk, it might make sense to include it in this module as well.

Attempted solutions

Import and use terraform-plugin-sdk implementation or manually recreate it.

Proposal

Introduce a new tfhttplog (or tfloghttp or tflog/tfhttplog) package, which contains the following:

The latter two may also necessitate the need for something to create/handle HTTP transaction IDs (or a guided way for the consumer to inject their own), since that is something baked into the http.Transport itself currently.

When creating the website documentation for this functionality, it might be useful to provide examples for how to use it with go-retryablehttp.

References

@bflad bflad added the enhancement New feature or request label Aug 1, 2022
@bflad bflad added this to the v0.8.0 milestone Feb 8, 2023
@bflad bflad self-assigned this Feb 8, 2023
@bflad bflad removed this from the v0.8.0 milestone Feb 8, 2023
@bflad bflad removed their assignment Feb 8, 2023
@bflad
Copy link
Member Author

bflad commented Feb 8, 2023

Additional consideration: hashicorp/terraform-plugin-sdk#1114

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant