-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add attribute_group type to share attributes across signals (#124)
Fixes #123 Co-authored-by: Armin Ruech <[email protected]>
- Loading branch information
Showing
8 changed files
with
67 additions
and
5 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
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
33 changes: 33 additions & 0 deletions
33
semantic-conventions/src/tests/data/markdown/attribute_group/attribute_group.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,33 @@ | ||
groups: | ||
- id: attributes | ||
prefix: "foo" | ||
type: attribute_group | ||
brief: Attribute group | ||
attributes: | ||
- id: bar | ||
type: string | ||
requirement_level: | ||
recommended: if available | ||
brief: Attribute 1 | ||
examples: ['baz'] | ||
|
||
- id: derived_attributes | ||
type: attribute_group | ||
extends: attributes | ||
prefix: "foo" | ||
brief: Derived attribute group | ||
attributes: | ||
- id: qux | ||
type: int | ||
requirement_level: | ||
conditionally_required: if available | ||
brief: Attribute 2 | ||
examples: [42] | ||
|
||
- id: span_attribute_group | ||
prefix: "" | ||
type: span | ||
brief: A span | ||
attributes: | ||
- ref: foo.bar | ||
- ref: foo.qux |
8 changes: 8 additions & 0 deletions
8
semantic-conventions/src/tests/data/markdown/attribute_group/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,8 @@ | ||
# Attribute Group Example | ||
|
||
<!-- semconv span_attribute_group --> | ||
| Attribute | Type | Description | Examples | Requirement Level | | ||
|---|---|---|---|---| | ||
| `foo.bar` | string | Attribute 1 | `baz` | Recommended: if available | | ||
| `foo.qux` | int | Attribute 2 | `42` | Conditionally Required: if available | | ||
<!-- endsemconv --> |
4 changes: 4 additions & 0 deletions
4
semantic-conventions/src/tests/data/markdown/attribute_group/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,4 @@ | ||
# Attribute Group Example | ||
|
||
<!-- semconv span_attribute_group --> | ||
<!-- endsemconv --> |
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