refactor(logging): 补齐核心模块日志与中文注释约束
This commit is contained in:
@@ -9,6 +9,7 @@ import com.bruce.observability.vo.ObservabilityModelCallSummaryVO;
|
||||
import com.bruce.observability.vo.ObservabilityRunSummaryVO;
|
||||
import com.bruce.observability.vo.ObservabilityTraceVO;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -20,6 +21,7 @@ import java.util.List;
|
||||
/**
|
||||
* 运行观测控制器,聚合 Workflow、Agent 和模型调用信息,返回脱敏摘要。
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/observability")
|
||||
@RequiredArgsConstructor
|
||||
@@ -31,21 +33,25 @@ public class ObservabilityTraceController {
|
||||
|
||||
@GetMapping("/runs")
|
||||
public RequestResult<List<ObservabilityRunSummaryVO>> runs() {
|
||||
log.info("运行观测列表查询开始");
|
||||
return RequestResult.success(observabilityRunService.listRecentRuns());
|
||||
}
|
||||
|
||||
@GetMapping("/runs/{requestId}")
|
||||
public RequestResult<ObservabilityTraceVO> trace(@PathVariable("requestId") String requestId) {
|
||||
log.info("运行追踪查询开始,requestId={}", requestId);
|
||||
return RequestResult.success(observabilityTraceService.getTrace(requestId));
|
||||
}
|
||||
|
||||
@GetMapping("/model-calls")
|
||||
public RequestResult<List<ObservabilityModelCallSummaryVO>> modelCalls(@RequestParam("requestId") String requestId) {
|
||||
log.info("模型调用摘要查询开始,requestId={}", requestId);
|
||||
return RequestResult.success(observabilityTraceService.listModelCalls(requestId));
|
||||
}
|
||||
|
||||
@GetMapping("/runs/{requestId}/export")
|
||||
public RequestResult<ObservabilityExportVO> export(@PathVariable("requestId") String requestId) {
|
||||
log.info("运行追踪导出开始,requestId={}", requestId);
|
||||
return RequestResult.success(observabilityExportService.exportTrace(requestId));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user