Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add SOFARPC Framework Plugin Support #308

Merged
merged 6 commits into from
Feb 25, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ A lightweight & opening Java Agent for Cloud-Native and APM system
* `Jedis 3.5.x`、 `Lettuce 5.3.x (sync、async)`
* `ElasticSearch Client >= 7.x (sync、async)`
* `Mongodb Client >=4.0.x (sync、async)`
* `Motan >= 1.2.0`
* `Motan`
* `Dubbo`
* `SofaRpc >= 5.3.0`
* Collecting Access Logs.
* `HTTP Servlet`、`HTTP Filter`
* `Spring Cloud Gateway`
Expand Down
13 changes: 13 additions & 0 deletions build/src/main/resources/agent.properties
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,19 @@ plugin.observability.motan.metric.url=/platform-metrics
#plugin.observability.dubbo.metric.url=/platform-metrics
# plugin.observability.dubbo.metric.appendType=kafka

# -------------------- sofarpc ---------------------
# sofarpc tracing
# plugin.observability.sofarpc.tracing.enabled=true
## sofarpc args collect switch
# plugin.observability.sofarpc.tracing.args.collect.enabled=false
## sofarpc result collect switch
# plugin.observability.sofarpc.tracing.result.collect.enabled=false
# sofarpc metric
# plugin.observability.sofarpc.metric.enabled=true
# plugin.observability.sofarpc.metric.interval=30
plugin.observability.sofarpc.metric.topic=platform-metrics
plugin.observability.sofarpc.metric.url=/platform-metrics
# plugin.observability.sofarpc.metric.appendType=kafka

# -------------- output ------------------
## http/kafka/zipkin server host and port for tracing and metric
Expand Down
122 changes: 87 additions & 35 deletions doc/prometheus-metric-schedule.md

Large diffs are not rendered by default.

79 changes: 66 additions & 13 deletions doc/user-manual.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ interface Namespace {
// ------------ rpc ----------------------
String DUBBO = "dubbo";
String MOTAN = "motan";
String SOFARPC = "sofarpc";


// ------------- request ------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,15 @@ public static Long getDuration(Context context, Object startKey) {
public static <T> T getFromContext(Context context, Object key) {
return context.get(key);
}

/**
* Remove data from context
* @param context data store
* @param key key is the type of data.
* @return
* @param <T> the type of data
*/
public static <T> T removeFromContext(Context context, Object key) {
return context.remove(key);
}
}
1 change: 1 addition & 0 deletions plugins/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
<module>log4j2-log-plugin</module>
<module>dubbo</module>
<module>motan</module>
<module>sofarpc</module>
</modules>

<dependencyManagement>
Expand Down
51 changes: 51 additions & 0 deletions plugins/sofarpc/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>plugins</artifactId>
<groupId>com.megaease.easeagent</groupId>
<version>2.2.5</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>sofarpc</artifactId>

<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<sofa-rpc-all.version>5.3.0</sofa-rpc-all.version>
</properties>

<dependencies>
<dependency>
<groupId>com.megaease.easeagent</groupId>
<artifactId>plugin-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.megaease.easeagent</groupId>
<artifactId>plugin-api-mock</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-all</artifactId>
<version>${sofa-rpc-all.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.megaease.easeagent</groupId>
<artifactId>log4j2-api</artifactId>
</dependency>
</dependencies>

</project>
Loading