Skip to content

Commit 0b4a5b1

Browse files
author
Doug Hilpipre
committed
added support for spring-integration-ip-7.0.0
1 parent e1e7add commit 0b4a5b1

5 files changed

Lines changed: 292 additions & 1 deletion

File tree

settings.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ include 'spring-integration-core-5.1.0'
77
include 'spring-integration-core-5.3.0'
88
include 'spring-integration-ws-4.0.0'
99
include 'spring-integration-ip-4.0.0'
10+
include 'spring-integration-ip-7.0.0'
1011
include 'spring-messaging-5.2.0'
1112
include 'spring-messaging-4.0.0'

spring-integration-ip-4.0.0/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jar {
2626
}
2727

2828
verifyInstrumentation {
29-
passesOnly 'org.springframework.integration:spring-integration-ip:[4.0.0,)'
29+
passesOnly 'org.springframework.integration:spring-integration-ip:[4.0.0,7.0.0)'
3030
excludeRegex '.*M[0-9]'
3131
excludeRegex '.*RC[0-9]'
3232
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
2+
// Build.gradle generated for instrumentation module Spring-Integration-IP-4.0.0
3+
4+
apply plugin: 'java'
5+
targetCompatibility=JavaVersion.VERSION_17
6+
dependencies {
7+
implementation 'org.springframework.integration:spring-integration-ip:7.0.0'
8+
implementation 'org.springframework:spring-messaging:7.0.0'
9+
10+
// New Relic Labs Java Agent dependencies
11+
implementation 'com.newrelic.agent.java:newrelic-agent:8.4.0'
12+
implementation 'com.newrelic.agent.java:newrelic-api:8.4.0'
13+
implementation 'com.newrelic.agent.java:agent-bridge:8.4.0'
14+
implementation fileTree(include: ['*.jar'], dir: '../test-lib')
15+
}
16+
17+
jar {
18+
manifest {
19+
attributes 'Implementation-Title': 'com.newrelic.instrumentation.labs.spring-integration-ip-7.0.0'
20+
attributes 'Implementation-Vendor': 'New Relic Labs'
21+
attributes 'Implementation-Vendor-Id': 'com.newrelic.labs'
22+
attributes 'Implementation-Version': 1.0
23+
}
24+
}
25+
26+
verifyInstrumentation {
27+
passesOnly 'org.springframework.integration:spring-integration-ip:[7.0.0,)'
28+
excludeRegex '.*M[0-9]'
29+
excludeRegex '.*RC[0-9]'
30+
}
Lines changed: 239 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,239 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module relativePaths="true" type="JAVA_MODULE" version="4">
3+
<component name="NewModuleRootManager" inherit-compiler-output="true" LANGUAGE_LEVEL="JDK_1_8">
4+
<exclude-output/>
5+
<orderEntry type="inheritedJdk"/>
6+
<content url="file://$MODULE_DIR$/">
7+
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false"/>
8+
<excludeFolder url="file://$MODULE_DIR$/.gradle"/>
9+
<excludeFolder url="file://$MODULE_DIR$/build"/>
10+
</content>
11+
<orderEntry type="sourceFolder" forTests="false"/>
12+
<orderEntry type="module-library">
13+
<library>
14+
<CLASSES>
15+
<root url="jar:///Users/dhilpipre/.gradle/caches/modules-2/files-2.1/org.springframework.integration/spring-integration-ip/7.0.0/6e836df07b43fd5dc53881b187bef0e70ddda067/spring-integration-ip-7.0.0.jar!/"/>
16+
</CLASSES>
17+
<JAVADOC/>
18+
<SOURCES>
19+
<root url="jar:///Users/dhilpipre/.gradle/caches/modules-2/files-2.1/org.springframework.integration/spring-integration-ip/7.0.0/61e70f1cca056c96f722e120b960161be6f1f547/spring-integration-ip-7.0.0-sources.jar!/"/>
20+
</SOURCES>
21+
</library>
22+
</orderEntry>
23+
<orderEntry type="module-library">
24+
<library>
25+
<CLASSES>
26+
<root url="jar:///Users/dhilpipre/.gradle/caches/modules-2/files-2.1/org.springframework.integration/spring-integration-core/7.0.0/1856e684a1867820240f4305c4d61a7b06acb778/spring-integration-core-7.0.0.jar!/"/>
27+
</CLASSES>
28+
<JAVADOC/>
29+
<SOURCES>
30+
<root url="jar:///Users/dhilpipre/.gradle/caches/modules-2/files-2.1/org.springframework.integration/spring-integration-core/7.0.0/32a63f7ce0925def7cc72afcb632a339c37c4463/spring-integration-core-7.0.0-sources.jar!/"/>
31+
</SOURCES>
32+
</library>
33+
</orderEntry>
34+
<orderEntry type="module-library">
35+
<library>
36+
<CLASSES>
37+
<root url="jar:///Users/dhilpipre/.gradle/caches/modules-2/files-2.1/org.springframework/spring-messaging/7.0.0/5e0dacf50a5b52d870a45782ba88cb20690ae276/spring-messaging-7.0.0.jar!/"/>
38+
</CLASSES>
39+
<JAVADOC/>
40+
<SOURCES>
41+
<root url="jar:///Users/dhilpipre/.gradle/caches/modules-2/files-2.1/org.springframework/spring-messaging/7.0.0/2c6572e3e87becee869d68eda5659885b6349a2a/spring-messaging-7.0.0-sources.jar!/"/>
42+
</SOURCES>
43+
</library>
44+
</orderEntry>
45+
<orderEntry type="module-library">
46+
<library>
47+
<CLASSES>
48+
<root url="jar:///Users/dhilpipre/.m2/repository/com/newrelic/agent/java/newrelic-agent/8.4.0/newrelic-agent-8.4.0.jar!/"/>
49+
</CLASSES>
50+
<JAVADOC/>
51+
<SOURCES/>
52+
</library>
53+
</orderEntry>
54+
<orderEntry type="module-library">
55+
<library>
56+
<CLASSES>
57+
<root url="jar:///Users/dhilpipre/.gradle/caches/modules-2/files-2.1/com.newrelic.agent.java/agent-bridge/8.4.0/46660462c836e54313d3799ff3e714a434136973/agent-bridge-8.4.0.jar!/"/>
58+
</CLASSES>
59+
<JAVADOC/>
60+
<SOURCES>
61+
<root url="jar:///Users/dhilpipre/.gradle/caches/modules-2/files-2.1/com.newrelic.agent.java/agent-bridge/8.4.0/5c86205b5409e572783ea8ee04c239a458c09b8d/agent-bridge-8.4.0-sources.jar!/"/>
62+
</SOURCES>
63+
</library>
64+
</orderEntry>
65+
<orderEntry type="module-library">
66+
<library>
67+
<CLASSES>
68+
<root url="jar:///Users/dhilpipre/.m2/repository/com/newrelic/agent/java/newrelic-api/8.4.0/newrelic-api-8.4.0.jar!/"/>
69+
</CLASSES>
70+
<JAVADOC/>
71+
<SOURCES>
72+
<root url="jar:///Users/dhilpipre/.m2/repository/com/newrelic/agent/java/newrelic-api/8.4.0/newrelic-api-8.4.0-sources.jar!/"/>
73+
</SOURCES>
74+
</library>
75+
</orderEntry>
76+
<orderEntry type="module-library">
77+
<library>
78+
<CLASSES>
79+
<root url="jar:///Users/dhilpipre/.gradle/caches/modules-2/files-2.1/org.springframework/spring-context/7.0.0/9f85ae837d5942f875438e42c1781bf8bcab03d3/spring-context-7.0.0.jar!/"/>
80+
</CLASSES>
81+
<JAVADOC/>
82+
<SOURCES>
83+
<root url="jar:///Users/dhilpipre/.gradle/caches/modules-2/files-2.1/org.springframework/spring-context/7.0.0/37eeac53e44f5a3ac641f13a00ef941c5dbef468/spring-context-7.0.0-sources.jar!/"/>
84+
</SOURCES>
85+
</library>
86+
</orderEntry>
87+
<orderEntry type="module-library">
88+
<library>
89+
<CLASSES>
90+
<root url="jar:///Users/dhilpipre/.gradle/caches/modules-2/files-2.1/org.springframework/spring-aop/7.0.0/5e00066b6a67cb954cfae97145b6f5acccaa5523/spring-aop-7.0.0.jar!/"/>
91+
</CLASSES>
92+
<JAVADOC/>
93+
<SOURCES>
94+
<root url="jar:///Users/dhilpipre/.gradle/caches/modules-2/files-2.1/org.springframework/spring-aop/7.0.0/626141e80c6e070332ebd8ab29b0a1a0fbb189ef/spring-aop-7.0.0-sources.jar!/"/>
95+
</SOURCES>
96+
</library>
97+
</orderEntry>
98+
<orderEntry type="module-library">
99+
<library>
100+
<CLASSES>
101+
<root url="jar:///Users/dhilpipre/.gradle/caches/modules-2/files-2.1/org.springframework/spring-tx/7.0.0/a71e45e139a5402002c1975d254ce02867a0b020/spring-tx-7.0.0.jar!/"/>
102+
</CLASSES>
103+
<JAVADOC/>
104+
<SOURCES>
105+
<root url="jar:///Users/dhilpipre/.gradle/caches/modules-2/files-2.1/org.springframework/spring-tx/7.0.0/9fff5dca6be2dd7c0c8fa3d7d7d947e0fd7a85fa/spring-tx-7.0.0-sources.jar!/"/>
106+
</SOURCES>
107+
</library>
108+
</orderEntry>
109+
<orderEntry type="module-library">
110+
<library>
111+
<CLASSES>
112+
<root url="jar:///Users/dhilpipre/.gradle/caches/modules-2/files-2.1/org.springframework/spring-beans/7.0.0/be4a16aa0eaba2bc26387310df83d7651aafcce2/spring-beans-7.0.0.jar!/"/>
113+
</CLASSES>
114+
<JAVADOC/>
115+
<SOURCES>
116+
<root url="jar:///Users/dhilpipre/.gradle/caches/modules-2/files-2.1/org.springframework/spring-beans/7.0.0/f6e8884ef24526f5878c712880f4463738bd104f/spring-beans-7.0.0-sources.jar!/"/>
117+
</SOURCES>
118+
</library>
119+
</orderEntry>
120+
<orderEntry type="module-library">
121+
<library>
122+
<CLASSES>
123+
<root url="jar:///Users/dhilpipre/.gradle/caches/modules-2/files-2.1/org.springframework/spring-expression/7.0.0/6e1c78dd8e7d1ff5acd761d48af4082eabd2b5c1/spring-expression-7.0.0.jar!/"/>
124+
</CLASSES>
125+
<JAVADOC/>
126+
<SOURCES>
127+
<root url="jar:///Users/dhilpipre/.gradle/caches/modules-2/files-2.1/org.springframework/spring-expression/7.0.0/5053e6807f2279b9af1b7427d884b075481f8cca/spring-expression-7.0.0-sources.jar!/"/>
128+
</SOURCES>
129+
</library>
130+
</orderEntry>
131+
<orderEntry type="module-library">
132+
<library>
133+
<CLASSES>
134+
<root url="jar:///Users/dhilpipre/.gradle/caches/modules-2/files-2.1/org.springframework/spring-core/7.0.0/309082ed0b2feb050492799f018ea922b1332bf2/spring-core-7.0.0.jar!/"/>
135+
</CLASSES>
136+
<JAVADOC/>
137+
<SOURCES>
138+
<root url="jar:///Users/dhilpipre/.gradle/caches/modules-2/files-2.1/org.springframework/spring-core/7.0.0/18f5ec8ebdcb945f9909668546dc9232c628011c/spring-core-7.0.0-sources.jar!/"/>
139+
</SOURCES>
140+
</library>
141+
</orderEntry>
142+
<orderEntry type="module-library">
143+
<library>
144+
<CLASSES>
145+
<root url="jar:///Users/dhilpipre/.gradle/caches/modules-2/files-2.1/com.newrelic.agent.java/newrelic-weaver-api/8.4.0/a0acc7c7399bae8383f8f3deb75189e618523253/newrelic-weaver-api-8.4.0.jar!/"/>
146+
</CLASSES>
147+
<JAVADOC/>
148+
<SOURCES>
149+
<root url="jar:///Users/dhilpipre/.gradle/caches/modules-2/files-2.1/com.newrelic.agent.java/newrelic-weaver-api/8.4.0/a3ea16db00546acb14d1a43183d11b13216adca7/newrelic-weaver-api-8.4.0-sources.jar!/"/>
150+
</SOURCES>
151+
</library>
152+
</orderEntry>
153+
<orderEntry type="module-library">
154+
<library>
155+
<CLASSES>
156+
<root url="jar:///Users/dhilpipre/.gradle/caches/modules-2/files-2.1/io.projectreactor/reactor-core/3.8.0/21d51d40dda28f8cc3ab9a22fb35dd6146e4323b/reactor-core-3.8.0.jar!/"/>
157+
</CLASSES>
158+
<JAVADOC/>
159+
<SOURCES>
160+
<root url="jar:///Users/dhilpipre/.gradle/caches/modules-2/files-2.1/io.projectreactor/reactor-core/3.8.0/83701b72a13eb2f55df097d1a30bb4c4682faca/reactor-core-3.8.0-sources.jar!/"/>
161+
</SOURCES>
162+
</library>
163+
</orderEntry>
164+
<orderEntry type="module-library">
165+
<library>
166+
<CLASSES>
167+
<root url="jar:///Users/dhilpipre/.gradle/caches/modules-2/files-2.1/io.micrometer/micrometer-observation/1.16.0/3dc3a2bec5121417b638191b1f3aed16c9764667/micrometer-observation-1.16.0.jar!/"/>
168+
</CLASSES>
169+
<JAVADOC/>
170+
<SOURCES>
171+
<root url="jar:///Users/dhilpipre/.gradle/caches/modules-2/files-2.1/io.micrometer/micrometer-observation/1.16.0/2c6b94b6d201da0d0b63480b46c519d6c6f788da/micrometer-observation-1.16.0-sources.jar!/"/>
172+
</SOURCES>
173+
</library>
174+
</orderEntry>
175+
<orderEntry type="module-library">
176+
<library>
177+
<CLASSES>
178+
<root url="jar:///Users/dhilpipre/.m2/repository/commons-logging/commons-logging/1.3.5/commons-logging-1.3.5.jar!/"/>
179+
</CLASSES>
180+
<JAVADOC/>
181+
<SOURCES/>
182+
</library>
183+
</orderEntry>
184+
<orderEntry type="module-library">
185+
<library>
186+
<CLASSES>
187+
<root url="jar:///Users/dhilpipre/.gradle/caches/modules-2/files-2.1/io.micrometer/micrometer-commons/1.16.0/d45ae92945c59eecf485433923fa6a5cf9ce0dbe/micrometer-commons-1.16.0.jar!/"/>
188+
</CLASSES>
189+
<JAVADOC/>
190+
<SOURCES>
191+
<root url="jar:///Users/dhilpipre/.gradle/caches/modules-2/files-2.1/io.micrometer/micrometer-commons/1.16.0/feb066c2ddf2c205c8c9891ac80fb0ca7bc51592/micrometer-commons-1.16.0-sources.jar!/"/>
192+
</SOURCES>
193+
</library>
194+
</orderEntry>
195+
<orderEntry type="module-library">
196+
<library>
197+
<CLASSES>
198+
<root url="jar:///Users/dhilpipre/.m2/repository/org/jspecify/jspecify/1.0.0/jspecify-1.0.0.jar!/"/>
199+
</CLASSES>
200+
<JAVADOC/>
201+
<SOURCES>
202+
<root url="jar:///Users/dhilpipre/.m2/repository/org/jspecify/jspecify/1.0.0/jspecify-1.0.0-sources.jar!/"/>
203+
</SOURCES>
204+
</library>
205+
</orderEntry>
206+
<orderEntry type="module-library">
207+
<library>
208+
<CLASSES>
209+
<root url="jar:///Users/dhilpipre/.m2/repository/org/reactivestreams/reactive-streams/1.0.4/reactive-streams-1.0.4.jar!/"/>
210+
</CLASSES>
211+
<JAVADOC/>
212+
<SOURCES>
213+
<root url="jar:///Users/dhilpipre/.m2/repository/org/reactivestreams/reactive-streams/1.0.4/reactive-streams-1.0.4-sources.jar!/"/>
214+
</SOURCES>
215+
</library>
216+
</orderEntry>
217+
<orderEntry type="module-library">
218+
<library>
219+
<CLASSES>
220+
<root url="jar:///Users/dhilpipre/Open-Source/newrelic-java-spring-integration/test-lib/instrumentation-test.jar!/"/>
221+
</CLASSES>
222+
<JAVADOC/>
223+
<SOURCES/>
224+
</library>
225+
</orderEntry>
226+
<orderEntry type="module-library" scope="TEST">
227+
<library>
228+
<CLASSES>
229+
<root url="jar:///Users/dhilpipre/.m2/repository/org/nanohttpd/nanohttpd/2.3.1/nanohttpd-2.3.1.jar!/"/>
230+
</CLASSES>
231+
<JAVADOC/>
232+
<SOURCES>
233+
<root url="jar:///Users/dhilpipre/.m2/repository/org/nanohttpd/nanohttpd/2.3.1/nanohttpd-2.3.1-sources.jar!/"/>
234+
</SOURCES>
235+
</library>
236+
</orderEntry>
237+
</component>
238+
<component name="ModuleRootManager"/>
239+
</module>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package org.springframework.integration.ip.tcp.inbound;
2+
3+
import org.springframework.messaging.Message;
4+
import org.springframework.integration.gateway.MessagingGatewaySupport;
5+
6+
import com.newrelic.api.agent.NewRelic;
7+
import com.newrelic.api.agent.Trace;
8+
import com.newrelic.api.agent.TransactionNamePriority;
9+
import com.newrelic.api.agent.weaver.Weave;
10+
import com.newrelic.api.agent.weaver.Weaver;
11+
12+
@Weave
13+
public abstract class TcpInboundGateway extends MessagingGatewaySupport {
14+
15+
@Trace(dispatcher=true)
16+
public void onMessage(Message<?> message) {
17+
NewRelic.getAgent().getTransaction().setTransactionName(TransactionNamePriority.FRAMEWORK_HIGH, true, "TcpInboundGateway", new String[] {"TcpInboundGateway",getComponentName()});
18+
NewRelic.getAgent().getTracedMethod().setMetricName(new String[] {"Custom","TcpInboundGateway",getComponentName(),"onMessage"});
19+
Weaver.callOriginal();
20+
}
21+
}

0 commit comments

Comments
 (0)