Skip to content

Commit a8b33d5

Browse files
authored
Consistency: instrumentation classes should be in files ending with Instrumentation.java (#8144)
This is so we can direct load requests to a special class-loader that can be unloaded after use. See https://github.com/DataDog/dd-trace-java/blob/master/dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/DatadogClassLoader.java#L97
1 parent 865594b commit a8b33d5

9 files changed

+14
-14
lines changed
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
import net.bytebuddy.asm.Advice;
2323

2424
@AutoService(InstrumenterModule.class)
25-
public class CommonsFileuploadInstrumenter extends InstrumenterModule.Iast
25+
public class CommonsFileuploadInstrumentation extends InstrumenterModule.Iast
2626
implements Instrumenter.ForKnownTypes, Instrumenter.HasMethodAdvice {
2727

28-
public CommonsFileuploadInstrumenter() {
28+
public CommonsFileuploadInstrumentation() {
2929
super("commons-fileupload");
3030
}
3131

Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
import org.apache.commons.fileupload.FileItem;
2323

2424
@AutoService(InstrumenterModule.class)
25-
public class FileItemInstrumenter extends InstrumenterModule.Iast
25+
public class FileItemInstrumentation extends InstrumenterModule.Iast
2626
implements Instrumenter.ForTypeHierarchy, Instrumenter.HasMethodAdvice {
2727

28-
public FileItemInstrumenter() {
28+
public FileItemInstrumentation() {
2929
super("commons-fileupload", "fileitem");
3030
}
3131

Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
import org.apache.commons.fileupload.FileItemStream;
2323

2424
@AutoService(InstrumenterModule.class)
25-
public class FileItemIteratorInstrumenter extends InstrumenterModule.Iast
25+
public class FileItemIteratorInstrumentation extends InstrumenterModule.Iast
2626
implements Instrumenter.ForTypeHierarchy, Instrumenter.HasMethodAdvice {
2727

28-
public FileItemIteratorInstrumenter() {
28+
public FileItemIteratorInstrumentation() {
2929
super("commons-fileupload", "fileitemiterator");
3030
}
3131

Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
import org.apache.commons.fileupload.FileItemStream;
2323

2424
@AutoService(InstrumenterModule.class)
25-
public class FileItemStreamInstrumenter extends InstrumenterModule.Iast
25+
public class FileItemStreamInstrumentation extends InstrumenterModule.Iast
2626
implements Instrumenter.ForTypeHierarchy, Instrumenter.HasMethodAdvice {
2727

28-
public FileItemStreamInstrumenter() {
28+
public FileItemStreamInstrumentation() {
2929
super("commons-fileupload", "fileitemstream");
3030
}
3131

Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
import org.apache.commons.fileupload.FileItemIterator;
2424

2525
@AutoService(InstrumenterModule.class)
26-
public class ServletFileUploadInstrumenter extends InstrumenterModule.Iast
26+
public class ServletFileUploadInstrumentation extends InstrumenterModule.Iast
2727
implements Instrumenter.ForSingleType, Instrumenter.HasMethodAdvice {
2828

29-
public ServletFileUploadInstrumenter() {
29+
public ServletFileUploadInstrumentation() {
3030
super("commons-fileupload", "servlet");
3131
}
3232

dd-java-agent/instrumentation/commons-fileupload/src/test/groovy/FileItemInstrumenterTest.groovy dd-java-agent/instrumentation/commons-fileupload/src/test/groovy/FileItemInstrumentationTest.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import datadog.trace.bootstrap.instrumentation.api.AgentTracer
66
import datadog.trace.bootstrap.instrumentation.api.TagContext
77
import foo.bar.smoketest.MockFileItem
88

9-
class FileItemInstrumenterTest extends AgentTestRunner {
9+
class FileItemInstrumentationTest extends AgentTestRunner {
1010

1111
private Object iastCtx
1212

dd-java-agent/instrumentation/commons-fileupload/src/test/groovy/FileItemIteratorInstrumenterTest.groovy dd-java-agent/instrumentation/commons-fileupload/src/test/groovy/FileItemIteratorInstrumentationTest.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import datadog.trace.bootstrap.instrumentation.api.TagContext
77
import foo.bar.smoketest.MockFileItemIterator
88
import foo.bar.smoketest.MockFileItemStream
99

10-
class FileItemIteratorInstrumenterTest extends AgentTestRunner {
10+
class FileItemIteratorInstrumentationTest extends AgentTestRunner {
1111

1212
private Object iastCtx
1313

dd-java-agent/instrumentation/commons-fileupload/src/test/groovy/FileItemStreamInstrumenterTest.groovy dd-java-agent/instrumentation/commons-fileupload/src/test/groovy/FileItemStreamInstrumentationTest.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import datadog.trace.bootstrap.instrumentation.api.AgentTracer
66
import datadog.trace.bootstrap.instrumentation.api.TagContext
77
import foo.bar.smoketest.MockFileItemStream
88

9-
class FileItemStreamInstrumenterTest extends AgentTestRunner {
9+
class FileItemStreamInstrumentationTest extends AgentTestRunner {
1010

1111
private Object iastCtx
1212

dd-java-agent/instrumentation/commons-fileupload/src/test/groovy/ServletFileUploadInstrumenterTest.groovy dd-java-agent/instrumentation/commons-fileupload/src/test/groovy/ServletFileUploadInstrumentationTest.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import org.apache.commons.fileupload.FileItemIterator
1111
import org.apache.commons.fileupload.disk.DiskFileItemFactory
1212
import org.apache.commons.fileupload.servlet.ServletFileUpload
1313

14-
class ServletFileUploadInstrumenterTest extends AgentTestRunner {
14+
class ServletFileUploadInstrumentationTest extends AgentTestRunner {
1515

1616
private Object iastCtx
1717

0 commit comments

Comments
 (0)