You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're seeing some missing data in the sink, and wanted to check if there are any errors being logged by Event Flow. I'm having trouble getting the CsvHealthReporter to write errors to a CSV file. The output CSV file does not even get created and I wanted to know how to proceed with debugging this scenario?
We're on .NET6, here's the example setup code we're using:
serviceCollection.AddOptions<CsvHealthReporterConfiguration>()
.Configure<IConfiguration>((csvHealthReporterConfiguration, configuration) =>
{
configuration.GetSection("EventFlow").GetSection("HealthReporter").Bind(csvHealthReporterConfiguration);
});
serviceCollection.AddSingleton<IHealthReporter>(
sp => new CsvHealthReporter(
sp.GetRequiredService<IOptions<CsvHealthReporterConfiguration>>().Value));
serviceCollection.AddSingleton<IGenevaUploader, AppServiceGenevaLogUploader>();
serviceCollection.AddSingleton<IMetricsLogger, GenevaMetricsLogger>();
// Create event flow
serviceCollection.AddSingleton<ITelemetryProcessorFactory>(sp =>
{
var genevaUploader = sp.GetRequiredService<IGenevaUploader>();
var healthReporter = sp.GetRequiredService<IHealthReporter>();
var inputs = new IObservable<EventData>[]
{
new ApplicationInsightsInputFactory().CreateItem(null, healthReporter)
};
var sinks = new[] { new EventSink(new GenevaOutputEventFlow(healthReporter, genevaUploader), null) };
DiagnosticPipeline eventFlow = new DiagnosticPipeline(healthReporter, inputs, null, sinks);
return new EventFlowTelemetryProcessorFactory(eventFlow);
});
The text was updated successfully, but these errors were encountered:
Hey @mskidavid, what does the CsvHealthReporterConfiguration look like? Specifically, is there logFileFolder specified? And do you know does the app has permission to write to that folder?
CsvHealthReporter will try to open the log file for writing during initialization. If it can't, by default, a debug message will be output to the debugger viewer like Visual Studio Output window, etc. This can happen especially if a value for the log file path is not provided (default is used, which is the application executables folder) and the application executables are residing on a read-only file system. Docker tools for Visual Studio use this configuration during debugging, so for containerized services the recommended practice is to specify the log file path explicitly.
We're seeing some missing data in the sink, and wanted to check if there are any errors being logged by Event Flow. I'm having trouble getting the CsvHealthReporter to write errors to a CSV file. The output CSV file does not even get created and I wanted to know how to proceed with debugging this scenario?
We're on .NET6, here's the example setup code we're using:
The text was updated successfully, but these errors were encountered: