baybe.telemetry.telemetry_record_value

baybe.telemetry.telemetry_record_value(instrument_name: str, value: int | float)[source]

Transmit a given value under a given label to the telemetry backend.

The values are recorded as histograms, i.e. the info about record time and sample size is also available. This can be used to count function calls (record the value 1) or statistics about any variable (record its value). Due to serialization limitations only certain data types of value are allowed.

Parameters:
  • instrument_name (str) – The label under which this statistic is logged.

  • value (int | float) – The value of the statistic to be logged.

Return type:

None