2022-11-24 18:18:19 +05:30
|
|
|
package api
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"net/http"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func (ah *APIHandler) searchTraces(w http.ResponseWriter, r *http.Request) {
|
|
|
|
|
|
2024-11-22 12:00:29 +05:30
|
|
|
ah.APIHandler.SearchTraces(w, r)
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
// This is commented since this will be taken care by new trace API
|
|
|
|
|
|
|
|
|
|
// if !ah.CheckFeature(basemodel.SmartTraceDetail) {
|
|
|
|
|
// zap.L().Info("SmartTraceDetail feature is not enabled in this plan")
|
|
|
|
|
// ah.APIHandler.SearchTraces(w, r)
|
|
|
|
|
// return
|
|
|
|
|
// }
|
|
|
|
|
// searchTracesParams, err := baseapp.ParseSearchTracesParams(r)
|
|
|
|
|
// if err != nil {
|
|
|
|
|
// RespondError(w, &model.ApiError{Typ: model.ErrorBadData, Err: err}, "Error reading params")
|
|
|
|
|
// return
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// result, err := ah.opts.DataConnector.SearchTraces(r.Context(), searchTracesParams, db.SmartTraceAlgorithm)
|
|
|
|
|
// if ah.HandleError(w, err, http.StatusBadRequest) {
|
|
|
|
|
// return
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// ah.WriteJSON(w, r, result)
|
2022-11-24 18:18:19 +05:30
|
|
|
|
|
|
|
|
}
|