Open
Description
Is your feature request related to a problem?
We're running the prometheus exporter middleware in production container environment where we have a setup with ILogger exporting to Geneva. We don't have the means to connect perfview or read files on disk to diagnose why the prometheus exporter is returning 500.
Describe the solution you'd like:
What do you want to happen instead? What is the expected behavior?
catch (Exception ex)
{
PrometheusExporterEventSource.Log.FailedExport(ex);
if (!response.HasStarted)
{
response.StatusCode = 500;
}
}
something like this
LogFailedExportException(LogLevel.Error, this.logger);
public partial class PrometheusMiddlewareLogs
{
[LoggerMessage(EventId = 1, Message = "ExportFailed exception")]
static partial void LogFailedExportException(LogLevel logLevel, ILogger logger);
}
I looked at replacing the middleware class but exporter.CollectionManager
is internal so I might need to use some reflection to get around that if we have to hack a fix together.
Activity