def get_full_key_name(key):
    """
    Return full metric key name, taking into account optional  prefix which can be specified in the
    config.
    """
    parts = ["st2"]

    if cfg.CONF.metrics.prefix:
        parts.append(cfg.CONF.metrics.prefix)

    parts.append(key)

    return ".".join(parts)

    Return full metric key name, taking into account optional  prefix which can be specified in the
    config.
    
st2common/st2common/metrics/utils.py