Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Observer ¶ added in v1.13.0
type Observer struct {
// contains filtered or unexported fields
}
Instrument maintains a mapping from attribute.Set to an internal record type for a single API-level instrument. This type is organized so that a single attribute.Set lookup is performed regardless of the number of reader and instrument-view behaviors. Entries in the map have their accumulator's SnapshotAndProcess() method called whenever they are removed from the map, which can happen when any reader collects the instrument.
func New ¶ added in v1.13.0
func New(desc sdkinstrument.Descriptor, performance sdkinstrument.Performance, _ interface{}, compiled pipeline.Register[viewstate.Instrument]) *Observer
New builds a new synchronous instrument *Observer given the per-pipeline instrument-views compiled. Note that the unused third parameter is an opaque value used in the asyncstate package, passed here to make these two packages generalize.
func (*Observer) ObserveFloat64 ¶ added in v1.13.0
func (*Observer) ObserveInt64 ¶ added in v1.13.0
func (*Observer) SnapshotAndProcess ¶ added in v1.13.0
func (inst *Observer) SnapshotAndProcess()
SnapshotAndProcess calls SnapshotAndProcess() for all live accumulators of this instrument. Inactive accumulators will be subsequently removed from the map.