Skip to content

Commit

Permalink
update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Shikkic committed Sep 30, 2016
1 parent ca92789 commit f5d811e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion common/newrelic/create_txn.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import (
newrelic "github.com/newrelic/go-agent"
)

// CreateNewRelicTxn lol
// CreateNewRelicTxn starts a transaction that will log activity
// to new relic.
func CreateNewRelicTxn(
newRelicApp newrelic.Application,
conf *config.Config,
Expand Down
3 changes: 2 additions & 1 deletion common/newrelic/generate_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import (
newrelic "github.com/newrelic/go-agent"
)

// CreateNewRelicApp lol
// CreateNewRelicApp return a newrelic object that can create
// transactions to monitor endpoints.
func CreateNewRelicApp(conf *config.Config) (newrelic.Application, error) {
var app newrelic.Application
if !conf.IsDev {
Expand Down
2 changes: 1 addition & 1 deletion common/newrelic/report_error.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
newrelic "github.com/newrelic/go-agent"
)

// ReportNewRelicError report
// ReportNewRelicError reports errors to newrelic.
func ReportNewRelicError(txn newrelic.Transaction, err error, isDev bool) {
if !isDev {
log.Println("Reporting error to newrelic: ", err)
Expand Down
1 change: 1 addition & 0 deletions router/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ func main() {
log.Fatalln("Failed to read credentials secret:", err)
}

// Create new relic app for monitoring.
newRelicApp, err := nr.CreateNewRelicApp(conf)
if err != nil {
log.Fatalln(err)
Expand Down

0 comments on commit f5d811e

Please sign in to comment.