JohnNiang commented on a change in pull request #4264: Refactor SnifferConfigInitializer and related componets with new features in JDK8+ URL: https://github.com/apache/skywalking/pull/4264#discussion_r368276809
########## File path: apm-sniffer/apm-agent/src/main/java/org/apache/skywalking/apm/agent/SkyWalkingAgent.java ########## @@ -72,9 +71,6 @@ public static void premain(String agentArgs, Instrumentation instrumentation) th pluginFinder = new PluginFinder(new PluginBootstrap().loadPlugins()); - } catch (ConfigNotFoundException ce) { Review comment: > We need to catch this. In the `no config` scenario, the app should startup successfully. It will be caught by *[HERE](https://github.com/apache/skywalking/blob/4df7129ac15308582c4a77185f2df19cf619c074/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/conf/SnifferConfigInitializer.java#L68)* ```diff public static void initialize(String agentOptions) { try (InputStreamReader configFileStream = loadConfig()) { Properties properties = new Properties(); properties.load(configFileStream); properties.forEach((key, value) -> { if (value instanceof String) { properties.replace(key, PropertyPlaceholderHelper.INSTANCE.replacePlaceholders((String)value, properties)); } }); ConfigInitializer.initialize(properties, Config.class); + } catch (Exception e) { logger.error(e, "Failed to read the config file, skywalking is going to run in default config."); } ``` ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services