Skip to content

Add instrument kind to the SDK #2947

Closed
Closed
@MadVikingGod

Description

@MadVikingGod

We need some way to distinguish the kind of instrument, eg. Sync Counter or Async Gauge, for determining which aggregation1 or temporality2 to use.

How is this different from the view.Instrument? The scope of the views currently don't take into account what kind of instrument, because views neither match this nor make any changes based on this. So there is no space in the view to record the kind.

Potential solution:
This could follow the same kind of pattern as Temporarily in #2944

type InstrumentKind uint8

const(
   undefinedInstrument Instrumentkind = iota
   SyncCounter
...
)

Footnotes

  1. Default Aggregation: The Default Aggregation informs the SDK to use the Instrument Kind ... to select an aggregation and configuration parameters.

  2. MetricReader: The default output temporality (optional), a function of instrument kind.

Metadata

Metadata

Assignees

Labels

area:metricsPart of OpenTelemetry Metricspkg:SDKRelated to an SDK package

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions