Improve Application documentation
@@ -19,8 +19,7 @@ type Application interface {
// code and response headers.
StartTransaction(name string, w http.ResponseWriter, r *http.Request) Transaction
- // RecordCustomEvent adds a custom event to the application. This
- // feature is incompatible with high security mode.
+ // RecordCustomEvent adds a custom event.
//
// eventType must consist of alphanumeric characters, underscores, and
// colons, and must contain fewer than 255 bytes.
@@ -31,10 +30,12 @@ type Application interface {
// restricted keywords, see:
//
// https://docs.newrelic.com/docs/insights/new-relic-insights/adding-querying-data/inserting-custom-events-new-relic-apm-agents
+ //
+ // An error is returned if event type or params is invalid.
RecordCustomEvent(eventType string, params map[string]interface{}) error
- // RecordCustomMetric records a custom metric. NOTE! The name you give
- // will be prefixed by "Custom/".
+ // RecordCustomMetric records a custom metric. The metric name you
+ // provide will be prefixed by "Custom/".
//
// https://docs.newrelic.com/docs/agents/manage-apm-agents/agent-data/collect-custom-metrics
RecordCustomMetric(name string, value float64) error
@@ -48,9 +49,10 @@ type Application interface {
// Shutdown flushes data to New Relic's servers and stops all
// agent-related goroutines managing this application. After Shutdown
- // is called, the application is disabled and no more data will be
- // collected. This method will block until all final data is sent to
- // New Relic or the timeout has elapsed.
+ // is called, The application is disabled and will never collect data
+ // again. This method blocks until all final data is sent to New Relic
+ // or the timeout has elapsed. Increase the timeout and check debug
+ // logs if you aren't seeing data.
Shutdown(timeout time.Duration)
}
