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

internal/logging: Add missing AdditionalLocationOffset for protocol logging #179

Merged
merged 2 commits into from Apr 12, 2022

Conversation

bflad
Copy link
Member

@bflad bflad commented Apr 12, 2022

Previously (note @caller):

2022-04-12T11:11:25.684-0400 [TRACE] provider.terraform-provider-aws: Received request: @caller=/Users/bflad/go/pkg/mod/github.com/hashicorp/terraform-plugin-go@v0.8.0/internal/logging/protocol.go:21 @module=sdk.proto tf_rpc=GetProviderSchema tf_proto_version=5.2 tf_provider_addr=provider tf_req_id=0c818104-0f9d-2bb3-1fa5-998a35ecae3e timestamp=2022-04-12T11:11:25.684-0400
2022-04-12T11:11:25.684-0400 [TRACE] provider.terraform-provider-aws: Calling downstream: tf_rpc=GetProviderSchema @caller=/Users/bflad/go/pkg/mod/github.com/hashicorp/terraform-plugin-go@v0.8.0/internal/logging/protocol.go:21 @module=sdk.proto tf_provider_addr=provider tf_req_id=0c818104-0f9d-2bb3-1fa5-998a35ecae3e tf_proto_version=5.2 timestamp=2022-04-12T11:11:25.684-0400

Now:

2022-04-12T11:32:32.867-0400 [TRACE] provider.terraform-provider-aws: Received request: @module=sdk.proto tf_req_id=89b3ee71-db56-42cb-75ce-3cfd6cd50589 tf_rpc=GetProviderSchema @caller=/Users/bflad/src/github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server/server.go:490 tf_proto_version=5.2 tf_provider_addr=provider timestamp=2022-04-12T11:32:32.867-0400
2022-04-12T11:32:32.867-0400 [TRACE] provider.terraform-provider-aws: Calling downstream: @caller=/Users/bflad/src/github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server/server.go:497 tf_proto_version=5.2 tf_req_id=89b3ee71-db56-42cb-75ce-3cfd6cd50589 tf_rpc=GetProviderSchema @module=sdk.proto tf_provider_addr=provider timestamp=2022-04-12T11:32:32.867-0400

…ogging

Previously (note `@caller`):

```
2022-04-12T11:11:25.684-0400 [TRACE] provider.terraform-provider-aws: Received request: @caller=/Users/bflad/go/pkg/mod/github.com/hashicorp/terraform-plugin-go@v0.8.0/internal/logging/protocol.go:21 @module=sdk.proto tf_rpc=GetProviderSchema tf_proto_version=5.2 tf_provider_addr=provider tf_req_id=0c818104-0f9d-2bb3-1fa5-998a35ecae3e timestamp=2022-04-12T11:11:25.684-0400
2022-04-12T11:11:25.684-0400 [TRACE] provider.terraform-provider-aws: Calling downstream: tf_rpc=GetProviderSchema @caller=/Users/bflad/go/pkg/mod/github.com/hashicorp/terraform-plugin-go@v0.8.0/internal/logging/protocol.go:21 @module=sdk.proto tf_provider_addr=provider tf_req_id=0c818104-0f9d-2bb3-1fa5-998a35ecae3e tf_proto_version=5.2 timestamp=2022-04-12T11:11:25.684-0400
```

Now:

```
2022-04-12T11:32:32.867-0400 [TRACE] provider.terraform-provider-aws: Received request: @module=sdk.proto tf_req_id=89b3ee71-db56-42cb-75ce-3cfd6cd50589 tf_rpc=GetProviderSchema @caller=/Users/bflad/src/github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server/server.go:490 tf_proto_version=5.2 tf_provider_addr=provider timestamp=2022-04-12T11:32:32.867-0400
2022-04-12T11:32:32.867-0400 [TRACE] provider.terraform-provider-aws: Calling downstream: @caller=/Users/bflad/src/github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server/server.go:497 tf_proto_version=5.2 tf_req_id=89b3ee71-db56-42cb-75ce-3cfd6cd50589 tf_rpc=GetProviderSchema @module=sdk.proto tf_provider_addr=provider timestamp=2022-04-12T11:32:32.867-0400
```
@bflad bflad added the bug Something isn't working label Apr 12, 2022
@bflad bflad added this to the v0.9.0 milestone Apr 12, 2022
@bflad bflad requested a review from a team as a code owner April 12, 2022 15:37
@bflad bflad merged commit 9734c12 into main Apr 12, 2022
@bflad bflad deleted the bflad-protocol-log-caller branch April 12, 2022 17:57
bflad added a commit to hashicorp/terraform-plugin-sdk that referenced this pull request Apr 12, 2022
…ccurately reflects calling code location

Reference: hashicorp/terraform-plugin-go#179

Previously:

```
2022-04-12T11:11:26.086-0400 [TRACE] provider.terraform-provider-aws: Found data source type: @caller=/Users/bflad/src/github.com/hashicorp/terraform-plugin-sdk/internal/logging/helper_schema.go:21 @module=sdk.helper_schema tf_data_source_type=aws_connect_bot_association timestamp=2022-04-12T11:11:25.917-0400
2022-04-12T11:11:26.086-0400 [TRACE] provider.terraform-provider-aws: Found data source type: @caller=/Users/bflad/src/github.com/hashicorp/terraform-plugin-sdk/internal/logging/helper_schema.go:21 @module=sdk.helper_schema tf_data_source_type=aws_datapipeline_pipeline timestamp=2022-04-12T11:11:25.917-0400
```

Now:

```
2022-04-12T14:54:22.571-0400 [TRACE] provider.terraform-provider-aws: Found data source type: @module=sdk.helper_schema tf_data_source_type=aws_connect_bot_association @caller=/Users/bflad/src/github.com/hashicorp/terraform-plugin-sdk/helper/schema/grpc_provider.go:95 timestamp=2022-04-12T14:54:22.571-0400
2022-04-12T14:54:22.574-0400 [TRACE] provider.terraform-provider-aws: Found data source type: @module=sdk.helper_schema tf_data_source_type=aws_datapipeline_pipeline @caller=/Users/bflad/src/github.com/hashicorp/terraform-plugin-sdk/helper/schema/grpc_provider.go:95 timestamp=2022-04-12T14:54:22.574-0400
```
bflad added a commit to hashicorp/terraform-plugin-sdk that referenced this pull request Apr 14, 2022
…ccurately reflects calling code location (#939)

Reference: hashicorp/terraform-plugin-go#179

Previously:

```
2022-04-12T11:11:26.086-0400 [TRACE] provider.terraform-provider-aws: Found data source type: @caller=/Users/bflad/src/github.com/hashicorp/terraform-plugin-sdk/internal/logging/helper_schema.go:21 @module=sdk.helper_schema tf_data_source_type=aws_connect_bot_association timestamp=2022-04-12T11:11:25.917-0400
2022-04-12T11:11:26.086-0400 [TRACE] provider.terraform-provider-aws: Found data source type: @caller=/Users/bflad/src/github.com/hashicorp/terraform-plugin-sdk/internal/logging/helper_schema.go:21 @module=sdk.helper_schema tf_data_source_type=aws_datapipeline_pipeline timestamp=2022-04-12T11:11:25.917-0400
```

Now:

```
2022-04-12T14:54:22.571-0400 [TRACE] provider.terraform-provider-aws: Found data source type: @module=sdk.helper_schema tf_data_source_type=aws_connect_bot_association @caller=/Users/bflad/src/github.com/hashicorp/terraform-plugin-sdk/helper/schema/grpc_provider.go:95 timestamp=2022-04-12T14:54:22.571-0400
2022-04-12T14:54:22.574-0400 [TRACE] provider.terraform-provider-aws: Found data source type: @module=sdk.helper_schema tf_data_source_type=aws_datapipeline_pipeline @caller=/Users/bflad/src/github.com/hashicorp/terraform-plugin-sdk/helper/schema/grpc_provider.go:95 timestamp=2022-04-12T14:54:22.574-0400
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants