Commit Graph

28 Commits

Author SHA1 Message Date
Zixin Zhou d53f04b7bf
Add Caffeine plugin as optional (#743) 2024-12-29 08:16:05 +08:00
寻找的人 0fc3cd86e8
Add a plugin that supports the Solon framework. (#697) 2024-06-29 09:44:23 +08:00
吴晟 Wu Sheng b1c96da0d4
Rename system env name from `sw_plugin_kafka_producer_config` to `SW_PLUGIN_KAFKA_PRODUCER_CONFIG` (#668) 2024-01-22 13:50:20 +08:00
Chen Ziyan bbb177a893
Support tracing for async producing, batch sync consuming, and batch async consuming in rocketMQ-client-java-5.x-plugin (#665) 2024-01-21 10:29:39 +08:00
peachisai 0b80f3d424
Add a netty-4.1.x plugin to trace http (#625) 2023-10-29 16:18:25 +08:00
Gong Dewei 267aba8fad
Improve bytebuddy class enhance for retransform classes (#561)
* SWAuxiliaryTypeNamingStrategy
Auxiliary type name pattern: <origin_class_name>$<name_trait>$auxiliary$<auxiliary_type_instance_hash>

* DelegateNamingResolver
Interceptor delegate field name pattern: <name_trait>$delegate$<class_name_hash>$<plugin_define_hash>$<intercept_point_hash>

* SWMethodNameTransformer
Renamed origin method pattern: <name_trait>$original$<method_name>$<method_description_hash>

* SWImplementationContextFactory
Method cache value field pattern: cachedValue$<name_trait>$<origin_class_name_hash>$<field_value_hash>
Accessor method name pattern:  <renamed_origin_method>$accessor$<name_trait>$<origin_class_name_hash>

Here is an example of manipulated enhanced class with new naming policies of auxiliary classes, fields, and methods

```java
 import sample.mybatis.controller.HotelController$sw$auxiliary$19cja42;
 import sample.mybatis.controller.HotelController$sw$auxiliary$p257su0;
 import sample.mybatis.domain.Hotel;
 import sample.mybatis.service.HotelService;

 @RequestMapping(value={"/hotel"})
 @RestController
 public class HotelController
 implements EnhancedInstance {
     @Autowired
     @Lazy
     private HotelService hotelService;
     private volatile Object _$EnhancedClassField_ws;

     // Interceptor delegate fields
     public static volatile /* synthetic */ InstMethodsInter sw$delegate$td03673$ain2do0$8im5jm1;
     public static volatile /* synthetic */ InstMethodsInter sw$delegate$td03673$ain2do0$edkmf61;
     public static volatile /* synthetic */ ConstructorInter sw$delegate$td03673$ain2do0$qs9unv1;
     public static volatile /* synthetic */ InstMethodsInter sw$delegate$td03673$fl4lnk1$m3ia3a2;
     public static volatile /* synthetic */ InstMethodsInter sw$delegate$td03673$fl4lnk1$sufrvp1;
     public static volatile /* synthetic */ ConstructorInter sw$delegate$td03673$fl4lnk1$cteu7s1;

     // Origin method cache value field
     private static final /* synthetic */ Method cachedValue$sw$td03673$g5sobj1;

     public HotelController() {
         this(null);
         sw$delegate$td03673$ain2do0$qs9unv1.intercept(this, new Object[0]);
     }

     private /* synthetic */ HotelController(sw.auxiliary.p257su0 p257su02) {
     }

     @GetMapping(value={"city/{cityId}"})
     public Hotel selectByCityId(@PathVariable(value="cityId") int n) {
         // call interceptor with auxiliary type and parameters and origin method object
         return (Hotel)sw$delegate$td03673$ain2do0$8im5jm1.intercept(this, new Object[]{n}, new HotelController$sw$auxiliary$19cja42(this, n), cachedValue$sw$td03673$g5sobj1);
     }

     // Renamed origin method
     private /* synthetic */ Hotel sw$origin$selectByCityId$a8458p3(int cityId) {
/*22*/         return this.hotelService.selectByCityId(cityId);
     }

     // Accessor of renamed origin method, calling from auxiliary type
     final /* synthetic */ Hotel sw$origin$selectByCityId$a8458p3$accessor$sw$td03673(int n) {
         // Calling renamed origin method
         return this.sw$origin$selectByCityId$a8458p3(n);
     }

     @Override
     public Object getSkyWalkingDynamicField() {
         return this._$EnhancedClassField_ws;
     }

     @Override
     public void setSkyWalkingDynamicField(Object object) {
         this._$EnhancedClassField_ws = object;
     }

     static {
         ClassLoader.getSystemClassLoader().loadClass("org.apache.skywalking.apm.dependencies.net.bytebuddy.dynamic.Nexus").getMethod("initialize", Class.class, Integer.TYPE).invoke(null, HotelController.class, -1072476370);
         // Method object
         cachedValue$sw$td03673$g5sobj1 = HotelController.class.getMethod("selectByCityId", Integer.TYPE);
     }
 }
```

Auxiliary type of Constructor : 
```java
class HotelController$sw$auxiliary$p257su0 {
}
```

Auxiliary type of  `selectByCityId` method: 
```java
class HotelController$sw$auxiliary$19cja42
implements Runnable,
Callable {
    private HotelController argument0;
    private int argument1;

    public Object call() throws Exception {
        return this.argument0.sw$origin$selectByCityId$a8458p3$accessor$sw$td03673(this.argument1);
    }

    @Override
    public void run() {
        this.argument0.sw$origin$selectByCityId$a8458p3$accessor$sw$td03673(this.argument1);
    }

    HotelController$sw$auxiliary$19cja42(HotelController hotelController, int n) {
        this.argument0 = hotelController;
        this.argument1 = n;
    }
}
```
2023-06-24 20:50:10 +08:00
GuiSong c04a714725
[Feature] Support to configure custom decode method for kafka configurations (#540) 2023-05-31 18:03:35 +08:00
mrproliu d357bdef7a
Support keep trace profiling when cross-thread (#479) 2023-03-14 17:55:28 +08:00
xzyJavaX f366503d58
Enhance lettuce plugin to adopt uniform tags (#441) 2023-01-16 11:46:39 +08:00
xzyJavaX 92b076c281
Enhance redisson plugin to adopt uniform tags (#438) 2023-01-11 23:09:19 +08:00
吴晟 Wu Sheng 5cffa078e1
Add a config `agent.enable`(default: true) to support disabling agent (#439) 2023-01-11 17:14:23 +08:00
dylanforest a68b447878
Support to customize the collect period of JVM relative metrics. (#428) 2022-12-26 22:34:30 +08:00
pg.yang 364a4af4b1
Add micronauthttpclient,micronauthttpserver,memcached,ehcache,guavacache,jedis,redisson plugin config properties to agent.config (#402) 2022-12-01 22:16:08 +08:00
Brandon Fergerson 9559fad4c0
correct toolkit naming (#380) 2022-11-11 08:41:07 +08:00
pg.yang 6fce184cfe
Update guava-cache,jedis,memcached,ehcache plugins to adopt uniform tags (#303) 2022-09-10 21:58:55 +08:00
pg.yang 62bb071824
Optimize ConfigInitializer to enhance map/list field field (#305)
* Optimize ConfigInitializer to output warning messages when the config value is truncated.
* Fix the default value of the Map field would merge rather than override by new values in the config.
* Support to set the value of Map/List field to an empty map/list.
* Update `configuration` doc about overriding default value as empty map/list accordingly.
2022-09-09 00:02:55 +08:00
pg.yang 4b564ade64
Add plugin to support micronaut (#291) 2022-08-19 18:20:32 +08:00
zhyyu 88c4c71598
Add trace-sampler-cpu-policy-plugin (#135)
Co-authored-by: yuzhongyu <yuzhongyu@cestc.cn>
2022-04-25 18:27:53 +08:00
Oliver 3c8e5347f5
Optimize document and fix typo (#148) 2022-04-10 20:17:02 +08:00
吴晟 Wu Sheng b3ab1aed81
Add cluster concept to the configuration, and enhance namespace concept (#123)
* [Important] Namespace represents a subnet, such as kubernetes namespace, or 172.10.*.*. Make namespace concept as a part of service naming format.
* [Important] Add cluster concept, also as a part of service naming format. The cluster name would be
    1. Add as {@link #SERVICE_NAME} suffix.
    2. Add as exit span's peer, ${CLUSTER} / original peer
    3. Cross Process Propagation Header's value addressUsedAtClient[index=8] (Target address of this request used on the client end).
* [Breaking Change] Remove deprecated `agent.instance_properties` configuration.
  Recommend `agent.instance_properties_json`.
* The namespace and cluster would be reported as instance properties, keys are `namespace` and `cluster`. Notice, if
  instance_properties_json includes these two keys, they would be overrided by the agent core.
* [Breaking Change] Remove the namespace from `cross process propagation` key.
2022-03-12 22:33:18 +08:00
ArjenDavid-sjtu 8a1dae348c
Support configuration to collect redis parameters for jedis plugin (#91)
Co-authored-by: 温嘉鸣 <wenjiaming@shouqianba.com>
2022-01-14 00:50:40 +08:00
Daniel Qian 3b93a9c398
Optimize ProfileTaskChannelService (#78)
related issue  https://github.com/apache/skywalking/issues/8221
1. Avoid ProfileTaskChannelService.addProfilingSnapshot throw IllegalStateException(Queue full)
2. Increase ProfileTaskChannelService.snapshotQueue default size from 50 to 4500
2021-12-02 15:14:34 +08:00
Daniel Qian ce609dbabe
Add doc about system environment variables to configurations.md (#79) 2021-12-02 11:24:49 +08:00
Jared Tan b169ef3cdd
Support set instance properties in json format (#67)
* set instance properties in json format: agent.instance_properties_json

* add docs.

* Update docs/en/setup/service-agent/java-agent/configurations.md

* polish and add e2e.

* update

* Update test/e2e/case/expected/service-instance.yml

Co-authored-by: kezhenxu94 <kezhenxu94@apache.org>

* Update apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/util/InstanceJsonPropertiesUtil.java

Co-authored-by: kezhenxu94 <kezhenxu94@apache.org>

* update

* update SW_INSTANCE_PROPERTIES_JSON

Co-authored-by: 吴晟 Wu Sheng <wu.sheng@foxmail.com>
Co-authored-by: kezhenxu94 <kezhenxu94@apache.org>
2021-11-07 18:51:34 +08:00
Daming 7d36faaf0f
Add Kafka LogReporter and make grpc log reporter sharing grpc channel with reporters (#20) 2021-09-23 10:50:34 +08:00
Daming dd0d8afe88
Support mTLS for gRPC channel (#15) 2021-08-31 15:56:30 +08:00
吴晟 Wu Sheng fc79937619
Doc polish, remove unrelated documents and fix source code LICENSE (#5) 2021-08-27 10:08:36 +08:00
吴晟 Wu Sheng db2bc93573
Separate agent docs to avoid long single page. (#7537) 2021-08-23 20:10:01 +08:00