hashicorp / hashicorp/terraform-plugin-sdk
Proposal: Standardize field names for HTTP Logging Transport
- Dominant language
- Go
- Stars
- 485
- Forks
- 244
- Avg merge
- 19h 57m
- Merged PRs (30d)
- 4
Description
The HTTP Logging Transport introduced in #1006 (and documented in #1011) is a great addition. However, the field names are not consistent.
For example, for certain request fields, the log field has a name in the format `tf_http_`, such as the requested URI is `tf_http_req_uri`, and the HTTP method is `tf_http_req_method`. However, most header fields are added as-is to the log fields, for example `Accept-Encoding` and `User-Agent`.
I propose using consistent log field naming, for example based on the [Semantic Conventions from OpenTelemetry](https://opentelemetry.io/docs/reference/specification/trace/semantic_conventions/http/).
This would use `http.method` for the request method and `http.url` for the requested URI. Headers are added using a consistent format: `http.[request|response].header.`, where `` is the normalized header name, in lower case, with `-` replaced with `_`. For example, `Accept-Encoding` would be `http.request.header.accept_encoding`.
Contributor guide
Research direction
Start by reading the HTTP Logging Transport introduced in #1006 and its documentation in #1011, then compare its current request, response, and header field names with the linked OpenTelemetry semantic conventions. Done means the transport uses a consistent naming scheme, including normalized request and response header fields, with the intended behavior documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100