diff --git a/cmd/all-in-one/main.go b/cmd/all-in-one/main.go index 0ad07e9f7a7..a06f8195a23 100644 --- a/cmd/all-in-one/main.go +++ b/cmd/all-in-one/main.go @@ -89,7 +89,7 @@ func main() { Use: "jaeger-all-in-one", Short: "Jaeger all-in-one distribution with agent, collector and query in one process.", Long: `Jaeger all-in-one distribution with agent, collector and query. Use with caution this version - uses only in-memory database.`, +by default uses only in-memory database.`, RunE: func(cmd *cobra.Command, args []string) error { if err := svc.Start(v); err != nil { return err diff --git a/cmd/env/command.go b/cmd/env/command.go index 3a499b4c3d0..6ab29fe29e3 100644 --- a/cmd/env/command.go +++ b/cmd/env/command.go @@ -24,27 +24,33 @@ import ( "github.com/jaegertracing/jaeger/plugin/storage" ) +const ( + longTemplate = ` +All command line options can be provided via environment variables by converting +their names to upper case and replacing punctuation with underscores. For example: + +command line option environment variable +------------------------------------------------------------------ +--cassandra.connections-per-host CASSANDRA_CONNECTIONS_PER_HOST +--metrics-backend METRICS_BACKEND + +The following configuration options are only available via environment variables: +%s +` +) + // Command creates `env` command func Command() *cobra.Command { + fs := new(pflag.FlagSet) + fs.String(storage.SpanStorageTypeEnvVar, "cassandra", fmt.Sprintf("The type of backend %s used for trace storage. Multiple backends can be specified (currently only for writing spans) as comma-separated list, e.g. \"cassandra,kafka\".", storage.AllStorageTypes)) + fs.String(storage.DependencyStorageTypeEnvVar, "${SPAN_STORAGE}", "The type of backend used for service dependencies storage.") + long := fmt.Sprintf(longTemplate, strings.Replace(fs.FlagUsagesWrapped(0), " --", "", -1)) return &cobra.Command{ Use: "env", - Short: "Help about environment variables", - Long: `Help about environment variables`, + Short: "Help about environment variables.", + Long: long, Run: func(cmd *cobra.Command, args []string) { - fmt.Fprintln(cmd.OutOrStdout(), ` -All command line options can be provided via environment variables by converting -their names to upper case and replacing punctuation with underscores. For example, - - command line option environment variable - ------------------------------------------------------------------ - --cassandra.connections-per-host CASSANDRA_CONNECTIONS_PER_HOST - --metrics-backend METRICS_BACKEND - -The following configuration options are only available via environment variables:`+"\n") - fs := new(pflag.FlagSet) - fs.String(storage.SpanStorageTypeEnvVar, "cassandra", fmt.Sprintf("The type of backend %s used for trace storage. Multiple backends can be specified (currently only for writing spans) as comma-separated list, e.g. \"cassandra,kafka\".", storage.AllStorageTypes)) - fs.String(storage.DependencyStorageTypeEnvVar, "${SPAN_STORAGE}", "The type of backend used for service dependencies storage.") - fmt.Fprintln(cmd.OutOrStdout(), strings.Replace(fs.FlagUsagesWrapped(1000), " --", " ", -1)) + fmt.Fprintf(cmd.OutOrStdout(), long) }, } } diff --git a/cmd/ingester/main.go b/cmd/ingester/main.go index ffbc08e4f98..f2179654498 100644 --- a/cmd/ingester/main.go +++ b/cmd/ingester/main.go @@ -47,9 +47,9 @@ func main() { v := viper.New() command := &cobra.Command{ - Use: "(experimental) jaeger-ingester", - Short: "Jaeger ingester consumes from Kafka and writes to storage", - Long: `Jaeger ingester consumes spans from a particular Kafka topic and writes them to all configured storage types.`, + Use: "jaeger-ingester", + Short: "(experimental) Jaeger ingester consumes from Kafka and writes to storage.", + Long: `Jaeger ingester consumes spans from a particular Kafka topic and writes them to a configured storage.`, RunE: func(cmd *cobra.Command, args []string) error { if err := svc.Start(v); err != nil { return err diff --git a/pkg/version/command.go b/pkg/version/command.go index a3320e05fd9..a7830161df4 100644 --- a/pkg/version/command.go +++ b/pkg/version/command.go @@ -25,8 +25,8 @@ import ( func Command() *cobra.Command { return &cobra.Command{ Use: "version", - Short: "Print the version", - Long: `Print the version and build information`, + Short: "Print the version.", + Long: `Print the version and build information.`, RunE: func(cmd *cobra.Command, args []string) error { info := Get() json, err := json.Marshal(info)