Azure / Azure/diagnostics-eventflow

CsvHealthReporter does not output any logs

Open
#421 1 comment 0 reactions 1 assignee Claimed by @xiaomi7732 View on GitHub
Dominant language
C#
Stars
311
Forks
101
PR merge metrics
No merged PRs in 30d

Description

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()
.Configure((csvHealthReporterConfiguration, configuration) =>
{
configuration.GetSection("EventFlow").GetSection("HealthReporter").Bind(csvHealthReporterConfiguration);
});

serviceCollection.AddSingleton(
sp => new CsvHealthReporter(
sp.GetRequiredService>().Value));

serviceCollection.AddSingleton();
serviceCollection.AddSingleton();

// Create event flow
serviceCollection.AddSingleton(sp =>
{
var genevaUploader = sp.GetRequiredService();
var healthReporter = sp.GetRequiredService();
var inputs = new IObservable[]
{
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);
});
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.