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

Proposal: Standardize field names for HTTP Logging Transport #1114

Open
gdavison opened this issue Dec 7, 2022 · 0 comments
Open

Proposal: Standardize field names for HTTP Logging Transport #1114

gdavison opened this issue Dec 7, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@gdavison
Copy link
Contributor

gdavison commented Dec 7, 2022

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_<field>, 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.

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.<key>, where <key> is the normalized header name, in lower case, with - replaced with _. For example, Accept-Encoding would be http.request.header.accept_encoding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant