def graph_enricher(alert: PrometheusKubernetesAlert, params: GraphEnricherParams):
    """
    Attach a graph of the Prometheus query that triggered the alert.
    """
    promql_query = alert.get_prometheus_query()
    chart, prom_block = create_chart_from_prometheus_query(
        params,
        promql_query,
        alert.alert.startsAt,
        include_x_axis=False,
        graph_duration_minutes=params.graph_duration_minutes,
    )
    alert.add_enrichment(
        [GraphBlock(f"{promql_query}.svg", chart.render(), graph_data=prom_block)],
        enrichment_type=EnrichmentType.graph,
        title="Alert Expression Graph",
    )

    Attach a graph of the Prometheus query that triggered the alert.
    
playbooks/robusta_playbooks/alerts_integration.py