private void markMeter()

in semantic-metrics/src/main/java/com/spotify/feline/FelineMetricsRecorder.java [122:137]


  private void markMeter(final String call, final long timeBlockedNanos) {
    // NOTE: if metric reporting is ever moved to a separate thread from the one that is calling the
    // blocking Future method, this will have to change - to pass the threadName as a parameter to
    // Consumers in general. getBlockingMethod() above will also have to change.
    final String threadName = MetricsConsumer.sanitizeThreadName(Thread.currentThread().getName());

    final MetricId metricId = blockingCallId.tagged("call", call, "thread_name", threadName);
    final Meter meter = registry.getOrAdd(metricId, SemanticMetricBuilder.METERS);
    meter.mark();

    final MetricId timeBlockedMetricId =
        timeBlockedCallId.tagged("call", call, "thread_name", threadName);
    final Meter timeBlockedMeter =
        registry.getOrAdd(timeBlockedMetricId, SemanticMetricBuilder.METERS);
    timeBlockedMeter.mark(timeBlockedNanos);
  }