def get_glam_metadata_for_metric()

in etl/glam.py [0:0]


def get_glam_metadata_for_metric(app, metric, ping_name):
    # GLAM data is per application and per ping (well,
    # only the metrics ping right now), when it exists
    metric_type = metric.definition["type"]
    if not GLAM_PRODUCT_MAPPINGS.get(app.app_id):
        return {"glam_unsupported_reason": "This application is not supported by GLAM."}
    elif metric.bq_prefix in ["client_info", "ping_info"]:
        return {"glam_unsupported_reason": "Internal Glean metrics are not supported by GLAM."}
    elif metric_type not in SUPPORTED_GLAM_METRIC_TYPES:
        return {
            "glam_unsupported_reason": "Currently GLAM does not support "
            f"`{metric_type}` metrics."
        }
    elif ping_name != "metrics":
        return {
            "glam_unsupported_reason": (
                f"Metrics sent in the `{ping_name}` ping are not supported "
                "by GLAM "
                "([mozilla/glam#1652](https://github.com/mozilla/glam/issues/1652))."
            )
        }

    (glam_product, glam_app_id) = GLAM_PRODUCT_MAPPINGS[app.app_id]
    glam_metric_id = etl_snake_case(metric.identifier)
    return {
        "glam_url": (
            "https://glam.telemetry.mozilla.org/"
            + f"{glam_product}/probe/{glam_metric_id}/explore"
            + f"?app_id={glam_app_id}"
        )
    }