Skip to content

Investigate EXTRA_VALUE_AT_END Key Appearing in Various Log Entries #30

@bflad

Description

@bflad

terraform-plugin-log version

v0.2.1

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions