Skip to content

Commit

Permalink
Clarify purpose of boolean_attr2
Browse files Browse the repository at this point in the history
  • Loading branch information
jade-guiton-dd committed Sep 16, 2024
1 parent 08f8486 commit 4d9f1d6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/mdatagen/internal/samplereceiver/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ metrics:
| ---- | ----------- | ------ |
| string_attr | Attribute with any string value. | Any Str |
| boolean_attr | Attribute with a boolean value. | Any Bool |
| boolean_attr2 | Another boolean attribute, with a different test value. | Any Bool |
| boolean_attr2 | Another attribute with a boolean value. | Any Bool |
### optional.metric.empty_unit
Expand Down
4 changes: 3 additions & 1 deletion cmd/mdatagen/internal/samplereceiver/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,10 @@ attributes:
description: Attribute with a boolean value.
type: bool

# This 2nd boolean attribute allows us to test both values for boolean attributes,
# as test values are based on the parity of the attribute name length.
boolean_attr2:
description: Another boolean attribute, with a different test value.
description: Another attribute with a boolean value.
type: bool

slice_attr:
Expand Down
2 changes: 1 addition & 1 deletion cmd/mdatagen/loader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func TestLoadMetadata(t *testing.T) {
FullName: "boolean_attr",
},
"boolean_attr2": {
Description: "Another boolean attribute, with a different test value.",
Description: "Another attribute with a boolean value.",
Type: ValueType{
ValueType: pcommon.ValueTypeBool,
},
Expand Down

0 comments on commit 4d9f1d6

Please sign in to comment.