/// <summary> /// Initializes a new instance of the <see cref="PrometheusExporter"/> class. /// </summary> /// <param name="options">Options for the exporter.</param> public PrometheusExporter(PrometheusExporterOptions options) { this.Options = options; if (options.StartHttpListener) { try { this.metricsHttpServer = new PrometheusExporterMetricsHttpServer(this); this.metricsHttpServer.Start(); } catch (Exception ex) { throw new InvalidOperationException(HttpListenerStartFailureExceptionMessage, ex); } } }
/// <summary> /// Initializes a new instance of the <see cref="PrometheusExporter"/> class. /// </summary> /// <param name="options">Options for the exporter.</param> public PrometheusExporter(PrometheusExporterOptions options) { this.Options = options; }