test_class.declarator: AGENT_ID = ""
test_class.modifier: private static final
test_class.original_string: private static final String AGENT_ID = "";
test_class.type: String
test_class.var_name: AGENT_ID
test_class.declarator: TRANSACTION_X_PERCENTILE_ALERT_CONFIG
test_class.modifier: private static final
test_class.original_string: private static final AlertConfig TRANSACTION_X_PERCENTILE_ALERT_CONFIG;
test_class.type: AlertConfig
test_class.var_name: TRANSACTION_X_PERCENTILE_ALERT_CONFIG
test_class.declarator: UPPER_BOUND_GAUGE_ALERT_CONFIG
test_class.modifier: private static final
test_class.original_string: private static final AlertConfig UPPER_BOUND_GAUGE_ALERT_CONFIG;
test_class.type: AlertConfig
test_class.var_name: UPPER_BOUND_GAUGE_ALERT_CONFIG
test_class.declarator: LOWER_BOUND_GAUGE_ALERT_CONFIG
test_class.modifier: private static final
test_class.original_string: private static final AlertConfig LOWER_BOUND_GAUGE_ALERT_CONFIG;
test_class.type: AlertConfig
test_class.var_name: LOWER_BOUND_GAUGE_ALERT_CONFIG
test_class.declarator: LAZY_SECRET_KEY
test_class.modifier: private static final
test_class.original_string: private static final LazySecretKey LAZY_SECRET_KEY;
test_class.type: LazySecretKey
test_class.var_name: LAZY_SECRET_KEY
test_class.declarator: SMTP_CONFIG
test_class.modifier: private static final
test_class.original_string: private static final SmtpConfig SMTP_CONFIG;
test_class.type: SmtpConfig
test_class.var_name: SMTP_CONFIG
test_class.declarator: HTTP_PROXY_CONFIG
test_class.modifier: private static final
test_class.original_string: private static final HttpProxyConfig HTTP_PROXY_CONFIG;
test_class.type: HttpProxyConfig
test_class.var_name: HTTP_PROXY_CONFIG
test_class.declarator: configRepository
test_class.modifier: private
test_class.original_string: private ConfigRepository configRepository;
test_class.type: ConfigRepository
test_class.var_name: configRepository
test_class.declarator: incidentRepository
test_class.modifier: private
test_class.original_string: private IncidentRepository incidentRepository;
test_class.type: IncidentRepository
test_class.var_name: incidentRepository
test_class.declarator: aggregateRepository
test_class.modifier: private
test_class.original_string: private AggregateRepository aggregateRepository;
test_class.type: AggregateRepository
test_class.var_name: aggregateRepository
test_class.declarator: gaugeValueRepository
test_class.modifier: private
test_class.original_string: private GaugeValueRepository gaugeValueRepository;
test_class.type: GaugeValueRepository
test_class.var_name: gaugeValueRepository
test_class.declarator: traceRepository
test_class.modifier: private
test_class.original_string: private TraceRepository traceRepository;
test_class.type: TraceRepository
test_class.var_name: traceRepository
test_class.declarator: rollupLevelService
test_class.modifier: private
test_class.original_string: private RollupLevelService rollupLevelService;
test_class.type: RollupLevelService
test_class.var_name: rollupLevelService
test_class.declarator: mailService
test_class.modifier: private
test_class.original_string: private MockMailService mailService;
test_class.type: MockMailService
test_class.var_name: mailService
test_class.declarator: httpClient
test_class.modifier: private
test_class.original_string: private HttpClient httpClient;
test_class.type: HttpClient
test_class.var_name: httpClient
test_class.file: common2/src/test/java/org/glowroot/common2/repo/util/AlertingServiceTest.java
test_class.identifier: AlertingServiceTest
test_case.body: @Test
      public void shouldNotSendMailForTransactionAlert() throws Exception {
          // given
          setupForTransaction(999999);
          AlertingService alertingService = new AlertingService(configRepository,
                  incidentRepository, aggregateRepository, gaugeValueRepository, traceRepository,
                  rollupLevelService, mailService, httpClient, newLockSet(),
                  newLockSet(),
                  Clock.systemClock());
          // when
          alertingService.checkMetricAlert("", "", "", TRANSACTION_X_PERCENTILE_ALERT_CONFIG,
                  TRANSACTION_X_PERCENTILE_ALERT_CONFIG.getCondition().getMetricCondition(), 120000);
          // then
          assertThat(mailService.getMessage()).isNull();
      }
test_case.class_method_signature: AlertingServiceTest.shouldNotSendMailForTransactionAlert()
test_case.full_signature: @Test public void shouldNotSendMailForTransactionAlert()
test_case.identifier: shouldNotSendMailForTransactionAlert
test_case.invocations: setupForTransaction newLockSet newLockSet systemClock checkMetricAlert getMetricCondition getCondition isNull assertThat getMessage
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldNotSendMailForTransactionAlert()
focal_class.declarator: logger = LoggerFactory.getLogger(AlertingService.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(AlertingService.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: configRepository
focal_class.modifier: private final
focal_class.original_string: private final ConfigRepository configRepository;
focal_class.type: ConfigRepository
focal_class.var_name: configRepository
focal_class.declarator: incidentRepository
focal_class.modifier: private final
focal_class.original_string: private final IncidentRepository incidentRepository;
focal_class.type: IncidentRepository
focal_class.var_name: incidentRepository
focal_class.declarator: mailService
focal_class.modifier: private final
focal_class.original_string: private final MailService mailService;
focal_class.type: MailService
focal_class.var_name: mailService
focal_class.declarator: httpClient
focal_class.modifier: private final
focal_class.original_string: private final HttpClient httpClient;
focal_class.type: HttpClient
focal_class.var_name: httpClient
focal_class.declarator: openingIncidentLockSet
focal_class.modifier: private final
focal_class.original_string: private final LockSet<IncidentKey> openingIncidentLockSet;
focal_class.type: LockSet<IncidentKey>
focal_class.var_name: openingIncidentLockSet
focal_class.declarator: resolvingIncidentLockSet
focal_class.modifier: private final
focal_class.original_string: private final LockSet<IncidentKey> resolvingIncidentLockSet;
focal_class.type: LockSet<IncidentKey>
focal_class.var_name: resolvingIncidentLockSet
focal_class.declarator: clock
focal_class.modifier: private final
focal_class.original_string: private final Clock clock;
focal_class.type: Clock
focal_class.var_name: clock
focal_class.declarator: metricService
focal_class.modifier: private final
focal_class.original_string: private final MetricService metricService;
focal_class.type: MetricService
focal_class.var_name: metricService
focal_class.declarator: smtpHostWarningRateLimiter = RateLimiter.create(1.0 / 3600)
focal_class.modifier: private final
focal_class.original_string: private final RateLimiter smtpHostWarningRateLimiter = RateLimiter.create(1.0 / 3600);
focal_class.type: RateLimiter
focal_class.var_name: smtpHostWarningRateLimiter
focal_class.declarator: pagerDutyRetryExecutor
focal_class.modifier: private final
focal_class.original_string: private final ScheduledExecutorService pagerDutyRetryExecutor;
focal_class.type: ScheduledExecutorService
focal_class.var_name: pagerDutyRetryExecutor
focal_class.declarator: closed
focal_class.modifier: private volatile
focal_class.original_string: private volatile boolean closed;
focal_class.type: boolean
focal_class.var_name: closed
focal_class.file: common2/src/main/java/org/glowroot/common2/repo/util/AlertingService.java
focal_class.identifier: AlertingService
focal_class.class_method_signature: AlertingService.AlertingService(ConfigRepository configRepository, IncidentRepository incidentRepository,
              AggregateRepository aggregateRepository, GaugeValueRepository gaugeValueRepository,
              TraceRepository traceRepository, RollupLevelService rollupLevelService,
              MailService mailService, HttpClient httpClient,
              LockSet<IncidentKey> openingIncidentLockSet,
              LockSet<IncidentKey> resolvingIncidentLockSet, Clock clock)
focal_class.full_signature: public  AlertingService(ConfigRepository configRepository, IncidentRepository incidentRepository,
              AggregateRepository aggregateRepository, GaugeValueRepository gaugeValueRepository,
              TraceRepository traceRepository, RollupLevelService rollupLevelService,
              MailService mailService, HttpClient httpClient,
              LockSet<IncidentKey> openingIncidentLockSet,
              LockSet<IncidentKey> resolvingIncidentLockSet, Clock clock)
focal_class.identifier: AlertingService
focal_class.modifiers: public
focal_class.parameters: (ConfigRepository configRepository, IncidentRepository incidentRepository,
              AggregateRepository aggregateRepository, GaugeValueRepository gaugeValueRepository,
              TraceRepository traceRepository, RollupLevelService rollupLevelService,
              MailService mailService, HttpClient httpClient,
              LockSet<IncidentKey> openingIncidentLockSet,
              LockSet<IncidentKey> resolvingIncidentLockSet, Clock clock)
focal_class.signature:  AlertingService(ConfigRepository configRepository, IncidentRepository incidentRepository,
              AggregateRepository aggregateRepository, GaugeValueRepository gaugeValueRepository,
              TraceRepository traceRepository, RollupLevelService rollupLevelService,
              MailService mailService, HttpClient httpClient,
              LockSet<IncidentKey> openingIncidentLockSet,
              LockSet<IncidentKey> resolvingIncidentLockSet, Clock clock)
focal_class.class_method_signature: AlertingService.close()
focal_class.full_signature: public void close()
focal_class.identifier: close
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_class.class_method_signature: AlertingService.checkForDeletedAlerts(String agentRollupId)
focal_class.full_signature: public void checkForDeletedAlerts(String agentRollupId)
focal_class.identifier: checkForDeletedAlerts
focal_class.modifiers: public
focal_class.parameters: (String agentRollupId)
focal_class.return: void
focal_class.signature: void checkForDeletedAlerts(String agentRollupId)
focal_class.class_method_signature: AlertingService.checkForAllDeletedAlerts()
focal_class.full_signature: public void checkForAllDeletedAlerts()
focal_class.identifier: checkForAllDeletedAlerts
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void checkForAllDeletedAlerts()
focal_class.class_method_signature: AlertingService.checkMetricAlert(String centralDisplay, String agentRollupId,
              String agentRollupDisplay, AlertConfig alertConfig, MetricCondition metricCondition,
              long endTime)
focal_class.full_signature: public void checkMetricAlert(String centralDisplay, String agentRollupId,
              String agentRollupDisplay, AlertConfig alertConfig, MetricCondition metricCondition,
              long endTime)
focal_class.identifier: checkMetricAlert
focal_class.modifiers: public
focal_class.parameters: (String centralDisplay, String agentRollupId,
              String agentRollupDisplay, AlertConfig alertConfig, MetricCondition metricCondition,
              long endTime)
focal_class.return: void
focal_class.signature: void checkMetricAlert(String centralDisplay, String agentRollupId,
              String agentRollupDisplay, AlertConfig alertConfig, MetricCondition metricCondition,
              long endTime)
focal_class.class_method_signature: AlertingService.openIncident(String centralDisplay, String agentRollupId,
              String agentRollupDisplay, AlertConfig alertConfig, MetricCondition metricCondition,
              long endTime, AlertCondition alertCondition)
focal_class.full_signature: private void openIncident(String centralDisplay, String agentRollupId,
              String agentRollupDisplay, AlertConfig alertConfig, MetricCondition metricCondition,
              long endTime, AlertCondition alertCondition)
focal_class.identifier: openIncident
focal_class.modifiers: private
focal_class.parameters: (String centralDisplay, String agentRollupId,
              String agentRollupDisplay, AlertConfig alertConfig, MetricCondition metricCondition,
              long endTime, AlertCondition alertCondition)
focal_class.return: void
focal_class.signature: void openIncident(String centralDisplay, String agentRollupId,
              String agentRollupDisplay, AlertConfig alertConfig, MetricCondition metricCondition,
              long endTime, AlertCondition alertCondition)
focal_class.class_method_signature: AlertingService.resolveIncident(String centralDisplay, String agentRollupId,
              String agentRollupDisplay, AlertConfig alertConfig, MetricCondition metricCondition,
              long endTime, AlertCondition alertCondition, OpenIncident openIncident)
focal_class.full_signature: private void resolveIncident(String centralDisplay, String agentRollupId,
              String agentRollupDisplay, AlertConfig alertConfig, MetricCondition metricCondition,
              long endTime, AlertCondition alertCondition, OpenIncident openIncident)
focal_class.identifier: resolveIncident
focal_class.modifiers: private
focal_class.parameters: (String centralDisplay, String agentRollupId,
              String agentRollupDisplay, AlertConfig alertConfig, MetricCondition metricCondition,
              long endTime, AlertCondition alertCondition, OpenIncident openIncident)
focal_class.return: void
focal_class.signature: void resolveIncident(String centralDisplay, String agentRollupId,
              String agentRollupDisplay, AlertConfig alertConfig, MetricCondition metricCondition,
              long endTime, AlertCondition alertCondition, OpenIncident openIncident)
focal_class.class_method_signature: AlertingService.isDeletedAlert(OpenIncident openIncident)
focal_class.full_signature: private boolean isDeletedAlert(OpenIncident openIncident)
focal_class.identifier: isDeletedAlert
focal_class.modifiers: private
focal_class.parameters: (OpenIncident openIncident)
focal_class.return: boolean
focal_class.signature: boolean isDeletedAlert(OpenIncident openIncident)
focal_class.class_method_signature: AlertingService.getAlertConfigsLeniently(String agentRollupId)
focal_class.full_signature: private List<AlertConfig> getAlertConfigsLeniently(String agentRollupId)
focal_class.identifier: getAlertConfigsLeniently
focal_class.modifiers: private
focal_class.parameters: (String agentRollupId)
focal_class.return: List<AlertConfig>
focal_class.signature: List<AlertConfig> getAlertConfigsLeniently(String agentRollupId)
focal_class.class_method_signature: AlertingService.sendMetricAlert(String centralDisplay, String agentRollupId,
              String agentRollupDisplay, AlertConfig alertConfig, MetricCondition metricCondition,
              long endTime, boolean ok)
focal_class.full_signature: private void sendMetricAlert(String centralDisplay, String agentRollupId,
              String agentRollupDisplay, AlertConfig alertConfig, MetricCondition metricCondition,
              long endTime, boolean ok)
focal_class.identifier: sendMetricAlert
focal_class.modifiers: private
focal_class.parameters: (String centralDisplay, String agentRollupId,
              String agentRollupDisplay, AlertConfig alertConfig, MetricCondition metricCondition,
              long endTime, boolean ok)
focal_class.return: void
focal_class.signature: void sendMetricAlert(String centralDisplay, String agentRollupId,
              String agentRollupDisplay, AlertConfig alertConfig, MetricCondition metricCondition,
              long endTime, boolean ok)
focal_class.class_method_signature: AlertingService.sendNotification(String centralDisplay, String agentRollupId,
              String agentRollupDisplay, AlertConfig alertConfig, long endTime, String subject,
              String messageText, boolean ok)
focal_class.full_signature: public void sendNotification(String centralDisplay, String agentRollupId,
              String agentRollupDisplay, AlertConfig alertConfig, long endTime, String subject,
              String messageText, boolean ok)
focal_class.identifier: sendNotification
focal_class.modifiers: public
focal_class.parameters: (String centralDisplay, String agentRollupId,
              String agentRollupDisplay, AlertConfig alertConfig, long endTime, String subject,
              String messageText, boolean ok)
focal_class.return: void
focal_class.signature: void sendNotification(String centralDisplay, String agentRollupId,
              String agentRollupDisplay, AlertConfig alertConfig, long endTime, String subject,
              String messageText, boolean ok)
focal_class.class_method_signature: AlertingService.sendPagerDutyWithRetry(String agentRollupId, String agentRollupDisplay,
              AlertConfig alertConfig, PagerDutyNotification pagerDutyNotification,
              long endTime, String subject, String messageText, boolean ok)
focal_class.full_signature: private void sendPagerDutyWithRetry(String agentRollupId, String agentRollupDisplay,
              AlertConfig alertConfig, PagerDutyNotification pagerDutyNotification,
              long endTime, String subject, String messageText, boolean ok)
focal_class.identifier: sendPagerDutyWithRetry
focal_class.modifiers: private
focal_class.parameters: (String agentRollupId, String agentRollupDisplay,
              AlertConfig alertConfig, PagerDutyNotification pagerDutyNotification,
              long endTime, String subject, String messageText, boolean ok)
focal_class.return: void
focal_class.signature: void sendPagerDutyWithRetry(String agentRollupId, String agentRollupDisplay,
              AlertConfig alertConfig, PagerDutyNotification pagerDutyNotification,
              long endTime, String subject, String messageText, boolean ok)
focal_class.class_method_signature: AlertingService.sendSlackWithRetry(String centralDisplay, String agentRollupDisplay,
              String slackWebhookUrl, String slackChannel, long endTime, String subject,
              String messageText, boolean ok)
focal_class.full_signature: private void sendSlackWithRetry(String centralDisplay, String agentRollupDisplay,
              String slackWebhookUrl, String slackChannel, long endTime, String subject,
              String messageText, boolean ok)
focal_class.identifier: sendSlackWithRetry
focal_class.modifiers: private
focal_class.parameters: (String centralDisplay, String agentRollupDisplay,
              String slackWebhookUrl, String slackChannel, long endTime, String subject,
              String messageText, boolean ok)
focal_class.return: void
focal_class.signature: void sendSlackWithRetry(String centralDisplay, String agentRollupDisplay,
              String slackWebhookUrl, String slackChannel, long endTime, String subject,
              String messageText, boolean ok)
focal_class.class_method_signature: AlertingService.sendEmail(String centralDisplay, String agentRollupDisplay, String subject,
              List<String> emailAddresses, String messageText, SmtpConfig smtpConfig,
              @Nullable String passwordOverride, LazySecretKey lazySecretKey, MailService mailService)
focal_class.full_signature: public static void sendEmail(String centralDisplay, String agentRollupDisplay, String subject,
              List<String> emailAddresses, String messageText, SmtpConfig smtpConfig,
              @Nullable String passwordOverride, LazySecretKey lazySecretKey, MailService mailService)
focal_class.identifier: sendEmail
focal_class.modifiers: public static
focal_class.parameters: (String centralDisplay, String agentRollupDisplay, String subject,
              List<String> emailAddresses, String messageText, SmtpConfig smtpConfig,
              @Nullable String passwordOverride, LazySecretKey lazySecretKey, MailService mailService)
focal_class.return: void
focal_class.signature: void sendEmail(String centralDisplay, String agentRollupDisplay, String subject,
              List<String> emailAddresses, String messageText, SmtpConfig smtpConfig,
              @Nullable String passwordOverride, LazySecretKey lazySecretKey, MailService mailService)
focal_class.class_method_signature: AlertingService.getPreUpperBoundText(boolean ok)
focal_class.full_signature: public static String getPreUpperBoundText(boolean ok)
focal_class.identifier: getPreUpperBoundText
focal_class.modifiers: public static
focal_class.parameters: (boolean ok)
focal_class.return: String
focal_class.signature: String getPreUpperBoundText(boolean ok)
focal_class.class_method_signature: AlertingService.getGaugeThresholdText(double threshold, String gaugeUnit)
focal_class.full_signature: public static String getGaugeThresholdText(double threshold, String gaugeUnit)
focal_class.identifier: getGaugeThresholdText
focal_class.modifiers: public static
focal_class.parameters: (double threshold, String gaugeUnit)
focal_class.return: String
focal_class.signature: String getGaugeThresholdText(double threshold, String gaugeUnit)
focal_class.class_method_signature: AlertingService.getOverTheLastMinutesText(int timePeriodSeconds)
focal_class.full_signature: public static String getOverTheLastMinutesText(int timePeriodSeconds)
focal_class.identifier: getOverTheLastMinutesText
focal_class.modifiers: public static
focal_class.parameters: (int timePeriodSeconds)
focal_class.return: String
focal_class.signature: String getOverTheLastMinutesText(int timePeriodSeconds)
focal_class.class_method_signature: AlertingService.getWithUnit(double val, String unit)
focal_class.full_signature: public static String getWithUnit(double val, String unit)
focal_class.identifier: getWithUnit
focal_class.modifiers: public static
focal_class.parameters: (double val, String unit)
focal_class.return: String
focal_class.signature: String getWithUnit(double val, String unit)
focal_class.class_method_signature: AlertingService.hasTransactionTypeAndName(String metric)
focal_class.full_signature: public static boolean hasTransactionTypeAndName(String metric)
focal_class.identifier: hasTransactionTypeAndName
focal_class.modifiers: public static
focal_class.parameters: (String metric)
focal_class.return: boolean
focal_class.signature: boolean hasTransactionTypeAndName(String metric)
focal_class.class_method_signature: AlertingService.hasMinTransactionCount(String metric)
focal_class.full_signature: public static boolean hasMinTransactionCount(String metric)
focal_class.identifier: hasMinTransactionCount
focal_class.modifiers: public static
focal_class.parameters: (String metric)
focal_class.return: boolean
focal_class.signature: boolean hasMinTransactionCount(String metric)
focal_class.class_method_signature: AlertingService.hasErrorMessageFilter(String metric)
focal_class.full_signature: public static boolean hasErrorMessageFilter(String metric)
focal_class.identifier: hasErrorMessageFilter
focal_class.modifiers: public static
focal_class.parameters: (String metric)
focal_class.return: boolean
focal_class.signature: boolean hasErrorMessageFilter(String metric)
focal_class.class_method_signature: AlertingService.getPreLowerBoundText(boolean ok)
focal_class.full_signature: private static String getPreLowerBoundText(boolean ok)
focal_class.identifier: getPreLowerBoundText
focal_class.modifiers: private static
focal_class.parameters: (boolean ok)
focal_class.return: String
focal_class.signature: String getPreLowerBoundText(boolean ok)
focal_class.class_method_signature: AlertingService.createMailSession(SmtpConfig smtpConfig,
              @Nullable String passwordOverride, LazySecretKey lazySecretKey)
focal_class.full_signature: private static Session createMailSession(SmtpConfig smtpConfig,
              @Nullable String passwordOverride, LazySecretKey lazySecretKey)
focal_class.identifier: createMailSession
focal_class.modifiers: private static
focal_class.parameters: (SmtpConfig smtpConfig,
              @Nullable String passwordOverride, LazySecretKey lazySecretKey)
focal_class.return: Session
focal_class.signature: Session createMailSession(SmtpConfig smtpConfig,
              @Nullable String passwordOverride, LazySecretKey lazySecretKey)
focal_class.class_method_signature: AlertingService.getPassword(SmtpConfig smtpConfig, @Nullable String passwordOverride,
              LazySecretKey lazySecretKey)
focal_class.full_signature: private static String getPassword(SmtpConfig smtpConfig, @Nullable String passwordOverride,
              LazySecretKey lazySecretKey)
focal_class.identifier: getPassword
focal_class.modifiers: private static
focal_class.parameters: (SmtpConfig smtpConfig, @Nullable String passwordOverride,
              LazySecretKey lazySecretKey)
focal_class.return: String
focal_class.signature: String getPassword(SmtpConfig smtpConfig, @Nullable String passwordOverride,
              LazySecretKey lazySecretKey)
focal_method.body: public void checkMetricAlert(String centralDisplay, String agentRollupId,
              String agentRollupDisplay, AlertConfig alertConfig, MetricCondition metricCondition,
              long endTime) throws Exception {
          long startTime = endTime - SECONDS.toMillis(metricCondition.getTimePeriodSeconds());
          Number value =
                  metricService.getMetricValue(agentRollupId, metricCondition, startTime, endTime);
          if (value == null) {
              // cannot calculate due to no data, e.g. error rate (but not error count, which can be
              // calculated - zero - when no data)
              return;
          }
          boolean currentlyTriggered;
          if (metricCondition.getLowerBoundThreshold()) {
              currentlyTriggered = value.doubleValue() <= metricCondition.getThreshold();
          } else {
              currentlyTriggered = value.doubleValue() >= metricCondition.getThreshold();
          }
          AlertCondition alertCondition = alertConfig.getCondition();
          OpenIncident openIncident = incidentRepository.readOpenIncident(agentRollupId,
                  alertCondition, alertConfig.getSeverity());
          if (openIncident != null && !currentlyTriggered) {
              // TODO don't close if no data and no heartbeat?
              resolveIncident(centralDisplay, agentRollupId, agentRollupDisplay, alertConfig,
                      metricCondition, endTime, alertCondition, openIncident);
          } else if (openIncident == null && currentlyTriggered) {
              // don't open if min transaction count is not met
              if (hasMinTransactionCount(metricCondition.getMetric())) {
                  long minTransactionCount = metricCondition.getMinTransactionCount();
                  if (minTransactionCount != 0) {
                      long transactionCount = metricService.getTransactionCount(agentRollupId,
                              metricCondition.getTransactionType(),
                              Strings.emptyToNull(metricCondition.getTransactionName()), startTime,
                              endTime);
                      if (transactionCount < minTransactionCount) {
                          return;
                      }
                  }
              }
              openIncident(centralDisplay, agentRollupId, agentRollupDisplay, alertConfig,
                      metricCondition, endTime, alertCondition);
          }
      }
focal_method.class_method_signature: AlertingService.checkMetricAlert(String centralDisplay, String agentRollupId,
              String agentRollupDisplay, AlertConfig alertConfig, MetricCondition metricCondition,
              long endTime)
focal_method.full_signature: public void checkMetricAlert(String centralDisplay, String agentRollupId,
              String agentRollupDisplay, AlertConfig alertConfig, MetricCondition metricCondition,
              long endTime)
focal_method.identifier: checkMetricAlert
focal_method.invocations: toMillis getTimePeriodSeconds getMetricValue getLowerBoundThreshold doubleValue getThreshold doubleValue getThreshold getCondition readOpenIncident getSeverity resolveIncident hasMinTransactionCount getMetric getMinTransactionCount getTransactionCount getTransactionType emptyToNull getTransactionName openIncident
focal_method.modifiers: public
focal_method.parameters: (String centralDisplay, String agentRollupId,
              String agentRollupDisplay, AlertConfig alertConfig, MetricCondition metricCondition,
              long endTime)
focal_method.return: void
focal_method.signature: void checkMetricAlert(String centralDisplay, String agentRollupId,
              String agentRollupDisplay, AlertConfig alertConfig, MetricCondition metricCondition,
              long endTime)