dbnd.log_metrics

dbnd.log_metrics(metrics_dict: Dict[str, Any], source: str = 'user', timestamp: datetime = None) None

Log multiple key-value pairs as metrics to dbnd.

Parameters
  • metrics_dict – Key-value pairs of metrics to log.

  • source – Optional name of the metrics source, default is user.

  • timestamp – Optional timestamp of the metrics.

Example:

@task
def log_lowercase_letters():
    # all lower alphabet chars -> {"a": 97,..., "z": 122}
    log_metrics({chr(i): i for i in range(97, 123)})