ProducerConstructorInterceptor implements InstanceConstructorInterceptor { @Override public void onConstruct(EnhancedInstance objInst, Object[] allArguments) { ProducerConfig config = (ProducerConfig) allArguments[0]; objInst.setSkyWalkingDynamicField(StringUtil.join(';', config.getList("bootstrap.servers") .toArray(new String[0]))); }  @Override void onConstruct(EnhancedInstance objInst, Object[] allArguments);  }
@Test public void testOnConsumer() { constructorInterceptor.onConstruct(enhancedInstance, new Object[] {producerConfig}); assertThat(enhancedInstance.getSkyWalkingDynamicField().toString(), is("localhost:9092;localhost:19092")); }