mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 11:11:30 -04:00
Allow to set listen address for metrics service via cl flags
This commit is contained in:
parent
debd473977
commit
d439f89536
1 changed files with 2 additions and 1 deletions
|
@ -35,6 +35,7 @@ func main() {
|
|||
"the time interval to output summary, 0s disables summaries. Valid time units are \"s\", \"m\", \"h\". ")
|
||||
disableStatsLogger := flag.Bool("disable-stats-logger", false, "disable the exposing mechanism for stats using logs")
|
||||
enableMetrics := flag.Bool("metrics", false, "enable the exposing mechanism for stats using metrics")
|
||||
metricsAddress := flag.String("metrics-address", "localhost", "set listen address for metrics service")
|
||||
metricsPort := flag.Int("metrics-port", 9999, "set port for the metrics service")
|
||||
verboseLogging := flag.Bool("verbose", false, "increase log verbosity")
|
||||
ephemeralPortsRangeFlag := flag.String("ephemeral-ports-range", "", "ICE UDP ephemeral ports range (format:\"<min>:<max>\")")
|
||||
|
@ -133,7 +134,7 @@ func main() {
|
|||
if *enableMetrics {
|
||||
metrics := sf.NewMetrics()
|
||||
|
||||
err := metrics.Start(net.JoinHostPort("localhost", strconv.Itoa(*metricsPort)))
|
||||
err := metrics.Start(net.JoinHostPort(*metricsAddress, strconv.Itoa(*metricsPort)))
|
||||
if err != nil {
|
||||
log.Fatalf("could not enable metrics: %v", err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue