File tree Expand file tree Collapse file tree
agent-jmxfetch/src/main/java/datadog/trace/agent/jmxfetch
aws-java-sdk-1.11.0/src/main/java/datadog/trace/instrumentation/aws/v0
jms/src/main/java/datadog/trace/instrumentation/jms Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616import java .util .Scanner ;
1717import java .util .SortedSet ;
1818import java .util .TreeSet ;
19+
20+ import de .thetaphi .forbiddenapis .SuppressForbidden ;
1921import lombok .extern .slf4j .Slf4j ;
2022import org .datadog .jmxfetch .App ;
2123import org .datadog .jmxfetch .AppConfig ;
@@ -138,6 +140,7 @@ private static String getReporter(final Config config) {
138140 return "statsd:" + host + ":" + port ;
139141 }
140142
143+ @ SuppressForbidden
141144 private static List <String > getInternalMetricFiles () {
142145 try (final InputStream metricConfigsStream =
143146 JMXFetch .class .getResourceAsStream ("metricconfigs.txt" )) {
@@ -152,12 +155,7 @@ private static List<String> getInternalMetricFiles() {
152155 while (scanner .hasNext ()) {
153156 String config = scanner .next ();
154157 integrationName .clear ();
155-
156- if (config .endsWith (".yaml" )) {
157- integrationName .add (config .substring (0 , config .length () - ".yaml" .length ()));
158- } else {
159- integrationName .add (config );
160- }
158+ integrationName .add (config .replace (".yaml" , "" ));
161159
162160 if (Config .get ().isJmxFetchIntegrationEnabled (integrationName , false )) {
163161 final URL resource = JMXFetch .class .getResource ("metricconfigs/" + config );
Original file line number Diff line number Diff line change 1111import datadog .trace .bootstrap .instrumentation .api .AgentSpan ;
1212import datadog .trace .bootstrap .instrumentation .api .UTF8BytesString ;
1313import datadog .trace .bootstrap .instrumentation .decorator .HttpClientDecorator ;
14- import datadog .trace .util .Strings ;
14+ import de .thetaphi .forbiddenapis .SuppressForbidden ;
15+
1516import java .net .URI ;
1617
1718public class AwsSdkClientDecorator extends HttpClientDecorator <Request , Response > {
1819
1920 static final CharSequence COMPONENT_NAME = UTF8BytesString .createConstant ("java-aws-sdk" );
2021
22+ @ SuppressForbidden
2123 private final QualifiedClassNameCache cache =
2224 new QualifiedClassNameCache (
2325 new Function <Class <?>, CharSequence >() {
2426 @ Override
2527 public String apply (Class <?> input ) {
26- return Strings . replace ( input .getSimpleName (), "Request" , "" );
28+ return input .getSimpleName (). replace ( "Request" , "" );
2729 }
2830 },
2931 Functions .SuffixJoin .of (
3032 "." ,
3133 new Function <CharSequence , CharSequence >() {
3234 @ Override
3335 public CharSequence apply (CharSequence serviceName ) {
34- return Strings . replace ( String .valueOf (serviceName ), "Amazon" , "" ).trim ();
36+ return String .valueOf (serviceName ). replace ( "Amazon" , "" ).trim ();
3537 }
3638 }));
3739
Original file line number Diff line number Diff line change 88import java .util .Enumeration ;
99import javax .jms .JMSException ;
1010import javax .jms .Message ;
11+
12+ import de .thetaphi .forbiddenapis .SuppressForbidden ;
1113import lombok .extern .slf4j .Slf4j ;
1214
1315@ Slf4j
1416public class MessageExtractAdapter implements AgentPropagation .ContextVisitor <Message > {
1517
18+ @ SuppressForbidden
1619 private static final boolean USE_LEGACY_DASH_REPLACEMENT =
1720 Config .get ().isJmsLegacyDashReplacement ();
1821
You can’t perform that action at this time.
0 commit comments