Merge pull request #436 from maxisvest/fix_prometheus_condition_match

add dot for prometheus condition matches
pull/450/head
李金来 2 years ago committed by GitHub
commit 8efcec3da4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -31,7 +31,7 @@ public class PrometheusMonitorCondition implements Condition {
@Override @Override
public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) { public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
String collectType = context.getEnvironment().getProperty(BootstrapCoreProperties.PREFIX + "collect-type", ""); String collectType = context.getEnvironment().getProperty(BootstrapCoreProperties.PREFIX + ".collect-type", "");
return StringUtil.isNotEmpty(collectType) && collectType.contains(MonitorTypeEnum.PROMETHEUS.name().toLowerCase()) ? true : false; return StringUtil.isNotEmpty(collectType) && collectType.contains(MonitorTypeEnum.PROMETHEUS.name().toLowerCase()) ? true : false;
} }
} }

Loading…
Cancel
Save