Tabnine Logo
MeasurementSession.asMap
Code IndexAdd Tabnine to your IDE (free)

How to use
asMap
method
in
org.stagemonitor.core.MeasurementSession

Best Java code snippets using org.stagemonitor.core.MeasurementSession.asMap (Showing top 3 results out of 315)

origin: stagemonitor/stagemonitor

@Override
public void onStart(SpanWrapper spanWrapper) {
  info = SpanContextInformation.forSpan(spanWrapper);
  info.spanWrapper = spanWrapper;
  info.setParent(SpanContextInformation.getCurrent());
  spanContextMap.put(spanWrapper, info);
  for (Map.Entry<String, String> entry : Stagemonitor.getMeasurementSession().asMap().entrySet()) {
    spanWrapper.setTag(entry.getKey(), entry.getValue());
  }
}
origin: stagemonitor/stagemonitor

private void reportToInfluxDb(Metric2Registry metricRegistry, int reportingInterval,
               MeasurementSession measurementSession) {
  if (getInfluxDbUrl() != null && reportingInterval > 0) {
    logger.info("Sending metrics to InfluxDB ({}) every {}s", getInfluxDbUrl(), reportingInterval);
    final InfluxDbReporter reporter = InfluxDbReporter.forRegistry(metricRegistry, this)
        .globalTags(measurementSession.asMap())
        .build();
    reporter.start(reportingInterval, TimeUnit.SECONDS);
    reporters.add(reporter);
  } else {
    logger.info("Not sending metrics to InfluxDB (url={}, interval={}s)", getInfluxDbUrl(), reportingInterval);
  }
}
origin: stagemonitor/stagemonitor

private void reportToElasticsearch(Metric2Registry metricRegistry, int reportingInterval,
                  final MeasurementSession measurementSession) {
  if (corePlugin.isReportToElasticsearch()) {
    logger.info("Sending metrics to Elasticsearch ({}) every {}s", corePlugin.getElasticsearchUrlsWithoutAuthenticationInformation(), reportingInterval);
  }
  if (corePlugin.isReportToElasticsearch() || corePlugin.isOnlyLogElasticsearchMetricReports()) {
    final ElasticsearchReporter reporter = ElasticsearchReporter.forRegistry(metricRegistry, corePlugin)
        .globalTags(measurementSession.asMap())
        .build();
    reporter.start(reportingInterval, TimeUnit.SECONDS);
    corePlugin.closeOnShutdown(reporter);
  } else {
    logger.info("Not sending metrics to Elasticsearch (url={}, interval={}s)", corePlugin.getElasticsearchUrlsWithoutAuthenticationInformation(), reportingInterval);
  }
}
org.stagemonitor.coreMeasurementSessionasMap

Popular methods of MeasurementSession

  • <init>
  • getApplicationName
  • getHostName
  • getInstanceName
  • getId
  • getStartTimestamp
  • isInitialized
  • getEndTimestamp
  • getStart
  • isNull
  • setEndTimestamp
  • setEndTimestamp

Popular in Java

  • Running tasks concurrently on multiple threads
  • getExternalFilesDir (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • compareTo (BigDecimal)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • Top plugins for WebStorm
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