public HttpWorkerChannelFactory(IEnvironment environment, ILoggerFactory loggerFactory, IOptions <HttpWorkerOptions> httpInvokerOptions,
                                 IOptionsMonitor <ScriptApplicationHostOptions> applicationHostOptions, IHttpWorkerProcessFactory httpInvokerProcessFactory, IHttpInvokerService httpInvokerService)
 {
     _loggerFactory             = loggerFactory ?? throw new ArgumentNullException(nameof(loggerFactory));
     _httpInvokerOptions        = httpInvokerOptions.Value ?? throw new ArgumentNullException(nameof(httpInvokerOptions.Value));
     _httpInvokerProcessFactory = httpInvokerProcessFactory ?? throw new ArgumentNullException(nameof(httpInvokerProcessFactory));
     _httpInvokerService        = httpInvokerService ?? throw new ArgumentNullException(nameof(httpInvokerService));
 }
 internal HttpWorkerChannel(
     string workerId,
     ILanguageWorkerProcess languageWorkerProcess,
     IHttpInvokerService httpInvokerService,
     ILogger logger,
     IMetricsLogger metricsLogger,
     int attemptCount)
 {
     Id = workerId;
     _languageWorkerProcess = languageWorkerProcess;
     _workerChannelLogger   = logger;
     _httpInvokerService    = httpInvokerService;
     _startLatencyMetric    = metricsLogger?.LatencyEvent(string.Format(MetricEventNames.WorkerInitializeLatency, "HttpInvoker", attemptCount));
 }