Fix guide RecordCustomMetric call and run gofmt on guide examples
* [Datastore Segments](#datastore-segments)
* [External Segments](#external-segments)
* [Attributes](#attributes)
+* [Custom Metrics](#custom-metrics)
* [Custom Events](#custom-events)
* [Request Queuing](#request-queuing)
@@ -314,9 +315,9 @@ via the `RecordCustomMetric` method.
```go
app.RecordCustomMetric(
- "CustomMetricName", //name of your metric
- 132 //time in ms
-);
+ "CustomMetricName", // Name of your metric
+ 132, // Value
+)
```
**Note:** The Go Agent will automatically prepend the metric name you pass to
@@ -354,13 +355,6 @@ way to get started with `NoticeError` is to use errors based on
[Go's standard error interface](https://blog.golang.org/error-handling-and-go).
```go
-import (
- "errors"
- /* ... other imports ... */
-)
-
- /* ... */
-
txn.NoticeError(errors.New("my error message"))
```
@@ -371,12 +365,6 @@ If you're interested in sending more than an error *message* to New Relic, the
Go Agent also offers a `newrelic.Error` struct.
```go
- import (
- /* ... other imports ... */
- newrelic "github.com/newrelic/go-agent"
- )
-
- /* ... */
txn.NoticeError(newrelic.Error{
Message: "my error message",
Class: "IdentifierForError",
