Skip to content

Commit

Permalink
elastic#3030: Removing unused error capture.
Browse files Browse the repository at this point in the history
  • Loading branch information
raphw committed Feb 22, 2023
1 parent 73ee8a8 commit b6f55ad
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 62 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -487,12 +487,6 @@ public String captureAndReportException(long epochMicros, @Nullable Throwable e,
return captureAndReportException(epochMicros, e, (AbstractSpan<?>) parent);
}

@Nullable
@Override
public co.elastic.apm.plugin.spi.ErrorCapture captureException(@Nullable Throwable e, @Nullable co.elastic.apm.plugin.spi.AbstractSpan<?> parent, @Nullable ClassLoader initiatingClassLoader) {
return captureException(e, (AbstractSpan<?>) parent, initiatingClassLoader);
}

@Override
public void endSpan(co.elastic.apm.plugin.spi.Span<?> span) {
endSpan((Span) span);
Expand All @@ -503,11 +497,6 @@ public void endTransaction(co.elastic.apm.plugin.spi.Transaction<?> transaction)
endTransaction((Transaction) transaction);
}

@Override
public void endError(co.elastic.apm.plugin.spi.ErrorCapture errorCapture) {
endError((ErrorCapture) errorCapture);
}

@Override
public void setServiceInfoForClassLoader(ClassLoader classLoader, co.elastic.apm.plugin.spi.ServiceInfo serviceInfo) {
setServiceInfoForClassLoader(classLoader, serviceInfo.isMultiServiceContainer()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,12 +302,6 @@ public String captureAndReportException(long epochMicros, @Nullable Throwable e,
return tracer.captureAndReportException(epochMicros, e, parent);
}

@Nullable
@Override
public co.elastic.apm.plugin.spi.ErrorCapture captureException(@Nullable Throwable e, @Nullable co.elastic.apm.plugin.spi.AbstractSpan<?> parent, @Nullable ClassLoader initiatingClassLoader) {
return tracer.captureException(e, parent, initiatingClassLoader);
}

@Override
public void endSpan(co.elastic.apm.plugin.spi.Span<?> span) {
tracer.endSpan(span);
Expand All @@ -318,11 +312,6 @@ public void endTransaction(co.elastic.apm.plugin.spi.Transaction<?> transaction)
tracer.endTransaction(transaction);
}

@Override
public void endError(co.elastic.apm.plugin.spi.ErrorCapture errorCapture) {
tracer.endError(errorCapture);
}

@Override
public void setServiceInfoForClassLoader(ClassLoader classLoader, co.elastic.apm.plugin.spi.ServiceInfo serviceInfo) {
tracer.setServiceInfoForClassLoader(classLoader, serviceInfo);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,6 @@ public String captureAndReportException(long epochMicros, @Nullable Throwable e,
return null;
}

@Nullable
@Override
public co.elastic.apm.plugin.spi.ErrorCapture captureException(@Nullable Throwable e, @Nullable co.elastic.apm.plugin.spi.AbstractSpan<?> parent, @Nullable ClassLoader initiatingClassLoader) {
return null;
}

@Override
public void endSpan(co.elastic.apm.plugin.spi.Span<?> span) {
}
Expand All @@ -219,10 +213,6 @@ public void endSpan(co.elastic.apm.plugin.spi.Span<?> span) {
public void endTransaction(co.elastic.apm.plugin.spi.Transaction<?> transaction) {
}

@Override
public void endError(co.elastic.apm.plugin.spi.ErrorCapture errorCapture) {
}

@Override
public void setServiceInfoForClassLoader(ClassLoader classLoader, co.elastic.apm.plugin.spi.ServiceInfo serviceInfo) {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
/**
* Data captured by an agent representing an event occurring in a monitored service
*/
public class ErrorCapture implements Recyclable, co.elastic.apm.plugin.spi.ErrorCapture {
public class ErrorCapture implements Recyclable {

private static final Logger logger = LoggerFactory.getLogger(ErrorCapture.class);

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,6 @@ public String captureAndReportException(long epochMicros, @Nullable Throwable e,
return tracer.captureAndReportException(epochMicros, e, parent);
}

@Nullable
public ErrorCapture captureException(@Nullable Throwable e, @Nullable AbstractSpan<?> parent, @Nullable ClassLoader initiatingClassLoader) {
return tracer.captureException(e, parent, initiatingClassLoader);
}

@Nullable
@Override
public Span<?> getActiveExitSpan() {
Expand All @@ -137,11 +132,6 @@ public void endTransaction(Transaction<?> transaction) {
tracer.endTransaction(transaction);
}

@Override
public void endError(ErrorCapture errorCapture) {
tracer.endError(errorCapture);
}

@Override
public <T> T getConfig(Class<T> configuration) {
return tracer.getConfig(configuration);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,6 @@ public String captureAndReportException(long epochMicros, @Nullable Throwable e,
return null;
}

@Nullable
@Override
public ErrorCapture captureException(@Nullable Throwable e, @Nullable AbstractSpan<?> parent, @Nullable ClassLoader initiatingClassLoader) {
return null;
}

@Nullable
@Override
public Span<?> getActiveExitSpan() {
Expand All @@ -93,10 +87,6 @@ public void endSpan(Span<?> span) {
public void endTransaction(Transaction<?> transaction) {
}

@Override
public void endError(ErrorCapture errorCapture) {
}

@Override
public <T> T getConfig(Class<T> configuration) {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ public interface Tracer {
@Nullable
String captureAndReportException(long epochMicros, @Nullable Throwable e, @Nullable AbstractSpan<?> parent);

@Nullable
ErrorCapture captureException(@Nullable Throwable e, @Nullable AbstractSpan<?> parent, @Nullable ClassLoader initiatingClassLoader);

@Nullable
Span<?> getActiveExitSpan();

Expand All @@ -64,8 +61,6 @@ public interface Tracer {

void endTransaction(Transaction<?> transaction);

void endError(ErrorCapture errorCapture);

<T> T getConfig(Class<T> configuration);

ObjectPoolFactory getObjectPoolFactory();
Expand Down

0 comments on commit b6f55ad

Please sign in to comment.