-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Inherit overridden attribute properties (#204)
Co-authored-by: Christian Neumüller <christian+github@neumueller.me>
- Loading branch information
Showing
8 changed files
with
117 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
semantic-conventions/src/tests/data/markdown/ref_extends/expected.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Spans | ||
|
||
<!-- semconv http.client.spans(full) --> | ||
| Attribute | Type | Description | Examples | Requirement Level | | ||
|---|---|---|---|---| | ||
| [`server.address`](input_server.md) | string | Server component of Host header. (overridden brief) [1] | `foo.io` | Required | | ||
|
||
**[1]:** Note on the overridden attribute definition. | ||
|
||
Following attributes MUST be provided **at span creation time** (when provided at all), so they can be considered for sampling decisions: | ||
|
||
* [`server.address`](input_server.md) | ||
<!-- endsemconv --> | ||
|
||
# Metrics | ||
|
||
<!-- semconv http.client.request.duration.metric(metric_table) --> | ||
| Name | Instrument Type | Unit (UCUM) | Description | | ||
| -------- | --------------- | ----------- | -------------- | | ||
| `http.client.request.duration` | Histogram | `s` | Measures request duration. | | ||
<!-- endsemconv --> | ||
|
||
<!-- semconv http.client.request.duration.metric(full) --> | ||
| Attribute | Type | Description | Examples | Requirement Level | | ||
|---|---|---|---|---| | ||
| [`server.address`](input_server.md) | string | Server component of Host header. (overridden brief) [1] | `foo.io` | Required | | ||
|
||
**[1]:** Note on the overridden attribute definition. | ||
<!-- endsemconv --> |
26 changes: 26 additions & 0 deletions
26
semantic-conventions/src/tests/data/markdown/ref_extends/http.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
groups: | ||
- id: http.client.attributes | ||
type: attribute_group | ||
brief: 'This document defines semantic conventions for HTTP client attributes.' | ||
attributes: | ||
- ref: server.address | ||
requirement_level: required | ||
brief: 'Server component of Host header. (overridden brief)' | ||
note: 'Note on the overridden attribute definition.' | ||
examples: ['foo.io'] | ||
|
||
- id: http.client.spans | ||
type: span | ||
brief: 'This document defines semantic conventions for HTTP client Spans.' | ||
extends: http.client.attributes | ||
attributes: | ||
- ref: server.address | ||
sampling_relevant: true | ||
|
||
- id: http.client.request.duration.metric | ||
type: metric | ||
metric_name: http.client.request.duration | ||
brief: "Measures request duration." | ||
instrument: histogram | ||
unit: "s" | ||
extends: http.client.attributes |
12 changes: 12 additions & 0 deletions
12
semantic-conventions/src/tests/data/markdown/ref_extends/input.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Spans | ||
|
||
<!-- semconv http.client.spans(full) --> | ||
<!-- endsemconv --> | ||
|
||
# Metrics | ||
|
||
<!-- semconv http.client.request.duration.metric(metric_table) --> | ||
<!-- endsemconv --> | ||
|
||
<!-- semconv http.client.request.duration.metric(full) --> | ||
<!-- endsemconv --> |
4 changes: 4 additions & 0 deletions
4
semantic-conventions/src/tests/data/markdown/ref_extends/input_server.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# General | ||
|
||
<!-- semconv server --> | ||
<!-- endsemconv --> |
11 changes: 11 additions & 0 deletions
11
semantic-conventions/src/tests/data/markdown/ref_extends/server.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
groups: | ||
- id: server | ||
type: attribute_group | ||
prefix: server | ||
brief: 'This document defines semantic conventions for common server attributes.' | ||
attributes: | ||
- id: address | ||
type: string | ||
brief: 'Domain name. (original brief)' | ||
examples: 'foo' | ||
note: 'Note on the original attribute definition.' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters