class DetectorController {

    @GetMapping(path = "/findByUuid", produces = "application/json")
    @ResponseStatus(HttpStatus.OK)
    public Detector findByUuid(@RequestParam String uuid, @RequestHeader HttpHeaders headers) {
        SpanContext parentSpanContext = trace.extractParentSpan(headers);
        Span span = trace.startSpan("find-detector-by-uuid", parentSpanContext);
        Detector detector = service.findByUuid(uuid);
        if (detector == null) {
            span.setTag("Error", "Invalid UUID");
            span.finish();
            throw new RecordNotFoundException("Invalid UUID: " + uuid);
        }
        span.finish();
        return detector;
    }

}