Update docs for updated SSF mode
@@ -49,6 +49,8 @@ Usage of veneur-emit:
Mode for veneur-emit. Must be one of: 'metric', 'event', 'sc'. (default "metric")
-name string
Name of metric to report. Ex: 'daemontools.service.starts'
+ -parent_span_id int
+ ID of the parent span.
-sc_hostname string
Add hostname to the event.
-sc_msg string
@@ -69,4 +71,64 @@ Usage of veneur-emit:
Tag(s) for metric, comma separated. Ex: 'service:airflow'
-timing duration
Report a 'timing' metric. Value must be parseable by time.ParseDuration (https://golang.org/pkg/time/#ParseDuration).
+ -trace_id int
+ ID for the trace (top-level) span. Setting a trace ID activated tracing.
+```
+
+Veneur-emit supports two different backend modes: dogstatsd mode (the
+default) and SSF (`-ssf`) mode. In dogstatsd mode, veneur-emit can
+submit metrics, servie checks and events in dogstatsd format. In SSF
+mode, veneur-emit can emit trace spans and metrics to a veneur
+instance.
+
+## Dogstatsd mode
+
+Increment a counter in dogstatsd mode:
+
+``` sh
+veneur-emit -hostport udp://127.0.0.1:8200 -name that.metric.name -tag hi:there -count 1
+```
+
+Time a command in dogstatsd mode:
+
+``` sh
+veneur-emit -hostport udp://127.0.0.1:8200 -name some.command.timer -tag purpose:demonstration -shellCommand sleep 30
+```
+
+Submit a service check in dogstatsd mode (this isn't supported in SSF yet):
+
+``` sh
+veneur-emit -hostport udp://127.0.0.1:8200 -sc_name my.service.check -sc_msg "I'm not dead" -sc_status OK
+```
+
+Submit an event in dogstatsd mode (this isn't supported in SSF yet):
+
+``` sh
+veneur-emit -hostport udp://127.0.0.1:8200 -e_text "Something went wrong:\\n\\nTell a lie, it's all good." -e_title "I'm just testing" -e_source_type "demonstration"
+```
+
+## SSF mode
+
+In SSF mode, veneur-emit will construct and submit an SSF span with
+optional metrics. SSF mode does not yet support events or service
+checks.
+
+Increment a counter in SSF mode:
+
+``` sh
+veneur-emit -ssf -hostport unix:///var/run/veneur/ssf.sock -name that.metric.name -tag hi:there -count 1
+```
+
+Time a command in SSF mode:
+
+``` sh
+veneur-emit -ssf -hostport unix:///var/run/veneur/ssf.sock -name some.command.timer -tag purpose:demonstration -shellCommand sleep 30
+```
+
+Time a command in SSF mode and submit a trace span for the process
+(the `-trace_id` and `-parent_span_id` arguments need to be be set to
+the values from the parent of whatever is calling veneur-emit):
+
+``` sh
+veneur-emit -ssf -hostport unix:///var/run/veneur/ssf.sock -trace_id 99 -parent_span_id 9999 -name some.command.timer -tag purpose:demonstration -shellCommand sleep 30
```
