public static void registerRecorderIfNeeded(ExtensionContext context) {
    if (context.getService(DtpInternalMetricRecorder.class) == null) {
      context.registerService(
          DtpInternalMetricRecorder.class,
          new LoggingDtpInternalMetricRecorder(context.getMonitor()));
    }
  }
Registers a LoggingDtpInternalMetricRecorder in the {@link ExtensionContext} if there is not
another {@link DtpInternalMetricRecorder} registered.
portability-api-launcher/src/main/java/org/datatransferproject/launcher/metrics/LoggingDtpInternalMetricRecorder.java