FillCommonFlags stores flags common to Alpha and Zero.
(flag *pflag.FlagSet)
| 18 | |
| 19 | // FillCommonFlags stores flags common to Alpha and Zero. |
| 20 | func FillCommonFlags(flag *pflag.FlagSet) { |
| 21 | flag.String("my", "", |
| 22 | "addr:port of this server, so other Dgraph servers can talk to this.") |
| 23 | |
| 24 | // OpenCensus flags. |
| 25 | // |
| 26 | // datadog: See https://github.com/DataDog/opencensus-go-exporter-datadog/issues/34 |
| 27 | // about the status of supporting annotation logs through the datadog exporter |
| 28 | flag.String("trace", TraceDefaults, z.NewSuperFlagHelp(TraceDefaults). |
| 29 | Head("Trace options"). |
| 30 | Flag("ratio", |
| 31 | "The ratio of queries to trace."). |
| 32 | Flag("jaeger", |
| 33 | "URL of Jaeger/opentelemetry-collector to send OpenTelemetry traces."). |
| 34 | Flag("datadog", |
| 35 | "URL of Datadog to send OpenCensus traces. As of now, the trace exporter does not "+ |
| 36 | "support annotation logs and discards them."). |
| 37 | Flag("service", |
| 38 | "Custom service name for tracing. If set, overrides the default (dgraph.alpha/dgraph.zero)."). |
| 39 | String()) |
| 40 | |
| 41 | flag.String("survive", "process", |
| 42 | `Choose between "process" or "filesystem".`+"\n "+ |
| 43 | `If set to "process", there would be no data loss in case of process crash, but `+ |
| 44 | `the behavior would be indeterministic in case of filesystem crash.`+"\n "+ |
| 45 | `If set to "filesystem", blocking sync would be called after every write, hence `+ |
| 46 | `guaranteeing no data loss in case of hard reboot.`+"\n "+ |
| 47 | `Most users should be OK with choosing "process".`) |
| 48 | |
| 49 | flag.String("telemetry", TelemetryDefaults, z.NewSuperFlagHelp(TelemetryDefaults). |
| 50 | Head("Telemetry (diagnostic) options"). |
| 51 | Flag("reports", |
| 52 | "Send anonymous telemetry data to Dgraph devs."). |
| 53 | Flag("sentry", |
| 54 | "(Deprecated) Send crash events to Sentry."). |
| 55 | String()) |
| 56 | } |