You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Metric.unbind invalidate a previously bound instrument. While the bound instruments can still outlive and recording new values, Metric.unbind merely makes the value of the unbound instruments not been exported.
Another point is that metrics created are not bound by default, i.e. no label values set, and we have two ways to record new values, here counterMetric created by meter.createCounter('foo') is taken for example:
Metric.unbind
invalidate a previously bound instrument. While the bound instruments can still outlive and recording new values,Metric.unbind
merely makes the value of the unbound instruments not been exported.Another point is that metrics created are not bound by default, i.e. no label values set, and we have two ways to record new values, here
counterMetric
created bymeter.createCounter('foo')
is taken for example:counterMetric.add(value: number, labels: api.Labels)
counterMetric.bind(labels: api.Labels): BoundCounter
thenboundCounter.add(value: number)
So basically
counterMetric
itself in the example is not bound but can beunbound
by definition.AFAICT,
Metric.unbind
is not documented in spec here https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/metrics/api-user.md.The text was updated successfully, but these errors were encountered: