|
@@ -127,11 +127,12 @@ func (e *Event) EventStatistic(c *dto.EventStatisticReq, result *[]dto.EventStat
|
|
func (e *Event) EventLists(c *dto.EventStatisticReq, result *[]dto.EventListsResp) error {
|
|
func (e *Event) EventLists(c *dto.EventStatisticReq, result *[]dto.EventListsResp) error {
|
|
res := make([]dto.EventListsResp, 0)
|
|
res := make([]dto.EventListsResp, 0)
|
|
db := e.ChOrm.Table(models.TableNameTracesError)
|
|
db := e.ChOrm.Table(models.TableNameTracesError)
|
|
- db.Select([]string{
|
|
|
|
|
|
+ db.Select(
|
|
|
|
+ "ServiceName AS ServiceName",
|
|
|
|
+ "any(if(SpanAttributes['db.system'] != '', 'db', 'http')) AS ErrorType",
|
|
"any(StatusMessage) as StatusMessage1",
|
|
"any(StatusMessage) as StatusMessage1",
|
|
"COUNT(DISTINCT TraceId) AS StatusMessageCount",
|
|
"COUNT(DISTINCT TraceId) AS StatusMessageCount",
|
|
- "ServiceName",
|
|
|
|
- })
|
|
|
|
|
|
+ )
|
|
if c.AppAlias != "" {
|
|
if c.AppAlias != "" {
|
|
db.Where("AppAlias = ?", c.AppAlias)
|
|
db.Where("AppAlias = ?", c.AppAlias)
|
|
}
|
|
}
|