diff --git a/dd-java-agent/instrumentation/java-lang/src/main/java/datadog/trace/instrumentation/java/lang/StringBuilderCallSite.java b/dd-java-agent/instrumentation/java-lang/src/main/java/datadog/trace/instrumentation/java/lang/StringBuilderCallSite.java index 635d7700d30..b56d4f50424 100644 --- a/dd-java-agent/instrumentation/java-lang/src/main/java/datadog/trace/instrumentation/java/lang/StringBuilderCallSite.java +++ b/dd-java-agent/instrumentation/java-lang/src/main/java/datadog/trace/instrumentation/java/lang/StringBuilderCallSite.java @@ -162,6 +162,7 @@ public static String afterSubstring( } @CallSite.After("java.lang.CharSequence java.lang.StringBuilder.subSequence(int, int)") + @CallSite.After("java.lang.CharSequence java.lang.StringBuffer.subSequence(int, int)") public static CharSequence afterSubSequence( @CallSite.This final CharSequence self, @CallSite.Argument final int beginIndex, diff --git a/dd-java-agent/instrumentation/java-lang/src/test/groovy/datadog/trace/instrumentation/java/lang/StringBuilderCallSiteTest.groovy b/dd-java-agent/instrumentation/java-lang/src/test/groovy/datadog/trace/instrumentation/java/lang/StringBuilderCallSiteTest.groovy index b5f73c04112..c989aa9f77d 100644 --- a/dd-java-agent/instrumentation/java-lang/src/test/groovy/datadog/trace/instrumentation/java/lang/StringBuilderCallSiteTest.groovy +++ b/dd-java-agent/instrumentation/java-lang/src/test/groovy/datadog/trace/instrumentation/java/lang/StringBuilderCallSiteTest.groovy @@ -246,6 +246,7 @@ class StringBuilderCallSiteTest extends AgentTestRunner { where: type | suite | param | beginIndex | endIndex | expected "builder" | new TestStringBuilderSuite() | sb('012345') | 1 | 5 | '1234' + "buffer" | new TestStringBufferSuite() | sbf('012345') | 1 | 5 | '1234' } private static class BrokenToString {