Tabnine Logo
StringUtils.isNotEmpty
Code IndexAdd Tabnine to your IDE (free)

How to use
isNotEmpty
method
in
org.stagemonitor.util.StringUtils

Best Java code snippets using org.stagemonitor.util.StringUtils.isNotEmpty (Showing top 12 results out of 315)

origin: stagemonitor/stagemonitor

private boolean isGrafanaConfigured(String grafanaUrl, String apiToken) {
  return StringUtils.isNotEmpty(grafanaUrl) && StringUtils.isNotEmpty(apiToken);
}
origin: stagemonitor/stagemonitor

@Override
public boolean isAvailable() {
  return StringUtils.isNotEmpty(alertingPlugin.getPushbulletAccessToken());
}
origin: stagemonitor/stagemonitor

public boolean isReportToGraphite() {
  return StringUtils.isNotEmpty(getGraphiteHostName());
}
origin: stagemonitor/stagemonitor

@Override
public boolean isAvailable() {
  return isNotEmpty(alertingPlugin.getSmtpHost()) && isNotEmpty(alertingPlugin.getSmtpFrom());
}
origin: stagemonitor/stagemonitor

private Session getSession() {
  Properties props = (Properties) System.getProperties().clone();
  if (isNotEmpty(alertingPlugin.getSmtpUser()) && isNotEmpty(alertingPlugin.getSmtpPassword())) {
    props.setProperty("mail.smtps.auth", "true");
  }
  int smtpPort = alertingPlugin.getSmtpPort();
  props.setProperty("mail.smtp.port", Integer.toString(smtpPort));
  if (smtpPort == 587) {
    props.put("mail.smtp.starttls.enable", "true");
  }
  return Session.getInstance(props);
}
origin: stagemonitor/stagemonitor

private boolean isPasswordInShowWidgetHeaderCorrect(HttpServletRequest request) {
  String password = request.getHeader(STAGEMONITOR_SHOW_WIDGET);
  if (configurationPasswordChecker != null && configurationPasswordChecker.isPasswordCorrect(password)) {
    return true;
  } else {
    if (StringUtils.isNotEmpty(password)) {
      logger.error("The password transmitted via the header {} is not correct. " +
              "This might be a malicious attempt to guess the value of {}. " +
              "The request was initiated from the ip {}.",
          STAGEMONITOR_SHOW_WIDGET, STAGEMONITOR_PASSWORD,
          MonitoredHttpRequest.getClientIp(request));
    }
    return false;
  }
}
origin: stagemonitor/stagemonitor

public static Timer getTimer(Metric2Registry metricRegistry, SpanContextInformation contextInformation) {
  final String operationName = contextInformation.getOperationName();
  final String operationType = contextInformation.getOperationType();
  if (StringUtils.isNotEmpty(operationName) && StringUtils.isNotEmpty(operationType)) {
    return (Timer) metricRegistry.getMetrics().get(getResponseTimeMetricName(operationName, operationType));
  }
  return null;
}
origin: stagemonitor/stagemonitor

private boolean isAddCallTreeToSpan(SpanContextInformation info, String operationName) {
  return info.getCallTree() != null
      && info.getPostExecutionInterceptorContext() != null
      && !info.getPostExecutionInterceptorContext().isExcludeCallTree()
      && StringUtils.isNotEmpty(operationName);
}
origin: stagemonitor/stagemonitor

@Override
public void onFinish(final SpanWrapper spanWrapper, final String operationName, final long durationNanos) {
  final SpanContextInformation contextInformation = SpanContextInformation.forSpan(spanWrapper);
  final String operationType = contextInformation.getOperationType();
  final boolean trackMetricsByOperationName = spanWrapper.getBooleanTag(ENABLE_TRACKING_METRICS_TAG, false);
  if (StringUtils.isNotEmpty(operationName) && StringUtils.isNotEmpty(operationType)) {
    trackResponseTimeMetricsAsync(operationName, durationNanos, spanWrapper.getBooleanTag(Tags.ERROR.getKey(), false), operationType, trackMetricsByOperationName);
    if (SpanUtils.isServerRequest(spanWrapper)) {
      trackExternalRequestRate(spanWrapper, operationName, contextInformation, trackMetricsByOperationName);
    } else if (SpanUtils.isExternalRequest(spanWrapper)) {
      addExternalRequestToParent(durationNanos, contextInformation, operationType);
    }
  }
}
origin: stagemonitor/stagemonitor

info.addRequestAttribute(CONNECTION_ID_ATTRIBUTE, connectionId);
info.addRequestAttribute(MONITORED_HTTP_REQUEST_ATTRIBUTE, this);
if (tracingPlugin.isSampled(span) && servletPlugin.isParseUserAgent() && StringUtils.isNotEmpty(userAgentHeader)) {
  parseUserAgentAsync(span, info);
origin: stagemonitor/stagemonitor

@Override
public void onAfterAnyExecute(StatementInformation statementInformation, long timeElapsedNanos, SQLException e) {
  final Scope activeScope = tracingPlugin.getTracer().scopeManager().active();
  if (activeScope != null) {
    final Span span = activeScope.span();
    if (statementInformation.getConnectionInformation().getDataSource() instanceof DataSource && jdbcPlugin.isCollectSql()) {
      MetaData metaData = dataSourceUrlMap.get(statementInformation.getConnectionInformation().getDataSource());
      Tags.PEER_SERVICE.set(span, metaData.serviceName);
      span.setTag("db.type", metaData.productName);
      span.setTag("db.user", metaData.userName);
      if (StringUtils.isNotEmpty(statementInformation.getSql())) {
        String sql = getSql(statementInformation.getSql(), statementInformation.getSqlWithValues());
        Profiler.addIOCall(sql, timeElapsedNanos);
        span.setTag(AbstractExternalRequest.EXTERNAL_REQUEST_METHOD, getMethod(sql));
        span.setTag(DB_STATEMENT, sql);
      }
    }
    tracingPlugin.getRequestMonitor().monitorStop();
  }
}
origin: org.stagemonitor/stagemonitor-jdbc

@Override
public void onAfterAnyExecute(StatementInformation statementInformation, long timeElapsedNanos, SQLException e) {
  final Scope activeScope = tracingPlugin.getTracer().scopeManager().active();
  if (activeScope != null) {
    final Span span = activeScope.span();
    if (statementInformation.getConnectionInformation().getDataSource() instanceof DataSource && jdbcPlugin.isCollectSql()) {
      MetaData metaData = dataSourceUrlMap.get(statementInformation.getConnectionInformation().getDataSource());
      Tags.PEER_SERVICE.set(span, metaData.serviceName);
      span.setTag("db.type", metaData.productName);
      span.setTag("db.user", metaData.userName);
      if (StringUtils.isNotEmpty(statementInformation.getSql())) {
        String sql = getSql(statementInformation.getSql(), statementInformation.getSqlWithValues());
        Profiler.addIOCall(sql, timeElapsedNanos);
        span.setTag(AbstractExternalRequest.EXTERNAL_REQUEST_METHOD, getMethod(sql));
        span.setTag(DB_STATEMENT, sql);
      }
    }
    tracingPlugin.getRequestMonitor().monitorStop();
  }
}
org.stagemonitor.utilStringUtilsisNotEmpty

Popular methods of StringUtils

  • isEmpty
  • getLogstashStyleDate
  • sha1Hash
  • asCsv
  • removeStart
  • removeTrailingSlash
  • replaceWhitespacesWithDash
  • timestampAsIsoString
  • toCommaSeparatedString
  • bytesToHex
  • capitalize
  • dateAsIsoString
  • capitalize,
  • dateAsIsoString,
  • slugify,
  • split,
  • splitCamelCase

Popular in Java

  • Finding current android device location
  • notifyDataSetChanged (ArrayAdapter)
  • putExtra (Intent)
  • scheduleAtFixedRate (Timer)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • JTextField (javax.swing)
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now