Adding naming/MGI section, adding link to New Relic official docs on Cusom metrics
@@ -89,6 +89,7 @@ config.Logger = nrlogrus.StandardLogger()
## Transactions
* [transaction.go](transaction.go)
+* [Naming Transactions](#transactions-and-metrics)
* [More info on Transactions](https://docs.newrelic.com/docs/apm/applications-menu/monitoring/transactions-page)
Transactions time requests and background tasks. Each transaction should only
@@ -306,6 +307,8 @@ config.Attributes.Exclude = append(config.Attributes.Exclude, newrelic.Attribute
## Custom Metrics
+* [More info on Custom Metrics](https://docs.newrelic.com/docs/agents/go-agent/instrumentation/create-custom-metrics-go)
+
You may [create custom metrics](https://docs.newrelic.com/docs/agents/manage-apm-agents/agent-data/collect-custom-metrics) via the `RecordCustomMetric` method.
```go
@@ -315,7 +318,7 @@ app.RecordCustomMetric(
);
```
-**Note:** The Go Agent will automatically prepend the metric name you pass to `RecordCustomMetric` (`"CustomMetricName"` above) with the string `Custom/`. This means the above code would produce a metric named `Custom/CustomMetricName`.
+**Note:** The Go Agent will automatically prepend the metric name you pass to `RecordCustomMetric` (`"CustomMetricName"` above) with the string `Custom/`. This means the above code would produce a metric named `Custom/CustomMetricName`. You'll also want to read over the [Naming Transactions and Metrics](#transactions-and-metrics) section below for advice on coming up with appropriate metric names.
## Custom Events
@@ -337,3 +340,12 @@ it to add a `X-Queue-Start` header with a Unix timestamp. This will create a
band on the application overview chart showing queue time.
* [More info on Request Queuing](https://docs.newrelic.com/docs/apm/applications-menu/features/request-queuing-tracking-front-end-time)
+
+## Naming Transactions and Metrics
+
+You'll want to think carefully about how you name your transactions and custom metrics. If your program creates too many unique names, you may end up with a [Metric Grouping Issue (or MGI)](https://docs.newrelic.com/docs/agents/manage-apm-agents/troubleshooting/metric-grouping-issues).
+
+MGIs occur when the granularity of names is too fine, resulting in hundreds or thousands of uniquely identified metrics and transactions. One common cause of MGIs is relying on the full URL name for metric naming in web transactions. A few major code paths may generate many different full URL paths to unique documents, articles, page, etc. If the unique element of the URL path is included in the metric name, each of these common paths will have its own unique metric name.
+
+
+## For More Help
