You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/02/03 03:25:47 UTC

[GitHub] [skywalking] wu-sheng commented on a change in pull request #6309: add redefine listener

wu-sheng commented on a change in pull request #6309:
URL: https://github.com/apache/skywalking/pull/6309#discussion_r569105727



##########
File path: apm-sniffer/apm-agent/src/main/java/org/apache/skywalking/apm/agent/SkyWalkingAgent.java
##########
@@ -215,4 +218,23 @@ public void onError(final String typeName,
         public void onComplete(String typeName, ClassLoader classLoader, JavaModule module, boolean loaded) {
         }
     }
+
+    private static class RedefinitionListener implements AgentBuilder.RedefinitionStrategy.Listener {
+
+        @Override
+        public void onBatch(int index, List<Class<?>> batch, List<Class<?>> types) {
+            /* do nothing */
+        }
+
+        @Override
+        public Iterable<? extends List<Class<?>>> onError(int index, List<Class<?>> batch, Throwable throwable, List<Class<?>> types) {
+            LOGGER.error(throwable, "index={}, batch={}, types={}", index, batch, types);
+            return Collections.emptyList();

Review comment:
       I am not sure about this `onError` API, do we need to return `batch` or empty list?




----------------------------------------------------------------
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:
users@infra.apache.org