Skip to content

Commit

Permalink
Consistency: instrumentation classes should be in files ending with I…
Browse files Browse the repository at this point in the history
…nstrumentation.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
  • Loading branch information
mcculls authored Jan 3, 2025
1 parent 865594b commit a8b33d5
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
import net.bytebuddy.asm.Advice;

@AutoService(InstrumenterModule.class)
public class CommonsFileuploadInstrumenter extends InstrumenterModule.Iast
public class CommonsFileuploadInstrumentation extends InstrumenterModule.Iast
implements Instrumenter.ForKnownTypes, Instrumenter.HasMethodAdvice {

public CommonsFileuploadInstrumenter() {
public CommonsFileuploadInstrumentation() {
super("commons-fileupload");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
import org.apache.commons.fileupload.FileItem;

@AutoService(InstrumenterModule.class)
public class FileItemInstrumenter extends InstrumenterModule.Iast
public class FileItemInstrumentation extends InstrumenterModule.Iast
implements Instrumenter.ForTypeHierarchy, Instrumenter.HasMethodAdvice {

public FileItemInstrumenter() {
public FileItemInstrumentation() {
super("commons-fileupload", "fileitem");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
import org.apache.commons.fileupload.FileItemStream;

@AutoService(InstrumenterModule.class)
public class FileItemIteratorInstrumenter extends InstrumenterModule.Iast
public class FileItemIteratorInstrumentation extends InstrumenterModule.Iast
implements Instrumenter.ForTypeHierarchy, Instrumenter.HasMethodAdvice {

public FileItemIteratorInstrumenter() {
public FileItemIteratorInstrumentation() {
super("commons-fileupload", "fileitemiterator");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
import org.apache.commons.fileupload.FileItemStream;

@AutoService(InstrumenterModule.class)
public class FileItemStreamInstrumenter extends InstrumenterModule.Iast
public class FileItemStreamInstrumentation extends InstrumenterModule.Iast
implements Instrumenter.ForTypeHierarchy, Instrumenter.HasMethodAdvice {

public FileItemStreamInstrumenter() {
public FileItemStreamInstrumentation() {
super("commons-fileupload", "fileitemstream");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
import org.apache.commons.fileupload.FileItemIterator;

@AutoService(InstrumenterModule.class)
public class ServletFileUploadInstrumenter extends InstrumenterModule.Iast
public class ServletFileUploadInstrumentation extends InstrumenterModule.Iast
implements Instrumenter.ForSingleType, Instrumenter.HasMethodAdvice {

public ServletFileUploadInstrumenter() {
public ServletFileUploadInstrumentation() {
super("commons-fileupload", "servlet");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import datadog.trace.bootstrap.instrumentation.api.AgentTracer
import datadog.trace.bootstrap.instrumentation.api.TagContext
import foo.bar.smoketest.MockFileItem

class FileItemInstrumenterTest extends AgentTestRunner {
class FileItemInstrumentationTest extends AgentTestRunner {

private Object iastCtx

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import datadog.trace.bootstrap.instrumentation.api.TagContext
import foo.bar.smoketest.MockFileItemIterator
import foo.bar.smoketest.MockFileItemStream

class FileItemIteratorInstrumenterTest extends AgentTestRunner {
class FileItemIteratorInstrumentationTest extends AgentTestRunner {

private Object iastCtx

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import datadog.trace.bootstrap.instrumentation.api.AgentTracer
import datadog.trace.bootstrap.instrumentation.api.TagContext
import foo.bar.smoketest.MockFileItemStream

class FileItemStreamInstrumenterTest extends AgentTestRunner {
class FileItemStreamInstrumentationTest extends AgentTestRunner {

private Object iastCtx

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import org.apache.commons.fileupload.FileItemIterator
import org.apache.commons.fileupload.disk.DiskFileItemFactory
import org.apache.commons.fileupload.servlet.ServletFileUpload

class ServletFileUploadInstrumenterTest extends AgentTestRunner {
class ServletFileUploadInstrumentationTest extends AgentTestRunner {

private Object iastCtx

Expand Down

0 comments on commit a8b33d5

Please sign in to comment.