def METHOD_NAME(mock_telemetry_lifecycle_writer):
    with override_env(dict(DD_IAST_TELEMETRY_VERBOSITY="INFORMATION")), override_global_config(
        dict(_iast_enabled=True)
    ):
        patch_iast()
        tracer = DummyTracer(iast_enabled=True)
        mock_telemetry_lifecycle_writer._namespace.flush()
        with tracer.trace("test", span_type=SpanTypes.WEB):
            import hashlib
            m = hashlib.new("md5")
            m.update(b"Nobody inspects")
            m.update(b" the spammish repetition")
            num_vulnerabilities = 10
            for _ in range(0, num_vulnerabilities):
                m.digest()
        metrics_result = mock_telemetry_lifecycle_writer._namespace._metrics_data
    generate_metrics = metrics_result[TELEMETRY_TYPE_GENERATE_METRICS][TELEMETRY_NAMESPACE_TAG_IAST]
    assert len(generate_metrics) == 1, "Expected 1 generate_metrics"
    assert [metric.name for metric in generate_metrics.values()] == [
        "executed.sink",
    ]