/// <summary> /// Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: ``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ``` /// </summary> /// <exception cref="Ory.Hydra.Client.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> /// <returns>Task of ApiResponse</returns> public async System.Threading.Tasks.Task <Ory.Hydra.Client.Client.ApiResponse <Object> > PrometheusWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); String[] _contentTypes = new String[] { }; // to determine the Accept header String[] _accepts = new String[] { }; var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync <Object>("/metrics/prometheus", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("Prometheus", localVarResponse); if (_exception != null) { throw _exception; } } return(localVarResponse); }
/// <summary> /// Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: ``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ``` /// </summary> /// <exception cref="Ory.Hydra.Client.Client.ApiException">Thrown when fails to make API call</exception> /// <returns>ApiResponse of Object(void)</returns> public Ory.Hydra.Client.Client.ApiResponse <Object> PrometheusWithHttpInfo() { Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); String[] _contentTypes = new String[] { }; // to determine the Accept header String[] _accepts = new String[] { }; var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } // make the HTTP request var localVarResponse = this.Client.Get <Object>("/metrics/prometheus", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("Prometheus", localVarResponse); if (_exception != null) { throw _exception; } } return(localVarResponse); }