@@ -28,7 +28,6 @@ import (
28
28
"time"
29
29
30
30
"github.com/go-sql-driver/mysql"
31
- "github.com/prometheus/client_golang/prometheus/promhttp"
32
31
sctfe "github.com/transparency-dev/static-ct"
33
32
"github.com/transparency-dev/static-ct/storage"
34
33
awsSCTFE "github.com/transparency-dev/static-ct/storage/aws"
50
49
notAfterLimit timestampFlag
51
50
52
51
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." )
54
52
httpDeadline = flag .Duration ("http_deadline" , time .Second * 10 , "Deadline for HTTP requests." )
55
53
maskInternalErrors = flag .Bool ("mask_internal_errors" , false , "Don't return error strings with Internal Server Error HTTP responses." )
56
54
origin = flag .String ("origin" , "" , "Origin of the log, for checkpoints and the monitoring prefix." )
@@ -102,25 +100,6 @@ func main() {
102
100
klog .Info ("**** CT HTTP Server Starting ****" )
103
101
http .Handle ("/" , logHandler )
104
102
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
-
124
103
// Bring up the HTTP server and serve until we get a signal not to.
125
104
srv := http.Server {Addr : * httpEndpoint }
126
105
shutdownWG := new (sync.WaitGroup )
0 commit comments