Skip to content

Commit

Permalink
move http.request.original_method to trace attributes and make it con…
Browse files Browse the repository at this point in the history
…ditionally required
  • Loading branch information
lmolkova committed May 15, 2023
1 parent 0927441 commit c750799
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 0 additions & 6 deletions semantic_conventions/http-common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@ groups:
populate the exact method passed by client on `http.request.original_method` attribute.
HTTP method names are case-sensitive and `http.request.method` attribute value MUST match a standard (or documented elsewhere) HTTP method name exactly.
- id: request.original_method
type: string
requirement_level:
recommended: If and only if it's different than `http.request.method`.
brief: Original HTTP method sent by the client in the request line.
examples: ["GeT", "ACL", "foo"]
- id: response.status_code
type: int
requirement_level:
Expand Down
6 changes: 6 additions & 0 deletions semantic_conventions/trace/http.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ groups:
These conventions can be used for http and https schemes
and various HTTP versions like 1.1, 2 and SPDY.
attributes:
- id: request.original_method
type: string
requirement_level:
conditionally_required: If and only if it's different than `http.request.method`.
brief: Original HTTP method sent by the client in the request line.
examples: ["GeT", "ACL", "foo"]
- id: request.body.size
type: int
brief: >
Expand Down
2 changes: 1 addition & 1 deletion specification/trace/semantic_conventions/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ sections below.
<!-- semconv trace.http.common(full) -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `http.request.original_method` | string | Original HTTP method sent by the client in the request line. | `GeT`; `ACL`; `foo` | Recommended: [1] |
| `http.response.status_code` | int | [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). | `200` | Conditionally Required: If and only if one was received/sent. |
| `http.request.original_method` | string | Original HTTP method sent by the client in the request line. | `GeT`; `ACL`; `foo` | Conditionally Required: [1] |
| `http.request.body.size` | int | The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size. | `3495` | Recommended |
| `http.response.body.size` | int | The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size. | `3495` | Recommended |
| `http.request.method` | string | HTTP request method. [2] | `GET`; `POST`; `HEAD` | Required |
Expand Down

0 comments on commit c750799

Please sign in to comment.