terraform-plugin-log version
Relevant provider source code
Noticed with tfsdklog usage of protocol logging, may also happen with tfsdk usage.
Expected Behavior
Log entries should not extraneously contain the EXTRA_VALUE_AT_END key, which is injected by hc-log when it detects unpaired (key without value) With usage, unless there is in fact an unpaired thing.
Actual Behavior
Entries such as:
{
"@caller": "/Users/bflad/go/pkg/mod/github.com/hashicorp/terraform-plugin-go@v0.7.0/internal/logging/protocol.go:21",
"@level": "trace",
"@message": "Received request",
"@module": "sdk.proto",
"@timestamp": "2022-02-04T16:28:52.602080-05:00",
"EXTRA_VALUE_AT_END": null,
"tf_proto_version": "5.2",
"tf_provider_addr": "",
"tf_req_id": "a24b8a29-628a-01c2-0516-08b260627109",
"tf_rpc": "GetProviderSchema"
}
This could be caused by a bug in hc-log, a bug in this Go module, or buggy SDK/provider logger implementations. Let's rule out the first two. 😄
Steps to Reproduce
TF_LOG_SDK_PROTO=trace terraform apply from a provider using terraform-plugin-go@v0.7.0.
terraform-plugin-log version
Relevant provider source code
Noticed with
tfsdklogusage of protocol logging, may also happen withtfsdkusage.Expected Behavior
Log entries should not extraneously contain the
EXTRA_VALUE_AT_ENDkey, which is injected byhc-logwhen it detects unpaired (key without value)Withusage, unless there is in fact an unpaired thing.Actual Behavior
Entries such as:
{ "@caller": "/Users/bflad/go/pkg/mod/github.com/hashicorp/terraform-plugin-go@v0.7.0/internal/logging/protocol.go:21", "@level": "trace", "@message": "Received request", "@module": "sdk.proto", "@timestamp": "2022-02-04T16:28:52.602080-05:00", "EXTRA_VALUE_AT_END": null, "tf_proto_version": "5.2", "tf_provider_addr": "", "tf_req_id": "a24b8a29-628a-01c2-0516-08b260627109", "tf_rpc": "GetProviderSchema" }This could be caused by a bug in
hc-log, a bug in this Go module, or buggy SDK/provider logger implementations. Let's rule out the first two. 😄Steps to Reproduce
TF_LOG_SDK_PROTO=trace terraform applyfrom a provider using terraform-plugin-go@v0.7.0.