-
Notifications
You must be signed in to change notification settings - Fork 155
quickstart/{java, go}/metrics: Add tags for "status" and "error" #484
Conversation
content/quickstart/go/metrics.md
Outdated
@@ -406,15 +401,17 @@ Now we will insert a specific tag called "repl". It will give us a new `context. | |||
|
|||
For example | |||
```go | |||
ctx, err := tag.New(context.Background(), tag.Insert(KeyMethod, "repl")) | |||
ctx, _ := tag.New(context.Background(), tag.Insert(KeyMethod, "repl"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please run these Go snippets through go-fmt first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you!
content/quickstart/go/metrics.md
Outdated
func readEvaluateProcess(br *bufio.Reader) error { | ||
ctx, err := tag.New(context.Background(), tag.Insert(KeyMethod, "repl")) | ||
func readEvaluateProcess(br *bufio.Reader) (terr error) { | ||
ctx, _ := tag.New(context.Background(), tag.Insert(KeyMethod, "repl"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto about go-fmt
@odeke-em indentation fixed in latest commit. I also added a bit of noise to the PR by switching from shortcodes to backticks Update: Upon further inspection, my editor is still not respecting correct indentation (8 spaces per tab). I'm looking into it. In the meantime, here is a fun photo showcasing correct indentation in the editor, but no change in the file itself. Contents were copied and formatted directly from the Go Playground: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thank you @hvent90, LGTM!
Addresses #470
Part 1 of 2 pull request to reduce cognitive load as reviewing quickstarts is no simple task.
This PR does the following for Go & Java Metric quickstarts:
readEvaluateProcessLine
in a latency measurement to catch errors