docs: @Deprecated
    private void emitJvmMemMetrics(ServiceEmitter emitter)
    {
      // I have no idea why, but jvm/mem is slightly more than the sum of jvm/pool. Let's just include
      // them both.
      final Map<String, MemoryUsage> usages = ImmutableMap.of(
          "heap", ManagementFactory.getMemoryMXBean().getHeapMemoryUsage(),
          "nonheap", ManagementFactory.getMemoryMXBean().getNonHeapMemoryUsage()
      );
      for (Map.Entry<String, MemoryUsage> entry : usages.entrySet()) {
        final String kind = entry.getKey();
        final MemoryUsage usage = entry.getValue();
        final ServiceMetricEvent.Builder builder = builder().setDimension("memKind", kind);
        MonitorUtils.addDimensionsToBuilder(builder, dimensions);
  
        emitter.emit(builder.build("jvm/mem/max", usage.getMax()));
        emitter.emit(builder.build("jvm/mem/committed", usage.getCommitted()));
        emitter.emit(builder.build("jvm/mem/used", usage.getUsed()));
        emitter.emit(builder.build("jvm/mem/init", usage.getInit()));
      }
  
      // jvm/pool
      for (MemoryPoolMXBean pool : ManagementFactory.getMemoryPoolMXBeans()) {
        final String kind = pool.getType() == MemoryType.HEAP ? "heap" : "nonheap";
        final MemoryUsage usage = pool.getUsage();
        final ServiceMetricEvent.Builder builder = builder()
            .setDimension("poolKind", kind)
            .setDimension("poolName", pool.getName());
        MonitorUtils.addDimensionsToBuilder(builder, dimensions);
  
        emitter.emit(builder.build("jvm/pool/max", usage.getMax()));
        emitter.emit(builder.build("jvm/pool/committed", usage.getCommitted()));
        emitter.emit(builder.build("jvm/pool/used", usage.getUsed()));
        emitter.emit(builder.build("jvm/pool/init", usage.getInit()));
      }
    }