in src/ServiceProfiler.EventPipe.Otel/Microsoft.ApplicationInsights.Profiler.Shared/Services/MetadataWriter.cs [14:30]
public async Task WriteAsync(string filePath, IEnumerable<ArtifactLocationProperties> locationProperties, CancellationToken cancellationToken)
{
using StreamWriter writer = new(filePath, true, Encoding.UTF8);
if (locationProperties != null && locationProperties.Any())
{
foreach (ArtifactLocationProperties line in locationProperties)
{
await writer.WriteLineAsync(line.ToString()).ConfigureAwait(false);
cancellationToken.ThrowIfCancellationRequested();
}
}
else
{
await writer.WriteLineAsync("No metadata.").ConfigureAwait(false);
}
}