Skip to content

Commit 9aa1577

Browse files
committed
Remove prom from AWS
1 parent 67939bd commit 9aa1577

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

cmd/aws/main.go

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import (
2828
"time"
2929

3030
"github.com/go-sql-driver/mysql"
31-
"github.com/prometheus/client_golang/prometheus/promhttp"
3231
sctfe "github.com/transparency-dev/static-ct"
3332
"github.com/transparency-dev/static-ct/storage"
3433
awsSCTFE "github.com/transparency-dev/static-ct/storage/aws"
@@ -50,7 +49,6 @@ var (
5049
notAfterLimit timestampFlag
5150

5251
httpEndpoint = flag.String("http_endpoint", "localhost:6962", "Endpoint for HTTP (host:port).")
53-
metricsEndpoint = flag.String("metrics_endpoint", "", "Endpoint for serving metrics; if left empty, metrics will be visible on --http_endpoint.")
5452
httpDeadline = flag.Duration("http_deadline", time.Second*10, "Deadline for HTTP requests.")
5553
maskInternalErrors = flag.Bool("mask_internal_errors", false, "Don't return error strings with Internal Server Error HTTP responses.")
5654
origin = flag.String("origin", "", "Origin of the log, for checkpoints and the monitoring prefix.")
@@ -102,25 +100,6 @@ func main() {
102100
klog.Info("**** CT HTTP Server Starting ****")
103101
http.Handle("/", logHandler)
104102

105-
metricsAt := *metricsEndpoint
106-
if metricsAt == "" {
107-
metricsAt = *httpEndpoint
108-
}
109-
110-
if metricsAt != *httpEndpoint {
111-
// Run a separate handler for metrics.
112-
go func() {
113-
mux := http.NewServeMux()
114-
mux.Handle("/metrics", promhttp.Handler())
115-
metricsServer := http.Server{Addr: metricsAt, Handler: mux}
116-
err := metricsServer.ListenAndServe()
117-
klog.Warningf("Metrics server exited: %v", err)
118-
}()
119-
} else {
120-
// Handle metrics on the DefaultServeMux.
121-
http.Handle("/metrics", promhttp.Handler())
122-
}
123-
124103
// Bring up the HTTP server and serve until we get a signal not to.
125104
srv := http.Server{Addr: *httpEndpoint}
126105
shutdownWG := new(sync.WaitGroup)

0 commit comments

Comments
 (0)