Skip to content

Commit

Permalink
Make url.query conditionally required for HTTP spans (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
trask authored Jun 19, 2023
1 parent bef5a68 commit d31b014
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,5 @@ release.
([#55](https://github.com/open-telemetry/semantic-conventions/pull/55))
- Split out sections for proposed stable JVM metrics and experimental JVM metrics.
([#56](https://github.com/open-telemetry/semantic-conventions/pull/56))
- Make `url.query` conditionally required for HTTP spans.
([#118](https://github.com/open-telemetry/semantic-conventions/pull/118))
2 changes: 2 additions & 0 deletions semantic_conventions/trace/http.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ groups:
requirement_level: required
sampling_relevant: true
- ref: url.query
requirement_level:
conditionally_required: If and only if one was received/sent.
sampling_relevant: true
- ref: url.scheme
sampling_relevant: true
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 @@ -298,7 +298,7 @@ If the route cannot be determined, the `name` attribute MUST be set as defined i
| [`server.socket.address`](span-general.md) | string | Local socket address. Useful in case of a multi-IP host. | `10.5.3.2` | Opt-In |
| [`server.socket.port`](span-general.md) | int | Local socket port. Useful in case of a multi-port host. | `16456` | Opt-In |
| `url.path` | string | The [URI path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component [7] | `/search` | Required |
| `url.query` | string | The [URI query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component [8] | `q=OpenTelemetry` | Recommended |
| `url.query` | string | The [URI query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component [8] | `q=OpenTelemetry` | Conditionally Required: If and only if one was received/sent. |
| `url.scheme` | string | The [URI scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component identifying the used protocol. | `http`; `https` | Required |

**[1]:** MUST NOT be populated when this is not supported by the HTTP server framework as the route attribute should have low-cardinality and the URI path can NOT substitute it.
Expand Down

0 comments on commit d31b014

Please sign in to comment.