use of com.couchbase.client.core.cnc.events.tracing.OverThresholdRequestsRecordedEvent in project couchbase-jvm-clients by couchbase.
the class ThresholdLoggingTracerIntegrationTest method assertInEvent.
private void assertInEvent(String opName) {
waitUntilCondition(() -> eventBus.publishedEvents().stream().anyMatch(e -> e instanceof OverThresholdRequestsRecordedEvent));
List<Event> events = eventBus.publishedEvents().stream().filter(e -> e instanceof OverThresholdRequestsRecordedEvent).collect(Collectors.toList());
boolean found = false;
for (Event event : events) {
String output = event.description();
if (output.contains("\"operation_name\":\"" + opName + "\"")) {
found = true;
}
}
assertTrue(found, "Operation Name: " + opName + " not found!");
}
Aggregations