anchor.diff:  
     # This becomes the main config file for Prometheus 2
     promConfig2 = {
  -    global = cfg2.globalConfig;
  +    global = filterValidPrometheus cfg2.globalConfig;
       rule_files = map (prom2toolCheck "check rules" "rules") (cfg2.ruleFiles ++ [
         (pkgs.writeText "prometheus.rules" (concatStringsSep "\n" cfg2.rules))
       ]);
  -    scrape_configs = filterEmpty cfg2.scrapeConfigs;
  +    scrape_configs = filterValidPrometheus cfg2.scrapeConfigs;
       alerting = optionalAttrs (cfg2.alertmanagerURL != []) {
         alertmanagers = [{
           static_configs = [{
  
positive.code:       scrapeConfigs = mkOption {
          type = types.listOf promTypes.scrape_config;
          default = [];
          apply = x: map _filter x;
          description = ''
            A list of scrape configurations.
          '';
  
negative.code:       globalConfig = mkOption {
          type = promTypes.globalConfig;
          default = {};
          description = ''
            Parameters that are valid in all  configuration contexts. They
            also serve as defaults for other configuration sections
  