Giter VIP home page Giter VIP logo

sofa-lookout's People

Contributors

caojie09 avatar chpengzh avatar cp3fantasy avatar duan-0916 avatar fengjiachun avatar guanchao-yang avatar khotyn avatar luyiisme avatar taobaorun avatar xzchaoo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sofa-lookout's Issues

lookout-sofa-boot-start fail to add metric observers to lookoutRegistry

Describe the bug

if a metric observer bean is defined ,but it does not work!
lookout-sofa-boot-start fail to add metric observers to lookoutRegistry.

Expected behavior

the metric observer bean works;

Actual behavior

fail to add metric observer

Steps to reproduce

use lookout-sofa-boot-start ,and define a metricObserver bean. the observer does not work.

Minimal yet complete reproducer code (or GitHub URL to code)

Environment

  • SOFA Lookout version: 1.4.0
  • JVM version (e.g. java -version): 1.8.0_25
  • OS version (e.g. uname -a): Darwin 17.5.0
  • Maven version: 3.2.5
  • IDE version: idea community 2018.1

The exception message is not clear when spring.application.name is absent in application.properties

Describe the bug

The exception message is not clear when spring.application.name is absent in application.properties

Expected behavior

The exception message should clearly reflect that spring.application.name is absent in application.properties

Actual behavior

/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/bin/java -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=50618 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=127.0.0.1 -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true "-javaagent:/Users/khotyn/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/182.2757.3/IntelliJ IDEA 2018.2 EAP.app/Contents/lib/idea_rt.jar=50619:/Users/khotyn/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/182.2757.3/IntelliJ IDEA 2018.2 EAP.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/javaws.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/jfxswt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/plugin.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/lib/packager.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/lib/tools.jar:/Users/khotyn/Desktop/demo/target/classes:/Users/khotyn/.m2/repository/org/springframework/boot/spring-boot-starter/1.4.2.RELEASE/spring-boot-starter-1.4.2.RELEASE.jar:/Users/khotyn/.m2/repository/org/springframework/boot/spring-boot/1.4.2.RELEASE/spring-boot-1.4.2.RELEASE.jar:/Users/khotyn/.m2/repository/org/springframework/spring-context/4.3.4.RELEASE/spring-context-4.3.4.RELEASE.jar:/Users/khotyn/.m2/repository/org/springframework/spring-aop/4.3.4.RELEASE/spring-aop-4.3.4.RELEASE.jar:/Users/khotyn/.m2/repository/org/springframework/spring-beans/4.3.4.RELEASE/spring-beans-4.3.4.RELEASE.jar:/Users/khotyn/.m2/repository/org/springframework/spring-expression/4.3.4.RELEASE/spring-expression-4.3.4.RELEASE.jar:/Users/khotyn/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/1.4.2.RELEASE/spring-boot-autoconfigure-1.4.2.RELEASE.jar:/Users/khotyn/.m2/repository/org/springframework/boot/spring-boot-starter-logging/1.4.2.RELEASE/spring-boot-starter-logging-1.4.2.RELEASE.jar:/Users/khotyn/.m2/repository/ch/qos/logback/logback-classic/1.1.7/logback-classic-1.1.7.jar:/Users/khotyn/.m2/repository/ch/qos/logback/logback-core/1.1.7/logback-core-1.1.7.jar:/Users/khotyn/.m2/repository/org/slf4j/jcl-over-slf4j/1.7.21/jcl-over-slf4j-1.7.21.jar:/Users/khotyn/.m2/repository/org/slf4j/jul-to-slf4j/1.7.21/jul-to-slf4j-1.7.21.jar:/Users/khotyn/.m2/repository/org/slf4j/log4j-over-slf4j/1.7.21/log4j-over-slf4j-1.7.21.jar:/Users/khotyn/.m2/repository/org/springframework/spring-core/4.3.4.RELEASE/spring-core-4.3.4.RELEASE.jar:/Users/khotyn/.m2/repository/org/yaml/snakeyaml/1.17/snakeyaml-1.17.jar:/Users/khotyn/.m2/repository/com/alipay/sofa/lookout/lookout-sofa-boot-starter/1.4.0/lookout-sofa-boot-starter-1.4.0.jar:/Users/khotyn/.m2/repository/com/alipay/sofa/lookout/lookout-client/1.4.0/lookout-client-1.4.0.jar:/Users/khotyn/.m2/repository/com/alipay/sofa/lookout/lookout-ext-jvm/1.4.0/lookout-ext-jvm-1.4.0.jar:/Users/khotyn/.m2/repository/com/alipay/sofa/lookout/lookout-ext-os/1.4.0/lookout-ext-os-1.4.0.jar:/Users/khotyn/.m2/repository/com/alipay/sofa/lookout/lookout-common/1.4.0/lookout-common-1.4.0.jar:/Users/khotyn/.m2/repository/com/alipay/sofa/lookout/lookout-api/1.4.0/lookout-api-1.4.0.jar:/Users/khotyn/.m2/repository/com/alipay/sofa/common/sofa-common-tools/1.0.12/sofa-common-tools-1.0.12.jar:/Users/khotyn/.m2/repository/commons-io/commons-io/2.5/commons-io-2.5.jar:/Users/khotyn/.m2/repository/com/alipay/sofa/lookout/lookout-reg-server/1.4.0/lookout-reg-server-1.4.0.jar:/Users/khotyn/.m2/repository/com/alipay/sofa/lookout/lookout-core/1.4.0/lookout-core-1.4.0.jar:/Users/khotyn/.m2/repository/com/alibaba/fastjson/1.2.47/fastjson-1.2.47.jar:/Users/khotyn/.m2/repository/org/apache/commons/commons-configuration2/2.1.1/commons-configuration2-2.1.1.jar:/Users/khotyn/.m2/repository/org/apache/commons/commons-lang3/3.3.2/commons-lang3-3.3.2.jar:/Users/khotyn/.m2/repository/commons-logging/commons-logging/1.2/commons-logging-1.2.jar:/Users/khotyn/.m2/repository/com/google/guava/guava/18.0/guava-18.0.jar:/Users/khotyn/.m2/repository/org/xerial/snappy/snappy-java/1.1.2.6/snappy-java-1.1.2.6.jar:/Users/khotyn/.m2/repository/org/apache/httpcomponents/httpclient/4.5.2/httpclient-4.5.2.jar:/Users/khotyn/.m2/repository/org/apache/httpcomponents/httpcore/4.4.5/httpcore-4.4.5.jar:/Users/khotyn/.m2/repository/commons-codec/commons-codec/1.10/commons-codec-1.10.jar:/Users/khotyn/.m2/repository/commons-lang/commons-lang/2.3/commons-lang-2.3.jar:/Users/khotyn/.m2/repository/io/dropwizard/metrics/metrics-core/3.1.2/metrics-core-3.1.2.jar:/Users/khotyn/.m2/repository/org/slf4j/slf4j-api/1.7.21/slf4j-api-1.7.21.jar:/Users/khotyn/.m2/repository/org/springframework/boot/spring-boot-starter-actuator/1.4.2.RELEASE/spring-boot-starter-actuator-1.4.2.RELEASE.jar:/Users/khotyn/.m2/repository/org/springframework/boot/spring-boot-actuator/1.4.2.RELEASE/spring-boot-actuator-1.4.2.RELEASE.jar:/Users/khotyn/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.8.4/jackson-databind-2.8.4.jar:/Users/khotyn/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.8.4/jackson-annotations-2.8.4.jar:/Users/khotyn/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.8.4/jackson-core-2.8.4.jar com.example.demo.DemoApplication
objc[54348]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/bin/java (0x10e6a84c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x10e7344e0). One of the two will be used. Which one is undefined.

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.4.2.RELEASE)

2018-06-05 12:09:57.962  INFO 54348 --- [           main] com.example.demo.DemoApplication         : Starting DemoApplication on MacBook-Pro-4.local with PID 54348 (/Users/khotyn/Desktop/demo/target/classes started by khotyn in /Users/khotyn/Desktop/demo)
2018-06-05 12:09:57.964  INFO 54348 --- [           main] com.example.demo.DemoApplication         : No active profile set, falling back to default profiles: default
2018-06-05 12:09:57.994  INFO 54348 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@5dd6264: startup date [Tue Jun 05 12:09:57 CST 2018]; root of context hierarchy
Sofa-Middleware-Log SLF4J : Logger Space:{com.alipay.lookout} init ok.
2018-06-05 12:09:58.592  INFO 54348 --- [           main] com.alipay.sofa.common.log               : Sofa-Middleware-Log SLF4J : Logger Space:{com.alipay.lookout} init ok.
Sofa-Middleware-Log SLF4J : Actual binding is of type [ com.alipay.lookout Logback ]
2018-06-05 12:09:58.593  INFO 54348 --- [           main] com.alipay.sofa.common.log               : Sofa-Middleware-Log SLF4J : Actual binding is of type [ com.alipay.lookout Logback ]
2018-06-05 12:09:58.671  WARN 54348 --- [           main] s.c.a.AnnotationConfigApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'demoApplication': Unsatisfied dependency expressed through field 'registry'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'registry' defined in class path resource [com/alipay/lookout/starter/autoConfiguration/LookoutAutoConfiguration.class]: Unsatisfied dependency expressed through method 'registry' parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'lookoutConfig' defined in class path resource [com/alipay/lookout/starter/autoConfiguration/LookoutAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.alipay.lookout.core.config.LookoutConfig]: Factory method 'lookoutConfig' threw exception; nested exception is java.lang.IllegalArgumentException: [Assertion failed] - this argument is required; it must not be null
2018-06-05 12:09:58.679  INFO 54348 --- [           main] utoConfigurationReportLoggingInitializer : 

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2018-06-05 12:09:58.690 ERROR 54348 --- [           main] o.s.boot.SpringApplication               : Application startup failed

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'demoApplication': Unsatisfied dependency expressed through field 'registry'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'registry' defined in class path resource [com/alipay/lookout/starter/autoConfiguration/LookoutAutoConfiguration.class]: Unsatisfied dependency expressed through method 'registry' parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'lookoutConfig' defined in class path resource [com/alipay/lookout/starter/autoConfiguration/LookoutAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.alipay.lookout.core.config.LookoutConfig]: Factory method 'lookoutConfig' threw exception; nested exception is java.lang.IllegalArgumentException: [Assertion failed] - this argument is required; it must not be null
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:592) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:370) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1219) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:754) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866) ~[spring-context-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542) ~[spring-context-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761) [spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:371) [spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1186) [spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1175) [spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE]
	at com.example.demo.DemoApplication.main(DemoApplication.java:27) [classes/:na]
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'registry' defined in class path resource [com/alipay/lookout/starter/autoConfiguration/LookoutAutoConfiguration.class]: Unsatisfied dependency expressed through method 'registry' parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'lookoutConfig' defined in class path resource [com/alipay/lookout/starter/autoConfiguration/LookoutAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.alipay.lookout.core.config.LookoutConfig]: Factory method 'lookoutConfig' threw exception; nested exception is java.lang.IllegalArgumentException: [Assertion failed] - this argument is required; it must not be null
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:467) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1128) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1022) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:512) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:207) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1131) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1059) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:589) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	... 18 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'lookoutConfig' defined in class path resource [com/alipay/lookout/starter/autoConfiguration/LookoutAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.alipay.lookout.core.config.LookoutConfig]: Factory method 'lookoutConfig' threw exception; nested exception is java.lang.IllegalArgumentException: [Assertion failed] - this argument is required; it must not be null
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1128) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1022) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:512) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:207) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1131) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1059) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:835) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	... 31 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.alipay.lookout.core.config.LookoutConfig]: Factory method 'lookoutConfig' threw exception; nested exception is java.lang.IllegalArgumentException: [Assertion failed] - this argument is required; it must not be null
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	... 44 common frames omitted
Caused by: java.lang.IllegalArgumentException: [Assertion failed] - this argument is required; it must not be null
	at org.springframework.util.Assert.notNull(Assert.java:115) ~[spring-core-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.util.Assert.notNull(Assert.java:126) ~[spring-core-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at com.alipay.lookout.starter.autoConfiguration.LookoutAutoConfiguration.lookoutConfig(LookoutAutoConfiguration.java:72) ~[lookout-sofa-boot-starter-1.4.0.jar:na]
	at com.alipay.lookout.starter.autoConfiguration.LookoutAutoConfiguration$$EnhancerBySpringCGLIB$$818d1f65.CGLIB$lookoutConfig$0(<generated>) ~[lookout-sofa-boot-starter-1.4.0.jar:na]
	at com.alipay.lookout.starter.autoConfiguration.LookoutAutoConfiguration$$EnhancerBySpringCGLIB$$818d1f65$$FastClassBySpringCGLIB$$4a2bfc9e.invoke(<generated>) ~[lookout-sofa-boot-starter-1.4.0.jar:na]
	at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) ~[spring-core-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:356) ~[spring-context-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	at com.alipay.lookout.starter.autoConfiguration.LookoutAutoConfiguration$$EnhancerBySpringCGLIB$$818d1f65.lookoutConfig(<generated>) ~[lookout-sofa-boot-starter-1.4.0.jar:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121]
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
	... 45 common frames omitted


Process finished with exit code 1

Steps to reproduce

Create a SOFABoot project and add SOFALookout dependencies, do not specify spring.application.name in application.properties.

Environment

SOFALookout version

1.4.0

JVM version (e.g. java -version)

java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)

OS version (e.g. uname -a)

Darwin MacBook-Pro-4.local 17.6.0 Darwin Kernel Version 17.6.0: Tue May  8 15:22:16 PDT 2018; root:xnu-4570.61.1~1/RELEASE_X86_64 x86_64

Maven version

3.2.5

IDE version

Intellij IDEA Ultimate 2018.2 EAP

SOFALookout as Actuator default Metrics Impl enhancement

Background

Spring Boot Actuator Default implementation is Dropwizard. But we want to use Lookout as default Actuator implementation

Solution

Through enhance lookout-sofa-boot-starter and AutoConfig before MetricsDropwizardAutoConfiguration we can use CounterService and GaugeService interface and SOFALookout implementation by default.

Using ES 6.4 exceptions

由于现有环境一直是ES6.4供各服务使用,所以我用sofa lookout-server 1.6.0-release也用es6.4。
但是两个索引,lookout-search-metrics初始化了,lookout-active-metrics没有初始化。异常日志如下:

2019-10-11 17:24:4910.200.5.33419abfffCaused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'selfMetricsStarter': Unsatisfied dependency expressed through field 'exportChainManager'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'exportManager' defined in class path resource [com/alipay/sofa/lookout/gateway/metrics/starter/MetricPipelineConfiguration.class]: Unsatisfied dependency expressed through method 'exportManager' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'esMetricsExportChain' defined in class path resource [com/alipay/sofa/lookout/gateway/metrics/exporter/es/spring/bean/config/EsExporterConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.alipay.sofa.lookout.gateway.core.prototype.exporter.chain.ExportChain]: Factory method 'esMetricsExportChain' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'esMetricsExporter' defined in class path resource [com/alipay/sofa/lookout/gateway/metrics/exporter/es/spring/bean/config/EsExporterConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.alipay.sofa.lookout.gateway.metrics.exporter.es.ESMetricExporter]: Factory method 'esMetricsExporter' threw exception; nested exception is java.lang.IllegalStateException: java.lang.IllegalStateException: this alias is conflicted with an index name:lookout-active-metrics
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:596)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:374)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1411)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:849)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.refresh(ReactiveWebServerApplicationContext.java:67)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.boot.SpringApplication.run(SpringApplication.java:316)
2019-10-11 17:24:4910.200.5.33419abfff at com.alipay.sofa.lookout.boot.GatewayBootstrap.main(GatewayBootstrap.java:45)
2019-10-11 17:24:4910.200.5.33419abfff ... 20 more
2019-10-11 17:24:4910.200.5.33419abfffCaused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'exportManager' defined in class path resource [com/alipay/sofa/lookout/gateway/metrics/starter/MetricPipelineConfiguration.class]: Unsatisfied dependency expressed through method 'exportManager' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'esMetricsExportChain' defined in class path resource [com/alipay/sofa/lookout/gateway/metrics/exporter/es/spring/bean/config/EsExporterConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.alipay.sofa.lookout.gateway.core.prototype.exporter.chain.ExportChain]: Factory method 'esMetricsExportChain' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'esMetricsExporter' defined in class path resource [com/alipay/sofa/lookout/gateway/metrics/exporter/es/spring/bean/config/EsExporterConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.alipay.sofa.lookout.gateway.metrics.exporter.es.ESMetricExporter]: Factory method 'esMetricsExporter' threw exception; nested exception is java.lang.IllegalStateException: java.lang.IllegalStateException: this alias is conflicted with an index name:lookout-active-metrics
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:769)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:509)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1321)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1160)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1247)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1167)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:593)
2019-10-11 17:24:4910.200.5.33419abfff ... 37 more
2019-10-11 17:24:4910.200.5.33419abfffCaused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'esMetricsExportChain' defined in class path resource [com/alipay/sofa/lookout/gateway/metrics/exporter/es/spring/bean/config/EsExporterConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.alipay.sofa.lookout.gateway.core.prototype.exporter.chain.ExportChain]: Factory method 'esMetricsExportChain' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'esMetricsExporter' defined in class path resource [com/alipay/sofa/lookout/gateway/metrics/exporter/es/spring/bean/config/EsExporterConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.alipay.sofa.lookout.gateway.metrics.exporter.es.ESMetricExporter]: Factory method 'esMetricsExporter' threw exception; nested exception is java.lang.IllegalStateException: java.lang.IllegalStateException: this alias is conflicted with an index name:lookout-active-metrics
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:627)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:456)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1321)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1160)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1463)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1427)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1318)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1205)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1167)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:857)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:760)
2019-10-11 17:24:4910.200.5.33419abfff ... 50 more
2019-10-11 17:24:4910.200.5.33419abfffCaused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.alipay.sofa.lookout.gateway.core.prototype.exporter.chain.ExportChain]: Factory method 'esMetricsExportChain' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'esMetricsExporter' defined in class path resource [com/alipay/sofa/lookout/gateway/metrics/exporter/es/spring/bean/config/EsExporterConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.alipay.sofa.lookout.gateway.metrics.exporter.es.ESMetricExporter]: Factory method 'esMetricsExporter' threw exception; nested exception is java.lang.IllegalStateException: java.lang.IllegalStateException: this alias is conflicted with an index name:lookout-active-metrics
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:622)
2019-10-11 17:24:4910.200.5.33419abfff ... 67 more
2019-10-11 17:24:4910.200.5.33419abfffCaused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'esMetricsExporter' defined in class path resource [com/alipay/sofa/lookout/gateway/metrics/exporter/es/spring/bean/config/EsExporterConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.alipay.sofa.lookout.gateway.metrics.exporter.es.ESMetricExporter]: Factory method 'esMetricsExporter' threw exception; nested exception is java.lang.IllegalStateException: java.lang.IllegalStateException: this alias is conflicted with an index name:lookout-active-metrics
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:627)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:456)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1321)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1160)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.resolveBeanReference(ConfigurationClassEnhancer.java:394)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:366)
2019-10-11 17:24:4910.200.5.33419abfff at com.alipay.sofa.lookout.gateway.metrics.exporter.es.spring.bean.config.EsExporterConfiguration$$EnhancerBySpringCGLIB$$d94b5932.esMetricsExporter()
2019-10-11 17:24:4910.200.5.33419abfff at com.alipay.sofa.lookout.gateway.metrics.exporter.es.spring.bean.config.EsExporterConfiguration.esMetricsExportChain(EsExporterConfiguration.java:54)
2019-10-11 17:24:4910.200.5.33419abfff at com.alipay.sofa.lookout.gateway.metrics.exporter.es.spring.bean.config.EsExporterConfiguration$$EnhancerBySpringCGLIB$$d94b5932.CGLIB$esMetricsExportChain$1()
2019-10-11 17:24:4910.200.5.33419abfff at com.alipay.sofa.lookout.gateway.metrics.exporter.es.spring.bean.config.EsExporterConfiguration$$EnhancerBySpringCGLIB$$d94b5932$$FastClassBySpringCGLIB$$78efd180.invoke()
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:363)
2019-10-11 17:24:4910.200.5.33419abfff at com.alipay.sofa.lookout.gateway.metrics.exporter.es.spring.bean.config.EsExporterConfiguration$$EnhancerBySpringCGLIB$$d94b5932.esMetricsExportChain()
2019-10-11 17:24:4910.200.5.33419abfff at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2019-10-11 17:24:4910.200.5.33419abfff at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2019-10-11 17:24:4910.200.5.33419abfff at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2019-10-11 17:24:4910.200.5.33419abfff at java.lang.reflect.Method.invoke(Method.java:498)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
2019-10-11 17:24:4910.200.5.33419abfff ... 68 more
2019-10-11 17:24:4910.200.5.33419abfffCaused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.alipay.sofa.lookout.gateway.metrics.exporter.es.ESMetricExporter]: Factory method 'esMetricsExporter' threw exception; nested exception is java.lang.IllegalStateException: java.lang.IllegalStateException: this alias is conflicted with an index name:lookout-active-metrics
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:622)
2019-10-11 17:24:4910.200.5.33419abfff ... 91 more
2019-10-11 17:24:4910.200.5.33419abfffCaused by: java.lang.IllegalStateException: java.lang.IllegalStateException: this alias is conflicted with an index name:lookout-active-metrics
2019-10-11 17:24:4910.200.5.33419abfff at com.alipay.sofa.lookout.server.common.es.operation.ESOperator.initializeDatabase(ESOperator.java:81)
2019-10-11 17:24:4910.200.5.33419abfff at com.alipay.sofa.lookout.gateway.metrics.exporter.es.ESMetricExporter.(ESMetricExporter.java:89)
2019-10-11 17:24:4910.200.5.33419abfff at com.alipay.sofa.lookout.gateway.metrics.exporter.es.spring.bean.config.EsExporterConfiguration.esMetricsExporter(EsExporterConfiguration.java:49)
2019-10-11 17:24:4910.200.5.33419abfff at com.alipay.sofa.lookout.gateway.metrics.exporter.es.spring.bean.config.EsExporterConfiguration$$EnhancerBySpringCGLIB$$d94b5932.CGLIB$esMetricsExporter$0()
2019-10-11 17:24:4910.200.5.33419abfff at com.alipay.sofa.lookout.gateway.metrics.exporter.es.spring.bean.config.EsExporterConfiguration$$EnhancerBySpringCGLIB$$d94b5932$$FastClassBySpringCGLIB$$78efd180.invoke()
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:363)
2019-10-11 17:24:4910.200.5.33419abfff at com.alipay.sofa.lookout.gateway.metrics.exporter.es.spring.bean.config.EsExporterConfiguration$$EnhancerBySpringCGLIB$$d94b5932.esMetricsExporter()
2019-10-11 17:24:4910.200.5.33419abfff at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2019-10-11 17:24:4910.200.5.33419abfff at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2019-10-11 17:24:4910.200.5.33419abfff at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2019-10-11 17:24:4910.200.5.33419abfff at java.lang.reflect.Method.invoke(Method.java:498)
2019-10-11 17:24:4910.200.5.33419abfff at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
2019-10-11 17:24:4910.200.5.33419abfff ... 92 more
2019-10-11 17:24:4910.200.5.33419abfffCaused by: java.lang.IllegalStateException: this alias is conflicted with an index name:lookout-active-metrics
2019-10-11 17:24:4910.200.5.33419abfff at com.google.common.base.Preconditions.checkState(Preconditions.java:444)
2019-10-11 17:24:4910.200.5.33419abfff at com.alipay.sofa.lookout.server.common.es.operation.ESOperator.createIndex(ESOperator.java:90)
2019-10-11 17:24:4910.200.5.33419abfff at com.alipay.sofa.lookout.server.common.es.operation.ESOperator.initializeDatabase(ESOperator.java:74)
2019-10-11 17:24:4910.200.5.33419abfff ... 104 more(url)

P99 & P95 feature

In order to calculate P95/99 ,lookout client provides a bucket api, and send buckets metrics to the server.

Tag selector [=] Filter

Describe the bug

A clear and concise description of what the bug is.
Tag选择器的使用“=”筛选,不能实现全字匹配。

Expected behavior

Tag选择器的使用“=”筛选,能实现全字匹配。
比如jvm.threads.daemon{app="foo"},这样查询只能够查询到foo应用的时序数据

Actual behavior

比如jvm.threads.daemon{app="foo"},这样查询能够查询到foo和gateway等多个应用的时序数据

image

Steps to reproduce

  1. 多个应用接入SOFALookout
  2. 启动SOFALookout服务端
  3. 访问服务端web界面,查询jvm.threads.daemon{app="foo"}

Minimal yet complete reproducer code (or GitHub URL to code)

Environment

  • SOFALookout version: 1.6.0
  • JVM version (e.g. java -version): 1.8
  • OS version (e.g. uname -a):windows10
  • Maven version:3.5
  • IDE version:Intelli IDEA 2019.2

添加TCP网络连接数等指标到框架中

是否考虑对ext-os进行更多功能的扩展

目前采集到的指标还是有限的,一些常用的,例如TCP网络连接数等指标还是没有

  • SOFALookout version: 1.6.1

provide a quickstart docker image

Your question

provide a quickstart docker image

Your scenes

noen

Your advice

none

Environment

  • SOFALookout version:
  • JVM version (e.g. java -version):
  • OS version (e.g. uname -a):
  • Maven version:
  • IDE version:

如何能在服务内部获取到prometheus监控数据?

Your question

我们已经在使用micrometer了,只想通过sofa-lookout收集一些sofa-rpc相关的监控数据,然后通过我们已有的PushGateway把数据发送到prometheus。

我们希望sofa-lookout的PrometheusRegistry能提供类似于micrometer的PrometheusMeterRegietry的scrap功能,或者通过其他途径能实现类似功能;并且sofa-lookout不应该启动内置的http服务或监听任何端口,这会增加额外的配置和运维压力。

请告诉我是否有任何途径能实现上述功能。

Environment

  • SOFALookout version: 1.4.1
  • JVM version (e.g. java -version): 13.0.1
  • OS version (e.g. uname -a): mac/centos7
  • Maven version: 3.6.3
  • IDE version: IntelliJ IDEA 2019.3

TopGauge prevent NoopId

Describe the bug

A Noop MetricId will cause metric type cast err.

Expected behavior

Actual behavior

ignore noopId, do not register it .

Steps to reproduce

Minimal yet complete reproducer code (or GitHub URL to code)

Environment

  • SOFALookout version: 1.4.*
  • JVM version (e.g. java -version): 1.8
  • OS version (e.g. uname -a): -
  • Maven version: 3.2.5
  • IDE version: -

SOFAStack End User Registration「SOFAStack 使用者登记」

非常感谢大家对 SOFAStack 开源的关注和支持,这是我们前进最大的动力。

收集目的

  • 了解 SOFAStack 的使用场景以便更好的规划技术路线
  • 聆听社区的不同声音,让 SOFAStack 变得更好
  • 吸引更多的开源爱好者参与贡献,共同打造 SOFAStack

收集方式

方式一:
请按如下参考格式回复本 Issue 进行登记:

* 公司/组织名称:蚂蚁金服
* 地点:**杭州
* 网址:http://www.antfin.com
* 使用组件及场景:全套金融级分布式中间件
* 联系方式:[email protected]

方式二:
您可以通过我们的「使用调研问卷」进行反馈。

展示

我们会定期同步信息至「Awesome SOFA」的用户列表中。

再次感谢您的支持和反馈!
SOFAStack 团队

mvn compile failed for missed jar

Describe the bug

[ERROR] Failed to execute goal on project lookout-common: Could not resolve dependencies for project com.alipay.sofa.lookout:lookout-common:jar:1.6.2-SNAPSHOT: Could not find artifact com.alipay.sofa.lookout:lookout-api:jar:1.6.1 in nexus (http://maven.aliyun.com/nexus/content/groups/public/) -> [Help 1]

Expected behavior

Actual behavior

Steps to reproduce

Minimal yet complete reproducer code (or GitHub URL to code)

Environment

  • SOFALookout version:
  • JVM version (e.g. java -version):
  • OS version (e.g. uname -a):
  • Maven version:
  • IDE version:

普通java项目如何配置promethues

Your question

普通java项目如何配置promethues

Your scenes

describe your use scenes (why need this feature)

Your advice

describe the advice or solution you'd like

Environment

  • SOFALookout version:
  • JVM version (e.g. java -version):
  • OS version (e.g. uname -a):
  • Maven version:
  • IDE version:

reportDecider npe bug

Describe the bug

image

old one may be null pointer

Expected behavior

Actual behavior

2018-11-27 16:05:10.588 [lookout-poller-2-HIGH-2000] WARN  com.alipay.lookout.remote.report.SchedulerPoller - failed to send metrics
java.lang.NullPointerException: null
   at com.alipay.lookout.remote.report.support.http.ReportDecider.refreshAddressCache(ReportDecider.java:102)
   at com.alipay.lookout.remote.report.support.http.ReportDecider.getAvailableAddress(ReportDecider.java:69)

Steps to reproduce

Minimal yet complete reproducer code (or GitHub URL to code)

Environment

  • SOFALookout version: 1.5.0
  • JVM version (e.g. java -version):
  • OS version (e.g. uname -a):
  • Maven version:
  • IDE version:

provide metrics info doc

Your question

  "count": 2,
  "fifteenMinuteRate": 0.17996489624183667,
  "fiveMinuteRate": 0.14571471450227858,
  "meanRate": 0.019242990405683374,
  "oneMinuteRate": 0.04105793151598188,
  "snapshot.75thPercentile": 0,
  "snapshot.95thPercentile": 0,
  "snapshot.98thPercentile": 0,
  "snapshot.999thPercentile": 0,
  "snapshot.99thPercentile": 0,
  "snapshot.max": 0,
  "snapshot.mean": 0,
  "snapshot.median": 0,
  "snapshot.min": 0,
  "snapshot.stdDev": 0,

Your scenes

Provide some chinese introduction and how to caculate this.

Your advice

describe the advice or solution you'd like

Provide some chinese introduction and how to caculate this.

Environment

  • SOFALookout version:
  • JVM version (e.g. java -version):
  • OS version (e.g. uname -a):
  • Maven version:
  • IDE version:

Lookout serialize use fastjson and can disable circular reference by default

The code is com.alipay.lookout.core.common.MeasurementUtil#printValue and the default simplify is

JSON.toJSONString(value). By default, we can improve it with JSON.toJSONString(value,com.alibaba.fastjson.serializer.SerializerFeature#DisableCircularReferenceDetect).Otherwise , the result may be have $ref

       "status": {
          "$ref": "$.detailMessage[0].component.status"
        }

And if we disable circular reference,some circular danger may happen,we can discuss it.

Inconsistent represent of SOFALookout

Describe the bug

In the README or other documentation, we have Lookout, LOOKOUT, SOFA-LOOKOUT etc.

Expected behavior

When you refer to SOFALookout, use SOFALookout, do not use Lookout, LOOKOUT or SOFA-LOOKOUT.

Actual behavior

The represent of SOFALookout is inconsistent.

内置metrics支持

关于内置的metrics有没有考虑支持更多的公共组件,比如数据库连接池、缓存、httpclient等?

modify readme

Describe the bug

  • add the samples link in the readme
  • modify the readme of samples

Expected behavior

Actual behavior

Steps to reproduce

Minimal yet complete reproducer code (or GitHub URL to code)

Environment

  • SOFALookout version:
  • JVM version (e.g. java -version):
  • OS version (e.g. uname -a):
  • Maven version:
  • IDE version:

Dependency org.apache.httpcomponents:httpclient, leading to CVE problem

Hi, In sofa-lookout-1.6.1/client/lookout-reg-server,there is a dependency org.apache.httpcomponents:httpclient:4.5.2 that calls the risk method.

CVE-2020-13956

The scope of this CVE affected version is [,4.5.13)

After further analysis, in this project, the main Api called is <org.apache.http.client.utils.URIUtils: org.apache.http.HttpHost extractHost(java.net.URI)>

Risk method repair link : GitHub

CVE Bug Invocation Path--

Path Length : 6

<org.apache.http.client.utils.URIUtils: org.apache.http.HttpHost extractHost(java.net.URI)>
at <org.apache.http.impl.client.CloseableHttpClient: org.apache.http.HttpHost determineTarget(org.apache.http.client.methods.HttpUriRequest)> (org.apache.http.impl.client.CloseableHttpClient.java:[92]) in /.m2/repository/org/apache/httpcomponents/httpclient/4.5.2/httpclient-4.5.2.jar
at <org.apache.http.impl.client.CloseableHttpClient: java.lang.Object execute(org.apache.http.client.methods.HttpUriRequest,org.apache.http.client.ResponseHandler,org.apache.http.protocol.HttpContext)> (org.apache.http.impl.client.CloseableHttpClient.java:[163]) in /.m2/repository/org/apache/httpcomponents/httpclient/4.5.2/httpclient-4.5.2.jar
at <org.apache.http.impl.client.CloseableHttpClient: java.lang.Object execute(org.apache.http.client.methods.HttpUriRequest,org.apache.http.client.ResponseHandler)> (org.apache.http.impl.client.CloseableHttpClient.java:[139]) in /.m2/repository/org/apache/httpcomponents/httpclient/4.5.2/httpclient-4.5.2.jar
at <com.alipay.lookout.remote.report.support.http.DefaultHttpRequestProcessor: java.lang.Object sendRequest(org.apache.http.client.methods.HttpRequestBase,org.apache.http.client.ResponseHandler)> (com.alipay.lookout.remote.report.support.http.DefaultHttpRequestProcessor.java:[197]) in /detect/unzip/sofa-lookout-1.6.1/client/lookout-reg-server/target/classes
at <com.alipay.lookout.remote.report.support.http.DefaultHttpRequestProcessor: boolean sendPostRequest(org.apache.http.client.methods.HttpPost,java.util.Map)> (com.alipay.lookout.remote.report.support.http.DefaultHttpRequestProcessor.java:[148]) in /detect/unzip/sofa-lookout-1.6.1/client/lookout-reg-server/target/classes

Dependency tree--

[INFO] com.alipay.sofa.lookout:lookout-reg-server:jar:1.6.1
[INFO] +- com.alipay.sofa.lookout:lookout-core:jar:1.6.1:compile
[INFO] |  +- com.alipay.sofa.lookout:lookout-common:jar:1.6.1:compile
[INFO] |  |  +- com.alipay.sofa.lookout:lookout-api:jar:1.6.1:compile
[INFO] |  |  \- com.alipay.sofa.common:sofa-common-tools:jar:1.0.12:compile
[INFO] |  +- com.alibaba:fastjson:jar:1.2.49:compile
[INFO] |  \- org.apache.commons:commons-configuration2:jar:2.1.1:compile
[INFO] |     \- org.apache.commons:commons-lang3:jar:3.3.2:compile
[INFO] +- com.google.guava:guava:jar:18.0:compile
[INFO] +- org.xerial.snappy:snappy-java:jar:1.1.2.6:compile
[INFO] +- org.apache.httpcomponents:httpclient:jar:4.5.2:compile
[INFO] |  +- org.apache.httpcomponents:httpcore:jar:4.4.4:compile
[INFO] |  +- commons-logging:commons-logging:jar:1.2:compile
[INFO] |  \- commons-codec:commons-codec:jar:1.9:compile
[INFO] +- commons-lang:commons-lang:jar:2.3:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.7.21:compile
[INFO] +- junit:junit:jar:4.12:test
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.7.21:test
[INFO] |  \- log4j:log4j:jar:1.2.17:test
[INFO] +- org.mockito:mockito-all:jar:1.10.19:test
[INFO] \- org.assertj:assertj-core:jar:2.9.1:test

Suggested solutions:

Update dependency version

Thank you very much.

TopUtil的并发bugfix

Describe the bug

在高并发场景,每个采集周期发生roll的阶段,对所有已经持有方法pushSafe的变量set的线程,都会基于老条件加入到registry中,这部分会占用registry空间(只到下个采集周期时才情况)

Expected behavior

Actual behavior

Steps to reproduce

Metrics storage extension supports HBase

Your question

Lookout metrics storage extension supports HBase adaption.

Environment

  • SOFALookout version:
  • JVM version (e.g. java -version):
  • OS version (e.g. uname -a):
  • Maven version:
  • IDE version:

Priority Tag equals problem

Describe the bug

when tag instance( LookoutConstants.HIGH_PRIORITY_TAG) is used.

p.name().equals(value)

use equalsIgnoreCase method instead.

Expected behavior

"HIGH" priority equals "high"

Actual behavior

not equal

服务端日志如何按日期生成?

Your question

sofalookout本身服务端的日志如何按日期生成吗?现在只有一个日志文件(/data/lookout/logs/lookout-std.out),已经上GB大小了,需要按日期生成。

Your scenes

describe your use scenes (why need this feature)

Your advice

建议通过配置文件进行设置。

Environment

  • SOFALookout version:1.6.0
  • JVM version (e.g. java -version):1.8
  • OS version (e.g. uname -a):CentOS7.4
  • Maven version:
  • IDE version:

后续版本能否开放配置DEFAULT_HTTP_EXPORTER_PORT这个端口到properties配置文件

Your question

后续版本能否开放配置DEFAULT_HTTP_EXPORTER_PORT这个端口到properties配置文件

Your scenes

Your advice

当前1.6.1版本DEFAULT_HTTP_EXPORTER_PORT是写代码里常量,无法自定义DEFAULT_HTTP_EXPORTER_PORT这个端口,同一机器启动多个服务监控,会产生端口冲突

Environment

  • SOFALookout version:1.6.1
  • JVM version (e.g. java -version):1.8

通过 lookout-ext-jvm 上报的jvm相关的metric,能否在tag中添加app名字?

lookout-ext-jvm 上报的jvm相关的metric的tag只有 instance 和 job, 但是没有spring boot 应用的app, 希望能把这个带过来。 因为在实际业务生产环境中,使用app来对统计数据做聚合和统计都是很有必要的。

Environment

  • SOFALookout version: 1.5.1
  • JVM version (e.g. java -version): 1.8
  • OS version (e.g. uname -a):
  • Maven version:
  • IDE version:

Functional Task List(开放功能任务列表)

Keep updating...

task name task description 中文说明 developer
--- --- MatchType (可以支持的)在既有 ES Mapping结构上的支持 ---
--- --- query paramer开关,查询 REST 响应结果支持携带 ES 原始查询信息(ValueData.debugInfo ) ---
--- --- ES 7 写入适配升级 ---
use hbase as a metrics storage --- 共建hbase的存储库 SteNicholas

Compatible with spring boot2.X version

Your question

是否考虑兼容spring boot2.X版本的actuator?现在的lookout-boot只能支持1.X版本,使用2.X版本的boot无法读取lookout中的Metrics监控项,追了下源码,发现2.X版本的actuator修改了很多类,导致lookout-boot无法兼容
describe your question clearly

Your scenes

describe your use scenes (why need this feature)

Your advice

describe the advice or solution you'd like

Environment

  • SOFALookout version:
  • JVM version (e.g. java -version):
  • OS version (e.g. uname -a):
  • Maven version:
  • IDE version:

support pull mode

既有的方案是支持 push 方式主动上报metircs。

新的方式支持 pull 模式。

  • 不是完全是被动模式,内部机制是主动按时间窗口产生数据和缓存,用来被外部采集者获取;
  • 该模式只支持一个认证过的采集者;

How to configure the ES account and password

Your question

在搭建lookout-server服务时连接的ES需要用户名和密码,如何配置?

Your scenes

describe your use scenes (why need this feature)

Your advice

describe the advice or solution you'd like

Environment

  • SOFALookout version:
  • JVM version (e.g. java -version):
  • OS version (e.g. uname -a):
  • Maven version:
  • IDE version:

sofa-lookout with ES 7.3

Describe the bug

在ElasticSearch 7.3 版本上面会出现以下问题

Expected behavior

Lookout 会出现正常的数据

Actual behavior

lookout 界面显示

java.lang.ClassCastException: com.google.gson.JsonObject cannot be cast to com.google.gson.JsonPrimitive rawQuery:rpc.consumer.service.stats.total_count.count{app="stock_mng"} realQuery:rpc.consumer.service.stats.total_count.count{app="stock_mng"}

如果此时关掉lookout重启,就会启动失败.异常如下:

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'esMetricsExporter' defined in class path resource [com/alipay/sofa/lookout/gateway/metrics/exporter/es/spring/bean/config/EsExporterConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.alipay.sofa.lookout.gateway.metrics.exporter.es.ESMetricExporter]: Factory method 'esMetricsExporter' threw exception; nested exception is java.lang.IllegalStateException: java.lang.IllegalStateException: this alias is conflicted with an index name:lookout-active-metrics

Steps to reproduce

替换ES5.6为ES7.3
就可以出现以上情况.

Minimal yet complete reproducer code (or GitHub URL to code)

Environment

  • SOFALookout version:
    1.6.1
  • JVM version (e.g. java -version):
    java version "1.8.0_144"
    Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
    Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)
  • OS version (e.g. uname -a):
    Darwin sjbwyblstekiMBP 17.7.0 Darwin Kernel Version 17.7.0: Sun Jun 2 20:31:42 PDT 2019; root:xnu-4570.71.46~1/RELEASE_X86_64 x86_64
  • Maven version:
    3.5
  • IDE version:
    IDEA 2019.1

ESOperator's rollover operation does not take effect on es6

Describe the bug

ESOperator's rollover operation does not take effect on es6

Expected behavior

ESOperator rollover request fail.

Actual behavior

http status 200 ,not 400.

Steps to reproduce

  • watch the server starting logs。

Minimal yet complete reproducer code (or GitHub URL to code)

Environment

  • SOFALookout version: 1.6.0
  • ES version : 6.3.2

度量指标累计计数统计方式

Your question

如何统计度量指标累计计数?
比如说,度量指标【某个具体接口总的调用数目(rpc.provider.service.stats.total_count.count)】
想要统计一段时间内,比如最近半小时,各个接口的总调用次数

Your scenes

describe your use scenes (why need this feature)

Your advice

describe the advice or solution you'd like

Environment

  • SOFALookout version:v1.6.0
  • JVM version (e.g. java -version):1.8
  • OS version (e.g. uname -a):linux
  • Maven version:3.5
  • IDE version:Intellij IDEA

使用lookout接入sofarpc项目找不到对应的指标

Your question

使用lookout接入sofarpc项目找不到下面对应的指标

rpc.provider.service.stats.fail_count.count app,service,method,protocol,caller_app 某个具体接口总的被调用失败次数
rpc.provider.service.stats.fail_count.rate app,service,method,protocol,caller_app 某个具体接口每秒失败次数
rpc.provider.service.stats.fail_time.elapPerExec app,service,method,protocol,caller_app 某个具体接口每次失败失败
rpc.provider.service.stats.fail_time.max app,service,method,protocol,caller_app 某个具体接口失败次数最大值
rpc.provider.service.stats.fail_time.totalTime app,service,method,protocol,caller_app 某个具体接口失败总时间
rpc.provider.service.stats.total_count.count app,service,method,protocol,caller_app 某个具体接口总的调用次数
rpc.provider.service.stats.total_count.rate app,service,method,protocol,caller_app 某个具体接口每秒调用次数
rpc.provider.service.stats.total_time.elapPerExec app,service,method,protocol,caller_app 某个具体接口每次调用时间
rpc.provider.service.stats.total_time.max app,service,method,protocol,caller_app 某个具体接口总时间最大值
rpc.provider.service.stats.total_time.totalTime app,service,method,protocol,caller_app 某个具体接口总时间

在prometheus中只有这几个指标
图片
是文档没更新还是要启动加什么配置?
describe your question clearly

Your scenes

describe your use scenes (why need this feature)

Your advice

describe the advice or solution you'd like

Environment

  • SOFALookout version:
    sofaboot 3.1.3
    lookout 1.6.1
  • JVM version (e.g. java -version):
  • OS version (e.g. uname -a):
  • Maven version:
  • IDE version:

Can't generate runnable jar according to user manual

Describe the bug

Could not create a runnable jar according to README manual

服务器端代码编译:

  • all-in-one模式: ./boot/all-ine-one-bootstrap/build.sh
    打包结果在boot/all-in-one-bootstrap/target/xxx-executable-ark.jar
    metrics-server: mvn clean install -DskipTests -am -pl boot/metrics-server-bootstrap
    gateway: mvn clean install -DskipTests -am -pl boot/gateway/bootstrap

Maybe a spring-boot-maven plugin should be declare to project's build configuration.

Expected behavior

Generate a runnable jar as artifact

Actual behavior

> java -jar boot/metrics-server-bootstrap/target/lookout-metrics-server-bootstrap-1.6.0.jar
boot/metrics-server-bootstrap/target/lookout-metrics-server-bootstrap-1.6.0.jar中没有主清单属性

Steps to reproduce

Build as manual

Minimal yet complete reproducer code (or GitHub URL to code)

Environment

  • SOFALookout version: branch master
  • JVM version (e.g. java -version): 1.8
  • OS version (e.g. uname -a): none
  • Maven version: 3.5.4
  • IDE version: none

Add more client api in other language such as python, cpp, go

@ALL

Your question

add more client api in other language such as python, cpp, go

Your scenes

describe your use scenes (why need this feature)

Your advice

describe the advice or solution you'd like

Environment

  • SOFALookout version:
  • JVM version (e.g. java -version):
  • OS version (e.g. uname -a):
  • Maven version:
  • IDE version:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.