Skip to content

Commit 9f47ef6

Browse files
committed
JavaDoc update
1 parent 0bf10f5 commit 9f47ef6

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

jmx-scraper/src/integrationTest/java/io/opentelemetry/contrib/jmxscraper/assertions/DataPointAttributes.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,20 @@ public class DataPointAttributes {
1717
private DataPointAttributes() {}
1818

1919
/**
20-
* Create instance of matcher that will be used to check if data point attribute with given name
21-
* has provided value.
20+
* Create instance of matcher that should be used to check if data point attribute with given name
21+
* has value identical to the one provided as a parameter (exact match).
2222
*
2323
* @param name name of the data point attribute to check
24-
* @param value expected value of data point attribute
24+
* @param value expected value of checked data point attribute
2525
* @return instance of matcher
2626
*/
2727
public static AttributeMatcher attribute(String name, String value) {
2828
return new AttributeMatcher(name, value);
2929
}
3030

3131
/**
32-
* Create instance of matcher that will be used to check if data point attribute with given name
33-
* exists. Any value of the attribute is considered as matching.
32+
* Create instance of matcher that should be used to check if data point attribute with given name
33+
* exists. Any value of the attribute is considered as matching (any value match).
3434
*
3535
* @param name name of the data point attribute to check
3636
* @return instance of matcher
@@ -40,14 +40,14 @@ public static AttributeMatcher attributeWithAnyValue(String name) {
4040
}
4141

4242
/**
43-
* Create a set of attribute matchers that will be used to verify set of data point attributes.
43+
* Create a set of attribute matchers that should be used to verify set of data point attributes.
4444
*
4545
* @param attributes list of matchers to create set. It must contain matchers with unique names.
4646
* @return set of unique attribute matchers
4747
* @throws IllegalArgumentException if provided list contains two or more matchers with the same
4848
* name.
4949
* @see MetricAssert#hasDataPointsWithAttributes(Set[]) for detailed description of the algorithm
50-
* of matching
50+
* used for matching
5151
*/
5252
public static Set<AttributeMatcher> attributeSet(AttributeMatcher... attributes) {
5353
Set<AttributeMatcher> matcherSet = Arrays.stream(attributes).collect(Collectors.toSet());

jmx-scraper/src/integrationTest/java/io/opentelemetry/contrib/jmxscraper/assertions/MetricAssert.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -245,10 +245,11 @@ public final MetricAssert hasDataPointsWithOneAttribute(AttributeMatcher expecte
245245
}
246246

247247
/**
248-
* Verifies that every data point attributes set is matched exactly by one of the matcher sets provided.
249-
* Also, each matcher set must match at least one data point attributes set.
250-
* Data point attributes set is matched by matcher set if each attribute is matched by one matcher and
251-
* each matcher matches one attribute.
248+
* Verifies that every data point attributes set is matched exactly by one of the matcher sets
249+
* provided. Also, each matcher set must match at least one data point attributes set. Data point
250+
* attributes set is matched by matcher set if each attribute is matched by one matcher and each
251+
* matcher matches one attribute. In other words: number of attributes is the same as number of
252+
* matchers and there is 1:1 matching between them.
252253
*
253254
* @param attributeMatchers array of attribute matcher sets
254255
* @return this

0 commit comments

Comments
 (0)