/// <inheritdoc/>
        public Task WriteAsync(
            Stream output,
            MetricsDataValueSource metricsData,
            CancellationToken cancellationToken = default)
        {
            if (output == null)
            {
                throw new ArgumentNullException(nameof(output));
            }

            var bodyData = ProtoFormatter.Format(metricsData.GetPrometheusMetricsSnapshot(_options.MetricNameFormatter));
            return output.WriteAsync(bodyData, 0, bodyData.Length, cancellationToken);
        }
        public Task WriteAsync(HttpContext context, MetricsDataValueSource metricsData, CancellationToken token = default(CancellationToken))
        {
            var bodyData = ProtoFormatter.Format(metricsData.GetPrometheusMetricsSnapshot());

            return(context.Response.Body.WriteAsync(bodyData, 0, bodyData.Length, token));
        }