opentelemetry-go icon indicating copy to clipboard operation
opentelemetry-go copied to clipboard

otel/metric: godoc describing differences between Gauge and other metric types

Open jmhodges opened this issue 1 year ago • 3 comments
trafficstars

Problem Statement

It would be nice to write down what differs between a Gauge, an UpAndDownCounter, and a Counter near their definitions. The typing on their factory methods on Meter make it difficult to understand at a glance what each is for.

As an old hand, I can guess at which to use, but even I was hoping to a quick explainer to confirm what I believed about them.

Proposed Solution

Perhaps the Measurements section of otel/metics could get some more verbiage on when to use each one.

Alternatives

A link to a more descriptive doc could be added to Meter or the Measurements section instead.

jmhodges avatar Dec 28 '23 06:12 jmhodges

Can you check if the description under https://opentelemetry.io/docs/instrumentation/go/manual/#metrics is helpful?

pellared avatar Dec 28 '23 09:12 pellared

Yeah, those are a good start! The "non-additive" is maybe not super clear to folks, but it's definitely the flavor of what I was looking for.

jmhodges avatar Jan 02 '24 23:01 jmhodges

You can also take a look at e.g. https://opentelemetry.io/docs/concepts/signals/metrics/#metric-instruments and https://opentelemetry.io/docs/specs/otel/metrics/api/.

Do you have any proposal on how to improve or can we close the issue?

pellared avatar Jan 03 '24 10:01 pellared