wu-sheng commented on a change in pull request #6176:
URL: https://github.com/apache/skywalking/pull/6176#discussion_r571609892
##########
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:
Take a look how Prometheus metrics family did. All `.`s are replaced by
`_` before the MAL engine.
----------------------------------------------------------------
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]