// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
+using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Diagnostics.NETCore.Client;
// CONSIDER: Might have to deduplicate providers and merge them together.
return _configurations.SelectMany(c => c.GetProviders()).ToList();
}
+
+ public override bool RequestRundown
+ {
+ get => _configurations.Any(c => c.RequestRundown);
+ set => throw new NotSupportedException();
+ }
}
}
public AspNetTriggerSourceConfiguration(float? heartbeatIntervalSeconds = null)
{
+ RequestRundown = false;
_heartbeatIntervalSeconds = heartbeatIntervalSeconds;
}
public sealed class EventPipeProviderSourceConfiguration : MonitoringSourceConfiguration
{
private readonly IEnumerable<EventPipeProvider> _providers;
- private readonly bool _requestRundown;
private readonly int _bufferSizeInMB;
public EventPipeProviderSourceConfiguration(bool requestRundown = true, int bufferSizeInMB = 256, params EventPipeProvider[] providers)
{
_providers = providers;
- _requestRundown = requestRundown;
+ RequestRundown = requestRundown;
_bufferSizeInMB = bufferSizeInMB;
}
return _providers.ToList();
}
- public override bool RequestRundown => _requestRundown;
-
public override int BufferSizeInMB => _bufferSizeInMB;
}
}
{
public sealed class GCDumpSourceConfiguration : MonitoringSourceConfiguration
{
+ public GCDumpSourceConfiguration()
+ {
+ RequestRundown = false;
+ }
+
public override IList<EventPipeProvider> GetProviders()
{
var providers = new List<EventPipeProvider>()
{
public sealed class HttpRequestSourceConfiguration : MonitoringSourceConfiguration
{
+ public HttpRequestSourceConfiguration()
+ {
+ //CONSIDER removing rundown for this scenario.
+ RequestRundown = true;
+ }
+
private const string DiagnosticFilterString =
"Microsoft.AspNetCore/Microsoft.AspNetCore.Hosting.HttpRequestIn.Start@Activity1Start:-" +
"Request.Scheme" +
/// </summary>
public LoggingSourceConfiguration(LogLevel level, LogMessageType messageType, IDictionary<string, LogLevel?> filterSpecs, bool useAppFilters)
{
+ RequestRundown = false;
_filterSpecs = ToFilterSpecsString(filterSpecs, useAppFilters);
_keywords = (long)ToKeywords(messageType);
_level = ToEventLevel(level);
public MetricSourceConfiguration(float metricIntervalSeconds, IEnumerable<string> customProviderNames)
{
+ RequestRundown = false;
if (customProviderNames == null)
{
throw new ArgumentNullException(nameof(customProviderNames));
public abstract IList<EventPipeProvider> GetProviders();
- public virtual bool RequestRundown => true;
+ public virtual bool RequestRundown { get; set; } = true;
public virtual int BufferSizeInMB => 256;
}
// See the LICENSE file in the project root for more information.
using Microsoft.Diagnostics.NETCore.Client;
+using System;
using System.Collections.Generic;
using System.Diagnostics.Tracing;
public override int BufferSizeInMB => 1;
- public override bool RequestRundown => false;
+ public override bool RequestRundown
+ {
+ get => false;
+ set => throw new NotSupportedException();
+ }
}
}