dbnd.log_metric

dbnd.log_metric(key: str, value: Any, source: Optional[str] = 'user') None

Log key-value pair as a metric to dbnd.

Parameters
  • key – Name of the metric.

  • value – Value of the metric.

  • source – The source of the metric, default is user.

Example:

def calculate_alpha(alpha):
    alpha *= 1.1
    log_metric("alpha", alpha)