chore: completely drop prometheus support

This commit is contained in:
yusing
2025-04-24 18:41:13 +08:00
parent 1a0edc8bfe
commit 080bbc18eb
12 changed files with 5 additions and 367 deletions

View File

@@ -6,7 +6,6 @@ import (
"github.com/yusing/go-proxy/agent/pkg/agent"
"github.com/yusing/go-proxy/agent/pkg/agentproxy"
"github.com/yusing/go-proxy/internal/common"
"github.com/yusing/go-proxy/internal/gperr"
"github.com/yusing/go-proxy/internal/homepage"
"github.com/yusing/go-proxy/internal/idlewatcher"
@@ -15,7 +14,6 @@ import (
"github.com/yusing/go-proxy/internal/net/gphttp/loadbalancer"
loadbalance "github.com/yusing/go-proxy/internal/net/gphttp/loadbalancer/types"
"github.com/yusing/go-proxy/internal/net/gphttp/middleware"
metricslogger "github.com/yusing/go-proxy/internal/net/gphttp/middleware/metrics_logger"
"github.com/yusing/go-proxy/internal/net/gphttp/reverseproxy"
"github.com/yusing/go-proxy/internal/route/routes"
"github.com/yusing/go-proxy/internal/task"
@@ -132,12 +130,6 @@ func (r *ReveseProxyRoute) Start(parent task.Parent) gperr.Error {
}
}
if common.PrometheusEnabled {
metricsLogger := metricslogger.NewMetricsLogger(r.Name())
r.handler = metricsLogger.GetHandler(r.handler)
r.task.OnCancel("reset_metrics", metricsLogger.ResetMetrics)
}
if r.UseLoadBalance() {
r.addToLoadBalancer(parent)
} else {