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

helper/logging/transport.go http.RoundTripper implementation allow correlating request and responses #546

Closed
edulop91 opened this issue Aug 24, 2020 · 3 comments · Fixed by #1006
Labels
enhancement New feature or request subsystem/observability Issues and feature requests related to observability (traces, logging, etc.) inside of providers.
Milestone

Comments

@edulop91
Copy link

edulop91 commented Aug 24, 2020

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

@edulop91 edulop91 added the enhancement New feature or request label Aug 24, 2020
@paddycarver paddycarver added the subsystem/observability Issues and feature requests related to observability (traces, logging, etc.) inside of providers. label Dec 17, 2020
@paddycarver
Copy link
Contributor

paddycarver commented Feb 5, 2021

We've opened #695 to pitch a proposal that I believe would enable this. We're very interested in feedback on that proposal, if people have any.

@bflad
Copy link
Member

bflad commented Jul 28, 2022

terraform-plugin-sdk version 2.20.0 now includes a terraform-plugin-log based http.Transport that includes a unique identifier for each HTTP transaction in the tf_http_trans_id structured logging field.

Additional details about this functionality can be found on the website documentation: https://www.terraform.io/plugin/sdkv2/logging/http-transport

@github-actions
Copy link

github-actions bot commented Aug 28, 2022

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request subsystem/observability Issues and feature requests related to observability (traces, logging, etc.) inside of providers.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants