-
Notifications
You must be signed in to change notification settings - Fork 94
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
Introduce some logging. #234
Conversation
79ab6bb
to
a0393d2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me -- using this branch with terraform-provider-corner acceptance testing is nicely populating the logs and receiving the terraform-plugin-go contextual information. We can adjust this as necessary going forward, but this is a good first iteration. 🚀
2021-12-13T14:18:10.598-0500 [TRACE] GRPCProvider.v6: ValidateResourceConfig
2021-12-13T14:18:10.598-0500 [TRACE] sdk.proto: Received request: tf_proto_version=6 tf_provider_addr=registry.terraform.io/hashicorp/framework tf_req_id=c51464da-de24-368d-18a9-d35d46a62795 tf_resource_type=framework_user tf_rpc=ValidateResourceConfig
2021-12-13T14:18:10.598-0500 [TRACE] sdk.proto: Calling downstream: tf_proto_version=6 tf_provider_addr=registry.terraform.io/hashicorp/framework tf_req_id=c51464da-de24-368d-18a9-d35d46a62795 tf_resource_type=framework_user tf_rpc=ValidateResourceConfig
2021-12-13T14:18:10.598-0500 [TRACE] sdk.proto: Called downstream: tf_proto_version=6 tf_provider_addr=registry.terraform.io/hashicorp/framework tf_req_id=c51464da-de24-368d-18a9-d35d46a62795 tf_resource_type=framework_user tf_rpc=ValidateResourceConfig
2021-12-13T14:18:10.598-0500 [TRACE] sdk.proto: Served request: tf_proto_version=6 tf_provider_addr=registry.terraform.io/hashicorp/framework tf_req_id=c51464da-de24-368d-18a9-d35d46a62795 tf_resource_type=framework_user tf_rpc=ValidateResourceConfig
2021-12-13T14:18:10.598-0500 [TRACE] GRPCProvider.v6: PlanResourceChange
2021-12-13T14:18:10.599-0500 [TRACE] sdk.proto: Received request: tf_proto_version=6 tf_provider_addr=registry.terraform.io/hashicorp/framework tf_req_id=23f980b6-6bc0-8950-0072-1d985a917858 tf_resource_type=framework_user tf_rpc=PlanResourceChange
2021-12-13T14:18:10.599-0500 [TRACE] sdk.proto: Calling downstream: tf_proto_version=6 tf_provider_addr=registry.terraform.io/hashicorp/framework tf_req_id=23f980b6-6bc0-8950-0072-1d985a917858 tf_resource_type=framework_user tf_rpc=PlanResourceChange
2021-12-13T14:18:10.599-0500 [TRACE] sdk: marking computed null values as unknown: tf_provider_addr=registry.terraform.io/hashicorp/framework tf_req_id=23f980b6-6bc0-8950-0072-1d985a917858 tf_resource_type=framework_user tf_rpc=PlanResourceChange
2021-12-13T14:18:10.599-0500 [DEBUG] sdk: marking computed attribute that is null in the config as unknown: tf_provider_addr=registry.terraform.io/hashicorp/framework tf_req_id=23f980b6-6bc0-8950-0072-1d985a917858 tf_resource_type=framework_user tf_rpc=PlanResourceChange path=AttributeName("date_joined")
2021-12-13T14:18:10.599-0500 [TRACE] sdk: attribute not null in config, not marking unknown: tf_provider_addr=registry.terraform.io/hashicorp/framework tf_req_id=23f980b6-6bc0-8950-0072-1d985a917858 tf_resource_type=framework_user tf_rpc=PlanResourceChange path=AttributeName("email")
2021-12-13T14:18:10.599-0500 [TRACE] sdk: attribute not null in config, not marking unknown: tf_provider_addr=registry.terraform.io/hashicorp/framework tf_req_id=23f980b6-6bc0-8950-0072-1d985a917858 tf_resource_type=framework_user tf_rpc=PlanResourceChange path=AttributeName("id")
2021-12-13T14:18:10.599-0500 [DEBUG] sdk: marking computed attribute that is null in the config as unknown: tf_provider_addr=registry.terraform.io/hashicorp/framework tf_req_id=23f980b6-6bc0-8950-0072-1d985a917858 tf_resource_type=framework_user tf_rpc=PlanResourceChange path=AttributeName("language")
2021-12-13T14:18:10.599-0500 [TRACE] sdk: attribute not null in config, not marking unknown: tf_provider_addr=registry.terraform.io/hashicorp/framework tf_req_id=23f980b6-6bc0-8950-0072-1d985a917858 tf_resource_type=framework_user tf_rpc=PlanResourceChange path=AttributeName("name")
2021-12-13T14:18:10.599-0500 [TRACE] sdk: attribute not null in config, not marking unknown: tf_provider_addr=registry.terraform.io/hashicorp/framework tf_req_id=23f980b6-6bc0-8950-0072-1d985a917858 tf_resource_type=framework_user tf_rpc=PlanResourceChange path=AttributeName("age")
2021-12-13T14:18:10.599-0500 [TRACE] sdk: at least one value was changed to unknown: tf_provider_addr=registry.terraform.io/hashicorp/framework tf_req_id=23f980b6-6bc0-8950-0072-1d985a917858 tf_resource_type=framework_user tf_rpc=PlanResourceChange
2021-12-13T14:18:10.599-0500 [TRACE] sdk.proto: Called downstream: tf_proto_version=6 tf_provider_addr=registry.terraform.io/hashicorp/framework tf_req_id=23f980b6-6bc0-8950-0072-1d985a917858 tf_resource_type=framework_user tf_rpc=PlanResourceChange
2021-12-13T14:18:10.599-0500 [TRACE] sdk.proto: Served request: tf_proto_version=6 tf_provider_addr=registry.terraform.io/hashicorp/framework tf_req_id=23f980b6-6bc0-8950-0072-1d985a917858 tf_resource_type=framework_user tf_rpc=PlanResourceChange
2021-12-13T14:18:10.599-0500 [TRACE] checkPlannedChange: Verifying that actual change (action Create) matches planned change (action Create)
2021-12-13T14:18:10.599-0500 [TRACE] readResourceInstanceState: reading state for framework_user.foo
2021-12-13T14:18:10.599-0500 [TRACE] readResourceInstanceState: no state present for framework_user.foo
2021-12-13T14:18:10.599-0500 [INFO] Starting apply for framework_user.foo
2021-12-13T14:18:10.599-0500 [DEBUG] framework_user.foo: applying the planned Create change
2021-12-13T14:18:10.599-0500 [TRACE] GRPCProvider.v6: ApplyResourceChange
2021-12-13T14:18:10.600-0500 [TRACE] sdk.proto: Received request: tf_proto_version=6 tf_provider_addr=registry.terraform.io/hashicorp/framework tf_req_id=2440e8c7-a199-c759-b6a9-5e6f6b48dc1e tf_resource_type=framework_user tf_rpc=ApplyResourceChange
2021-12-13T14:18:10.600-0500 [TRACE] sdk.proto: Calling downstream: tf_proto_version=6 tf_provider_addr=registry.terraform.io/hashicorp/framework tf_req_id=2440e8c7-a199-c759-b6a9-5e6f6b48dc1e tf_resource_type=framework_user tf_rpc=ApplyResourceChange
2021-12-13T14:18:10.600-0500 [TRACE] sdk: running create: tf_provider_addr=registry.terraform.io/hashicorp/framework tf_req_id=2440e8c7-a199-c759-b6a9-5e6f6b48dc1e tf_resource_type=framework_user tf_rpc=ApplyResourceChange
2021-12-13T14:18:10.600-0500 [TRACE] sdk.proto: Called downstream: tf_proto_version=6 tf_provider_addr=registry.terraform.io/hashicorp/framework tf_req_id=2440e8c7-a199-c759-b6a9-5e6f6b48dc1e tf_resource_type=framework_user tf_rpc=ApplyResourceChange
2021-12-13T14:18:10.600-0500 [TRACE] sdk.proto: Served request: tf_proto_version=6 tf_provider_addr=registry.terraform.io/hashicorp/framework tf_req_id=2440e8c7-a199-c759-b6a9-5e6f6b48dc1e tf_resource_type=framework_user tf_rpc=ApplyResourceChange
Start logging using tflog. This largely just inserts logging at decision points in the serve.go file of tfsdk, which is where the most invisible, impactful decisions are made. Over time, logging should be introduced in more places on an as-needed basis or as we touch those parts of the code. Fixes #63.
a0393d2
to
2fc6513
Compare
Happy with that changelog? |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
Start logging using tflog. This largely just inserts logging at decision
points in the serve.go file of tfsdk, which is where the most invisible,
impactful decisions are made. Over time, logging should be introduced in
more places on an as-needed basis or as we touch those parts of the
code.
Fixes #63.