-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Link request and response in DEBUG output #5277
Comments
@debakkerb We don't have a way to correlate the request/response as of now. We have to search the logs for the API request made and response received |
Woops, I wrote a big reply and all of a sudden I noticed that this was a different ticket :). I don't have the code anymore unfortunately, but I'm not really looking to troubleshoot this particular issue (has already been solved). It's a more generic question, how can you link both REQUEST and RESPONSE in the TRACE output, as it's almost impossible to figure out which request exactly failed. |
Unfortunately we just don't have that ability right now :-/ I think it could be solved by printing a random number in the logs for each request/response pair, but that logic actually lives in the SDK at https://github.com/hashicorp/terraform-plugin-sdk/blob/master/helper/logging/transport.go. If it's something you're interested in, I'd recommend filing an issue or PR against that repo. |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
I've probably been staring at this for way too long, but how can you link a REQUEST and RESPONSE in the output logs, when log level is set to DEBUG?
For some reason my config is failing, but the only feedback I'm getting is the following:
Error reading Organization policy for organizations/ORG_ID: googleapi: Error 400: Request contains an invalid argument., badRequest
I set the log level to TRACE and DEBUG, and I can see this in the logs:
This is all great, but how can I figure out which request has failed?
The text was updated successfully, but these errors were encountered: