class DetectorMappingController {

    @RequestMapping(value = "/search", method = RequestMethod.POST)
    public List<DetectorMapping> searchDetectorMapping(@RequestBody SearchMappingsRequest request,
                                                       @RequestHeader HttpHeaders httpHeaders) {
        SpanContext parentSpanContext = trace.extractParentSpan(httpHeaders);
        Span span = trace.startSpan("mappings-search", parentSpanContext);
        AssertUtil.isTrue(request.getUserId() != null || request.getDetectorUuid() != null,
                "User id and Detector UUID can't both be null");
        List<DetectorMapping> resultSearchDetectorMapping = detectorMappingRepo.search(request);
        span.finish();
        return resultSearchDetectorMapping;
    }

}