Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix README #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Within jobs, you can emit events, timings, gauges, and errors. The first argumen
#### Events

```go
// Events. Notice the camel case with dots.
// Events. Notice the snake case with dots.
// (This is helpful when you want to use StatsD sinks)
job.Event("starting_server")
job.Event("proccess_user.by_email.gmail")
Expand Down Expand Up @@ -148,7 +148,7 @@ job.TimingKv("fetch_user", time.Since(startTime).Nanoseconds(),
// Gauges:
job.Gauge("num_goroutines", numRunningGoroutines())

// Timings also support keys/values:
// Gauges also support keys/values:
job.GaugeKv("num_goroutines", numRunningGoroutines(),
health.Kvs{"dispatcher": dispatcherStatus()})
```
Expand Down Expand Up @@ -194,7 +194,7 @@ if err != nil {
}
```

Since error handling is so prevalent in Go code, you'll have sitations where multiple functions have the option of loggin the same root error. The best practice that we've identified is to just not think about it and log it on every level of the call stack. Keep in mind that gocraft/health will handle this intelligently and only send one error to Bugsnag, have a correct root backtrace, and so on.
Since error handling is so prevalent in Go code, you'll have situations where multiple functions have the option of logging the same root error. The best practice that we've identified is to just not think about it and log it on every level of the call stack. Keep in mind that gocraft/health will handle this intelligently and only send one error to Bugsnag, have a correct root backtrace, and so on.

```go
func showUser(ctx *Context) error {
Expand Down