-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add example for sync gauge in Go #4610
Conversation
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.
Overall LGTM, just some minor tweaks
|
||
Gauges are used to measure non-additive values when changes occur. | ||
|
||
For example, here's how you report the speed of a CPU fan: |
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.
For example, here's how you report the speed of a CPU fan: | |
For example, here's how you might report the current speed of a CPU fan: |
panic(err) | ||
} | ||
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { | ||
speedGauge.Record(r.Context(), 1500) |
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.
speedGauge.Record(r.Context(), 1500) | |
// hard-code 1500 RPM for demonstrative purposes | |
speedGauge.Record(r.Context(), 1500) |
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.
Thanks for the suggestion. Applied and pushed.
- Changed gauge explanation - Added comment
@@ -534,6 +534,35 @@ func removeItem() { | |||
} | |||
``` | |||
|
|||
### Using Gauges |
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.
### Using Gauges | |
### Using gauges |
We use sentence case in titles.
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 for the feedback. I noticed that other titles like 'Using Histograms' also start with capital letters. Could you give me more detail on which part i should fix?
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.
Just a tiny nit. Thanks!
Co-authored-by: Phillip Carter <[email protected]>
Added example for sync gauge in Go.
This is part of following issue:
open-telemetry/opentelemetry-go#5414