18 instantiations of BottomKLogSamplingOptions
Microsoft.Extensions.Telemetry.Tests (18)
Sampling\BottomKLogBufferTests.cs (16)
258new BottomKLogSamplingOptions(), 267var options = new BottomKLogSamplingOptions 278var options = new BottomKLogSamplingOptions 289var options = new BottomKLogSamplingOptions 303var options = new BottomKLogSamplingOptions 314var options = new BottomKLogSamplingOptions 325var initial = new BottomKLogSamplingOptions 335monitor.Set(new BottomKLogSamplingOptions { Enabled = false }); 344var initial = new BottomKLogSamplingOptions 352var updated = new BottomKLogSamplingOptions 386var replacement = new BottomKLogSamplingOptions 414var initial = new BottomKLogSamplingOptions 424var updated = new BottomKLogSamplingOptions 438var initial = new BottomKLogSamplingOptions 458var updated = new BottomKLogSamplingOptions 598new BottomKLogSamplingOptions
Sampling\BottomKSamplingLoggingBuilderExtensionsTests.cs (2)
125var options = new BottomKLogSamplingOptions 148var options = new BottomKLogSamplingOptions
78 references to BottomKLogSamplingOptions
Microsoft.Extensions.Telemetry (26)
Sampling\BottomKLogBuffer.cs (10)
41public BottomKLogBuffer(IOptionsMonitor<BottomKLogSamplingOptions> options, TimeProvider timeProvider) 50public BottomKLogBuffer(BottomKLogSamplingOptions config, TimeProvider timeProvider) 193private void OnOptionsChanged(BottomKLogSamplingOptions? options, string? name) 305public BottomKAdmission Admit(EventId eventId, BottomKLogSamplingOptions options) 424public AlgorithmConfiguration(BottomKLogSamplingOptions options) 451private sealed class FixedOptionsMonitor : IOptionsMonitor<BottomKLogSamplingOptions> 453public FixedOptionsMonitor(BottomKLogSamplingOptions value) 458public BottomKLogSamplingOptions CurrentValue { get; } 460public BottomKLogSamplingOptions Get(string? name) => CurrentValue; 462public IDisposable? OnChange(Action<BottomKLogSamplingOptions, string?> listener) => null;
Sampling\BottomKLogSamplingOptionsCustomValidator.cs (6)
14internal sealed class BottomKLogSamplingOptionsCustomValidator : IValidateOptions<BottomKLogSamplingOptions> 16public ValidateOptionsResult Validate(string? name, BottomKLogSamplingOptions options) 48result.AddError("Rules cannot contain null values.", nameof(BottomKLogSamplingOptions.Rules)); 54result.AddError("Rule LogLevel must be a defined value.", nameof(BottomKLogSamplingOptions.Rules)); 65result.AddError("Rule category names cannot be empty.", nameof(BottomKLogSamplingOptions.Rules)); 74nameof(BottomKLogSamplingOptions.Rules));
Sampling\BottomKLogSamplingOptionsValidator.cs (2)
10/// Validates data annotations on <see cref="BottomKLogSamplingOptions"/>. 13internal sealed partial class BottomKLogSamplingOptionsValidator : IValidateOptions<BottomKLogSamplingOptions>
Sampling\BottomKLogSamplingPolicy.cs (2)
14public BottomKLogSamplingPolicy(BottomKLogSamplingOptions options) 20public BottomKLogSamplingOptions Options { get; }
Sampling\BottomKSamplingLoggingBuilderExtensions.cs (6)
37_ = builder.Services.PostConfigure<BottomKLogSamplingOptions>(options => 56Action<BottomKLogSamplingOptions> configure) 81_ = builder.Services.Configure<BottomKLogSamplingOptions>(section); 94.AddOptionsWithValidateOnStart<BottomKLogSamplingOptions, BottomKLogSamplingOptionsValidator>() 95.Services.AddOptionsWithValidateOnStart<BottomKLogSamplingOptions, BottomKLogSamplingOptionsCustomValidator>(); 98services.GetRequiredService<IOptionsMonitor<BottomKLogSamplingOptions>>(),
Microsoft.Extensions.Telemetry.PerformanceTests (2)
BottomKImpactBench.cs (2)
122return CreateServices((Action<BottomKLogSamplingOptions>?)null); 133private static ServiceProvider CreateServices(Action<BottomKLogSamplingOptions>? configure)
Microsoft.Extensions.Telemetry.Tests (50)
Sampling\BottomKLogBufferTests.cs (22)
267var options = new BottomKLogSamplingOptions 278var options = new BottomKLogSamplingOptions 289var options = new BottomKLogSamplingOptions 303var options = new BottomKLogSamplingOptions 314var options = new BottomKLogSamplingOptions 325var initial = new BottomKLogSamplingOptions 344var initial = new BottomKLogSamplingOptions 352var updated = new BottomKLogSamplingOptions 386var replacement = new BottomKLogSamplingOptions 414var initial = new BottomKLogSamplingOptions 424var updated = new BottomKLogSamplingOptions 438var initial = new BottomKLogSamplingOptions 458var updated = new BottomKLogSamplingOptions 680BottomKLogSamplingOptions options, 702BottomKLogSamplingOptions options, 727private sealed class MutableOptionsMonitor : IOptionsMonitor<BottomKLogSamplingOptions> 729private Action<BottomKLogSamplingOptions, string?>? _listener; 731public MutableOptionsMonitor(BottomKLogSamplingOptions value) 736public BottomKLogSamplingOptions CurrentValue { get; private set; } 738public BottomKLogSamplingOptions Get(string? name) => CurrentValue; 740public IDisposable OnChange(Action<BottomKLogSamplingOptions, string?> listener) 746public void Set(BottomKLogSamplingOptions value)
Sampling\BottomKSamplingLoggingBuilderExtensionsTests.cs (28)
32BottomKLogSamplingOptions options = 33provider.GetRequiredService<IOptionsMonitor<BottomKLogSamplingOptions>>().CurrentValue; 52BottomKLogSamplingOptions options = 53provider.GetRequiredService<IOptionsMonitor<BottomKLogSamplingOptions>>().CurrentValue; 77BottomKLogSamplingOptions options = 78provider.GetRequiredService<IOptionsMonitor<BottomKLogSamplingOptions>>().CurrentValue; 101BottomKLogSamplingOptions options = 102provider.GetRequiredService<IOptionsMonitor<BottomKLogSamplingOptions>>().CurrentValue; 116IOptionsMonitor<BottomKLogSamplingOptions> options = 117provider.GetRequiredService<IOptionsMonitor<BottomKLogSamplingOptions>>(); 125var options = new BottomKLogSamplingOptions 148var options = new BottomKLogSamplingOptions 170BottomKLogSamplingOptions options = 171provider.GetRequiredService<IOptionsMonitor<BottomKLogSamplingOptions>>().CurrentValue; 188BottomKLogSamplingOptions options = 189provider.GetRequiredService<IOptionsMonitor<BottomKLogSamplingOptions>>().CurrentValue; 208BottomKLogSamplingOptions options = 209provider.GetRequiredService<IOptionsMonitor<BottomKLogSamplingOptions>>().CurrentValue; 238BottomKLogSamplingOptions options = 239provider.GetRequiredService<IOptionsMonitor<BottomKLogSamplingOptions>>().CurrentValue; 273BottomKLogSamplingOptions options = 274provider.GetRequiredService<IOptionsMonitor<BottomKLogSamplingOptions>>().CurrentValue; 291IOptionsMonitor<BottomKLogSamplingOptions> options = 292provider.GetRequiredService<IOptionsMonitor<BottomKLogSamplingOptions>>(); 309BottomKLogSamplingOptions options = 310provider.GetRequiredService<IOptionsMonitor<BottomKLogSamplingOptions>>().CurrentValue; 370descriptor => descriptor.ServiceType == typeof(IConfigureOptions<BottomKLogSamplingOptions>)); 384descriptor => descriptor.ServiceType == typeof(IPostConfigureOptions<BottomKLogSamplingOptions>));