use of co.elastic.apm.impl.error.ErrorCapture in project apm-agent-java by elastic.
the class BodyProcessorTest method processError.
private ErrorCapture processError() {
final ErrorCapture error = new ErrorCapture();
error.getContext().getRequest().withRawBody("foo");
bodyProcessor.processBeforeReport(error);
return error;
}
use of co.elastic.apm.impl.error.ErrorCapture in project apm-agent-java by elastic.
the class BodyProcessorTest method processBeforeReport_Error_EventTypeOff.
@Test
void processBeforeReport_Error_EventTypeOff() {
when(config.getCaptureBody()).thenReturn(WebConfiguration.EventType.OFF);
final ErrorCapture error = processError();
assertThat(error.getContext().getRequest().getBody()).isEqualTo("[REDACTED]");
}
Aggregations