Skip to content

Commit b2a9ffc

Browse files
authored
Merge pull request scouter-project#748 from gunlee01/develop
Develop
2 parents fab908a + 0ec8f02 commit b2a9ffc

File tree

156 files changed

+7937
-1161
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+7937
-1161
lines changed

‎pom.xml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>io.github.scouter-project</groupId>
66
<artifactId>scouter-parent</artifactId>
7-
<version>2.8.1</version>
7+
<version>2.10.0</version>
88
<packaging>pom</packaging>
99

1010
<name>SCOUTER APM</name>
@@ -175,6 +175,7 @@
175175
<plugin>
176176
<groupId>org.apache.maven.plugins</groupId>
177177
<artifactId>maven-javadoc-plugin</artifactId>
178+
<version>3.2.0</version>
178179
</plugin>
179180
<plugin>
180181
<groupId>org.sonatype.plugins</groupId>

‎scouter.agent.batch/pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>io.github.scouter-project</groupId>
77
<artifactId>scouter-parent</artifactId>
8-
<version>2.8.1</version>
8+
<version>2.10.0</version>
99
</parent>
1010

1111
<artifactId>scouter-agent-batch</artifactId>

‎scouter.agent.host/pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>io.github.scouter-project</groupId>
66
<artifactId>scouter-parent</artifactId>
7-
<version>2.8.1</version>
7+
<version>2.10.0</version>
88
</parent>
99

1010
<artifactId>scouter-agent-host</artifactId>

‎scouter.agent.java/pom.xml‎

Lines changed: 69 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>io.github.scouter-project</groupId>
66
<artifactId>scouter-parent</artifactId>
7-
<version>2.8.1</version>
7+
<version>2.10.0</version>
88
</parent>
99

1010
<artifactId>scouter-agent-java</artifactId>
@@ -79,6 +79,17 @@
7979
<include name="scouter/xtra/redis/*.class" />
8080
</fileset>
8181
</jar>
82+
<jar destfile="${project.build.directory}/${scouter.reactive.jar}">
83+
<fileset dir="${project.build.outputDirectory}">
84+
<include name="scouter/xtra/reactive/*.class" />
85+
<include name="reactor/**/*.class" />
86+
</fileset>
87+
</jar>
88+
<jar destfile="${project.build.directory}/${scouter.java8.jar}">
89+
<fileset dir="${project.build.outputDirectory}">
90+
<include name="scouter/xtra/java8/*.class" />
91+
</fileset>
92+
</jar>
8293
</target>
8394
</configuration>
8495
<goals>
@@ -101,6 +112,8 @@
101112
<include name="${scouter.tools.jar}" />
102113
<include name="${scouter.kafka.jar}" />
103114
<include name="${scouter.redis.jar}" />
115+
<include name="${scouter.reactive.jar}" />
116+
<include name="${scouter.java8.jar}" />
104117
</fileset>
105118
<zipfileset src="${final.jar.name}" />
106119

@@ -121,6 +134,8 @@
121134
<delete file="${project.build.directory}/${scouter.tools.jar}" />
122135
<delete file="${project.build.directory}/${scouter.kafka.jar}" />
123136
<delete file="${project.build.directory}/${scouter.redis.jar}" />
137+
<delete file="${project.build.directory}/${scouter.reactive.jar}" />
138+
<delete file="${project.build.directory}/${scouter.java8.jar}" />
124139

125140
<!-- for constant name file -->
126141
<jar destfile="${project.build.directory}/${scouter.agent.file.name}">
@@ -136,7 +151,7 @@
136151

137152
<!-- for min file -->
138153
<jar destfile="${project.build.directory}/${scouter.agent.min.file.name}">
139-
<zipfileset src="${final.jar.name}" excludes="scouter/repack/net/bytebuddy/**/*" />
154+
<zipfileset src="${final.jar.name}"/>
140155
<manifest>
141156
<attribute name="Premain-Class" value="scouter.agent.JavaAgent" />
142157
<attribute name="Agent-Class" value="scouter.agent.JavaAgent" />
@@ -206,6 +221,12 @@
206221
<compilerVersion>1.6</compilerVersion>
207222
<source>1.6</source>
208223
<target>1.6</target>
224+
<excludes>
225+
<exclude>scouter/xtra/reactive/*.java</exclude>
226+
<exclude>scouter/xtra/java8/*.java</exclude>
227+
<exclude>reactor/**/*.java</exclude>
228+
<exclude>com/**/*.java</exclude>
229+
</excludes>
209230
</configuration>
210231
</plugin>
211232
<plugin>
@@ -340,6 +361,8 @@
340361
<scouter.tools.jar>scouter.tools.jar</scouter.tools.jar>
341362
<scouter.kafka.jar>scouter.kafka.jar</scouter.kafka.jar>
342363
<scouter.redis.jar>scouter.redis.jar</scouter.redis.jar>
364+
<scouter.reactive.jar>scouter.reactive.jar</scouter.reactive.jar>
365+
<scouter.java8.jar>scouter.java8.jar</scouter.java8.jar>
343366

344367
<provided.tools.jar>${project.basedir}/lib/provided/tools.jar</provided.tools.jar>
345368
<java.net.http.jar>${project.basedir}/lib/provided/java.net.http.jar</java.net.http.jar>
@@ -361,19 +384,14 @@
361384
<dependency>
362385
<groupId>org.ow2.asm</groupId>
363386
<artifactId>asm</artifactId>
364-
<version>7.0</version>
387+
<version>8.0.1</version>
365388
</dependency>
366389
<dependency>
367390
<groupId>org.ow2.asm</groupId>
368391
<artifactId>asm-commons</artifactId>
369-
<version>7.0</version>
392+
<version>8.0.1</version>
370393
</dependency>
371394
<!-- local lib -->
372-
<dependency>
373-
<groupId>com.github.scouter-project</groupId>
374-
<artifactId>byte-buddy-nodep-scouter-repack</artifactId>
375-
<version>1.7.1.RC1</version>
376-
</dependency>
377395
<dependency>
378396
<groupId>jdk.tools</groupId>
379397
<artifactId>jdk.tools</artifactId>
@@ -423,13 +441,37 @@
423441
<dependency>
424442
<groupId>org.springframework</groupId>
425443
<artifactId>spring-web</artifactId>
426-
<version>4.3.18.RELEASE</version>
444+
<version>5.2.8.RELEASE</version>
445+
<scope>provided</scope>
446+
</dependency>
447+
<dependency>
448+
<groupId>org.springframework</groupId>
449+
<artifactId>spring-webflux</artifactId>
450+
<version>5.2.8.RELEASE</version>
451+
<scope>provided</scope>
452+
</dependency>
453+
<dependency>
454+
<groupId>io.projectreactor</groupId>
455+
<artifactId>reactor-core</artifactId>
456+
<version>3.3.8.RELEASE</version>
457+
<scope>provided</scope>
458+
</dependency>
459+
<dependency>
460+
<groupId>org.jetbrains.kotlinx</groupId>
461+
<artifactId>kotlinx-coroutines-reactor</artifactId>
462+
<version>1.3.8</version>
463+
<scope>provided</scope>
464+
</dependency>
465+
<dependency>
466+
<groupId>org.jetbrains.kotlin</groupId>
467+
<artifactId>kotlin-stdlib-jdk8</artifactId>
468+
<version>1.3.72</version>
427469
<scope>provided</scope>
428470
</dependency>
429471
<dependency>
430472
<groupId>org.springframework</groupId>
431473
<artifactId>spring-core</artifactId>
432-
<version>4.3.19.RELEASE</version>
474+
<version>5.2.8.RELEASE</version>
433475
<scope>provided</scope>
434476
</dependency>
435477
<dependency>
@@ -438,6 +480,19 @@
438480
<version>0.10.1.0</version>
439481
<scope>provided</scope>
440482
</dependency>
483+
<dependency>
484+
<groupId>org.elasticsearch.client</groupId>
485+
<artifactId>elasticsearch-rest-client</artifactId>
486+
<version>6.8.10</version>
487+
<scope>provided</scope>
488+
</dependency>
489+
<dependency>
490+
<groupId>org.mongodb</groupId>
491+
<artifactId>mongodb-driver-core</artifactId>
492+
<version>4.0.5</version>
493+
<scope>provided</scope>
494+
</dependency>
495+
441496
<dependency>
442497
<groupId>io.lettuce</groupId>
443498
<artifactId>lettuce-core</artifactId>
@@ -482,7 +537,9 @@
482537
</manifestEntries>
483538
</archive>
484539
<excludes>
485-
<exclude>**/scouter/xtra/**</exclude>
540+
<exclude>scouter/xtra/**</exclude>
541+
<exclude>reactor/**</exclude>
542+
<exclude>com/**</exclude>
486543
</excludes>
487544
</configuration>
488545
</plugin>
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* Copyright 2008-present MongoDB, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
//for mongo driver 3.8
18+
package com.mongodb.async;
19+
20+
/**
21+
* An interface to describe the completion of an asynchronous operation.
22+
*
23+
* @param <T> the result type
24+
* @since 3.0
25+
*/
26+
public interface SingleResultCallback<T> {
27+
/**
28+
* Called when the operation completes.
29+
* @param result the result, which may be null. Always null if e is not null.
30+
* @param t the throwable, or null if the operation completed normally
31+
*/
32+
void onResult(T result, Throwable t);
33+
}
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
/*
2+
* Copyright (c) 2008-2014 MongoDB, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
//for mongo db driver 3.6
18+
package com.mongodb.connection;
19+
20+
import com.mongodb.async.SingleResultCallback;
21+
import com.mongodb.internal.connection.CommandMessage;
22+
import com.mongodb.internal.connection.ResponseBuffers;
23+
import com.mongodb.internal.session.SessionContext;
24+
import org.bson.ByteBuf;
25+
import org.bson.codecs.Decoder;
26+
27+
import java.util.List;
28+
29+
public interface InternalConnection extends BufferProvider {
30+
31+
/**
32+
* Gets the description of this connection.
33+
*
34+
* @return the connection description
35+
*/
36+
ConnectionDescription getDescription();
37+
38+
/**
39+
* Opens the connection so its ready for use
40+
*/
41+
void open();
42+
43+
/**
44+
* Opens the connection so its ready for use
45+
*
46+
* @param callback the callback to be called once the connection has been opened
47+
*/
48+
void openAsync(SingleResultCallback<Void> callback);
49+
50+
/**
51+
* Closes the connection.
52+
*/
53+
void close();
54+
55+
/**
56+
* Returns if the connection has been opened
57+
*
58+
* @return true if connection has been opened
59+
*/
60+
boolean opened();
61+
62+
/**
63+
* Returns the closed state of the connection
64+
*
65+
* @return true if connection is closed
66+
*/
67+
boolean isClosed();
68+
69+
/**
70+
* Send a command message to the server.
71+
*
72+
* @param message the command message to send
73+
* @param sessionContext the session context
74+
*/
75+
<T> T sendAndReceive(CommandMessage message, Decoder<T> decoder, SessionContext sessionContext);
76+
77+
/**
78+
* Send a command message to the server.
79+
*
80+
* @param message the command message to send
81+
* @param sessionContext the session context
82+
* @param callback the callback
83+
*/
84+
<T> void sendAndReceiveAsync(CommandMessage message, Decoder<T> decoder, SessionContext sessionContext,
85+
SingleResultCallback<T> callback);
86+
87+
/**
88+
* Send a message to the server. The connection may not make any attempt to validate the integrity of the message.
89+
*
90+
* @param byteBuffers the list of byte buffers to send.
91+
* @param lastRequestId the request id of the last message in byteBuffers
92+
*/
93+
void sendMessage(List<ByteBuf> byteBuffers, int lastRequestId);
94+
95+
/**
96+
* Receive a response to a sent message from the server.
97+
*
98+
* @param responseTo the request id that this message is a response to
99+
* @return the response
100+
*/
101+
ResponseBuffers receiveMessage(int responseTo);
102+
103+
/**
104+
* Asynchronously send a message to the server. The connection may not make any attempt to validate the integrity of the message.
105+
*
106+
* @param byteBuffers the list of byte buffers to send
107+
* @param lastRequestId the request id of the last message in byteBuffers
108+
* @param callback the callback to invoke on completion
109+
*/
110+
void sendMessageAsync(List<ByteBuf> byteBuffers, int lastRequestId, SingleResultCallback<Void> callback);
111+
112+
/**
113+
* Asynchronously receive a response to a sent message from the server.
114+
*
115+
* @param responseTo the request id that this message is a response to
116+
* @param callback the callback to invoke on completion
117+
*/
118+
void receiveMessageAsync(int responseTo, SingleResultCallback<ResponseBuffers> callback);
119+
120+
}

0 commit comments

Comments
 (0)