1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2026-06-03 18:35:08 +02:00
Files
opentelemetry-go/metric
Ali Asghar c5045485b4 metric: clarify sync vs observable Gauge in package godoc (#8225)
## Description

The "Measurements" description in the
\`go.opentelemetry.io/otel/metric\` package godoc stated that a Gauge is
used when "the most recent measurement needs to be conveyed about an
asynchronous measurement" and only listed \`Int64ObservableGauge\` and
\`Float64ObservableGauge\`. Synchronous Gauge types (\`Int64Gauge\`,
\`Float64Gauge\`) were added to the API but are not reflected in this
paragraph.

This PR updates the sentence to list all four Gauge types and briefly
note the difference (sync records an instantaneous value at a specific
point in code; observable samples via a callback once per collection
cycle).

Partially addresses #4801 (the "explain the differences between
instrument types" request) by correcting the Gauge coverage
specifically. Happy to follow up with a broader summary-by-example list
if @pellared thinks that's still valuable.

Fixes #4801.

## Checklist

- [x] CHANGELOG.md entry added (placeholder `#XXXX`, will update with
real PR number once assigned).
- [ ] Tests updated (godoc-only change, no behavior change).

---------

Signed-off-by: Ali <alliasgher123@gmail.com>
Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2026-04-21 14:07:22 -07:00
..
2026-01-30 18:15:17 +01:00
2025-11-19 11:06:20 +01:00