@@ -28,7 +28,6 @@ import (
28
28
"syscall"
29
29
"time"
30
30
31
- "github.com/google/trillian/monitoring/opencensus"
32
31
"github.com/prometheus/client_golang/prometheus/promhttp"
33
32
sctfe "github.com/transparency-dev/static-ct"
34
33
"github.com/transparency-dev/static-ct/storage"
53
52
metricsEndpoint = flag .String ("metrics_endpoint" , "" , "Endpoint for serving metrics; if left empty, metrics will be visible on --http_endpoint." )
54
53
httpDeadline = flag .Duration ("http_deadline" , time .Second * 10 , "Deadline for HTTP requests." )
55
54
maskInternalErrors = flag .Bool ("mask_internal_errors" , false , "Don't return error strings with Internal Server Error HTTP responses." )
56
- tracing = flag .Bool ("tracing" , false , "If true opencensus Stackdriver tracing will be enabled. See https://opencensus.io/." )
57
- tracingProjectID = flag .String ("tracing_project_id" , "" , "project ID to pass to stackdriver. Can be empty for GCP, consult docs for other platforms." )
58
- tracingPercent = flag .Int ("tracing_percent" , 0 , "Percent of requests to be traced. Zero is a special case to use the DefaultSampler." )
59
55
origin = flag .String ("origin" , "" , "Origin of the log, for checkpoints and the monitoring prefix." )
60
56
bucket = flag .String ("bucket" , "" , "Name of the bucket to store the log in." )
61
57
spannerDB = flag .String ("spanner_db_path" , "" , "Spanner database path: projects/{projectId}/instances/{instanceId}/databases/{databaseId}." )
@@ -118,17 +114,8 @@ func main() {
118
114
http .Handle ("/metrics" , promhttp .Handler ())
119
115
}
120
116
121
- // If we're enabling tracing we need to use an instrumented http.Handler.
122
- var handler http.Handler
123
- if * tracing {
124
- handler , err = opencensus .EnableHTTPServerTracing (* tracingProjectID , * tracingPercent )
125
- if err != nil {
126
- klog .Exitf ("Failed to initialize stackdriver / opencensus tracing: %v" , err )
127
- }
128
- }
129
-
130
117
// Bring up the HTTP server and serve until we get a signal not to.
131
- srv := http.Server {Addr : * httpEndpoint , Handler : handler }
118
+ srv := http.Server {Addr : * httpEndpoint }
132
119
shutdownWG := new (sync.WaitGroup )
133
120
go awaitSignal (func () {
134
121
shutdownWG .Add (1 )
0 commit comments