mrproliu commented on a change in pull request #6176:
URL: https://github.com/apache/skywalking/pull/6176#discussion_r571588976
##########
File path:
oap-server/analyzer/meter-analyzer/src/main/java/org/apache/skywalking/oap/meter/analyzer/dsl/Expression.java
##########
@@ -105,12 +106,11 @@ public SampleFamily propertyMissing(String metricName) {
return SampleFamily.EMPTY;
}
if (sampleFamilies.containsKey(metricName)) {
+ ExpressionParsingContext.get().ifPresent(ctx ->
ctx.samples.add(metricName));
return sampleFamilies.get(metricName);
}
- if (!ExpressionParsingContext.get().isPresent()) {
- log.warn("{} referred by \"{}\" doesn't exist in {}",
metricName, literal, sampleFamilies.keySet());
- }
- return SampleFamily.EMPTY;
+ // Using finder, support "."
+ return new SampleFamilyFinder(metricName, literal,
sampleFamilies);
Review comment:
If there no property(not the method) found, it will append `"." +
propertyName` to the meter name and trying to find.
If the method not found, it will same as the `SampleFamily`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]