refactor(modules): 拆分多模块工程并收口common基础模块
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package com.bruce.observability.controller;
|
||||
|
||||
import com.bruce.common.domain.model.RequestResult;
|
||||
import com.bruce.observability.vo.ObservabilityTraceVO;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 运行观测控制器先提供占位查询接口,
|
||||
* 后续在 observability 模块完善聚合服务实现。
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/observability")
|
||||
public class ObservabilityTraceController {
|
||||
|
||||
@GetMapping("/trace")
|
||||
public RequestResult<ObservabilityTraceVO> trace(@RequestParam("requestId") String requestId) {
|
||||
ObservabilityTraceVO vo = new ObservabilityTraceVO();
|
||||
vo.setRequestId(requestId);
|
||||
vo.setStepSummaries(List.of());
|
||||
return RequestResult.success(vo);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.bruce.observability.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* requestId 级别的运行追踪聚合返回对象。
|
||||
*/
|
||||
@Data
|
||||
public class ObservabilityTraceVO {
|
||||
|
||||
private String requestId;
|
||||
|
||||
private String workflowStatus;
|
||||
|
||||
private String sessionStatus;
|
||||
|
||||
private Integer workflowStepCount;
|
||||
|
||||
private Integer messageCount;
|
||||
|
||||
private Integer modelCallCount;
|
||||
|
||||
private Integer totalDurationMs;
|
||||
|
||||
private BigDecimal estimatedCost;
|
||||
|
||||
private List<String> stepSummaries;
|
||||
}
|
||||
Reference in New Issue
Block a user