< Summary

Information
Class: ProjectTemplate.Web.Options.ApplicationOpenTelemetryOptions
Assembly: ProjectTemplate.Web
File(s): /home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/src/ProjectTemplate.Web/Options/ApplicationOpenTelemetryOptions.cs
Line coverage
100%
Covered lines: 8
Uncovered lines: 0
Coverable lines: 8
Total lines: 52
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Enabled()100%11100%
get_ServiceName()100%11100%
get_ServiceVersion()100%11100%
get_EnableTracing()100%11100%
get_EnableMetrics()100%11100%
get_EnableAspNetCoreInstrumentation()100%11100%
get_EnableHttpClientInstrumentation()100%11100%
get_Otlp()100%11100%

File(s)

/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/src/ProjectTemplate.Web/Options/ApplicationOpenTelemetryOptions.cs

#LineLine coverage
 1namespace ProjectTemplate.Web.Options;
 2
 3/// <summary>
 4/// Represents template-level OpenTelemetry configuration.
 5/// </summary>
 6public sealed class ApplicationOpenTelemetryOptions
 7{
 8    /// <summary>
 9    /// Configuration section name for OpenTelemetry settings.
 10    /// </summary>
 11    public const string SectionName = "ProjectTemplate:OpenTelemetry";
 12
 13    /// <summary>
 14    /// Gets or sets a value indicating whether OpenTelemetry is enabled.
 15    /// </summary>
 76216    public bool Enabled { get; set; } = true;
 17
 18    /// <summary>
 19    /// Gets or sets the logical OpenTelemetry service name.
 20    /// </summary>
 99221    public string ServiceName { get; set; } = "ProjectTemplate.Web";
 22
 23    /// <summary>
 24    /// Gets or sets the logical OpenTelemetry service version.
 25    /// </summary>
 120826    public string? ServiceVersion { get; set; } = "1.0.0";
 27
 28    /// <summary>
 29    /// Gets or sets a value indicating whether tracing is enabled.
 30    /// </summary>
 76631    public bool EnableTracing { get; set; } = true;
 32
 33    /// <summary>
 34    /// Gets or sets a value indicating whether metrics are enabled.
 35    /// </summary>
 76636    public bool EnableMetrics { get; set; } = true;
 37
 38    /// <summary>
 39    /// Gets or sets a value indicating whether ASP.NET Core instrumentation is enabled.
 40    /// </summary>
 91641    public bool EnableAspNetCoreInstrumentation { get; set; } = true;
 42
 43    /// <summary>
 44    /// Gets or sets a value indicating whether HttpClient instrumentation is enabled.
 45    /// </summary>
 91646    public bool EnableHttpClientInstrumentation { get; set; } = true;
 47
 48    /// <summary>
 49    /// Gets or sets OTLP exporter options.
 50    /// </summary>
 134651    public ApplicationOtlpExporterOptions Otlp { get; set; } = new();
 52}