generated from newrelic-experimental/java-instrumentation-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from newrelic-experimental/camel-enhancements
Camel enhancements
- Loading branch information
Showing
399 changed files
with
6,227 additions
and
15 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#Thu Aug 31 07:21:04 CDT 2023 | ||
gradle.version=7.3 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
...re-3.18/src/main/java/org/apache/camel/processor/errorhandler/RedeliveryErrorHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
package org.apache.camel.processor.errorhandler; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import org.apache.camel.ExtendedExchange; | ||
|
||
import com.newrelic.api.agent.NewRelic; | ||
import com.newrelic.api.agent.weaver.Weave; | ||
import com.newrelic.api.agent.weaver.Weaver; | ||
|
||
@Weave | ||
public abstract class RedeliveryErrorHandler { | ||
|
||
@Weave | ||
protected static class SimpleTask { | ||
|
||
private ExtendedExchange exchange = Weaver.callOriginal(); | ||
|
||
public void run() { | ||
List<String> names = new ArrayList<>(); | ||
names.add("Custom"); | ||
names.add("Camel"); | ||
names.add("RedeliveryErrorHandler"); | ||
names.add("SimpleTask"); | ||
if(exchange != null) { | ||
String routeId = exchange.getFromRouteId(); | ||
if(routeId != null) { | ||
names.add(routeId); | ||
} | ||
|
||
} | ||
String[] metricNames = new String[names.size()]; | ||
names.toArray(metricNames); | ||
NewRelic.getAgent().getTracedMethod().setMetricName(metricNames); | ||
Weaver.callOriginal(); | ||
} | ||
|
||
} | ||
|
||
@Weave | ||
protected static class RedeliveryTask { | ||
|
||
private ExtendedExchange exchange = Weaver.callOriginal(); | ||
|
||
|
||
public void run() { | ||
List<String> names = new ArrayList<>(); | ||
names.add("Custom"); | ||
names.add("Camel"); | ||
names.add("RedeliveryErrorHandler"); | ||
names.add("RedeliveryTask"); | ||
if(exchange != null) { | ||
String routeId = exchange.getFromRouteId(); | ||
if(routeId != null) { | ||
names.add(routeId); | ||
} | ||
|
||
} | ||
String[] metricNames = new String[names.size()]; | ||
names.toArray(metricNames); | ||
NewRelic.getAgent().getTracedMethod().setMetricName(metricNames); | ||
Weaver.callOriginal(); | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
...ore-3.9/src/main/java/org/apache/camel/processor/errorhandler/RedeliveryErrorHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
package org.apache.camel.processor.errorhandler; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import org.apache.camel.ExtendedExchange; | ||
|
||
import com.newrelic.api.agent.NewRelic; | ||
import com.newrelic.api.agent.weaver.Weave; | ||
import com.newrelic.api.agent.weaver.Weaver; | ||
|
||
@Weave | ||
public abstract class RedeliveryErrorHandler { | ||
|
||
@Weave | ||
protected static class SimpleTask { | ||
|
||
private ExtendedExchange exchange = Weaver.callOriginal(); | ||
|
||
public void run() { | ||
List<String> names = new ArrayList<>(); | ||
names.add("Custom"); | ||
names.add("Camel"); | ||
names.add("RedeliveryErrorHandler"); | ||
names.add("SimpleTask"); | ||
if(exchange != null) { | ||
String routeId = exchange.getFromRouteId(); | ||
if(routeId != null) { | ||
names.add(routeId); | ||
} | ||
|
||
} | ||
String[] metricNames = new String[names.size()]; | ||
names.toArray(metricNames); | ||
NewRelic.getAgent().getTracedMethod().setMetricName(metricNames); | ||
Weaver.callOriginal(); | ||
} | ||
|
||
} | ||
|
||
@Weave | ||
protected static class RedeliveryTask { | ||
|
||
private ExtendedExchange exchange = Weaver.callOriginal(); | ||
|
||
|
||
public void run() { | ||
List<String> names = new ArrayList<>(); | ||
names.add("Custom"); | ||
names.add("Camel"); | ||
names.add("RedeliveryErrorHandler"); | ||
names.add("RedeliveryTask"); | ||
if(exchange != null) { | ||
String routeId = exchange.getFromRouteId(); | ||
if(routeId != null) { | ||
names.add(routeId); | ||
} | ||
|
||
} | ||
String[] metricNames = new String[names.size()]; | ||
names.toArray(metricNames); | ||
NewRelic.getAgent().getTracedMethod().setMetricName(metricNames); | ||
Weaver.callOriginal(); | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,4 +39,4 @@ public boolean executeFromQueue() { | |
return Weaver.callOriginal(); | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.