| | | 1 | | namespace ProjectTemplate.Web.Options; |
| | | 2 | | |
| | | 3 | | /// <summary> |
| | | 4 | | /// Represents template-level OpenTelemetry configuration. |
| | | 5 | | /// </summary> |
| | | 6 | | public 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> |
| | 762 | 16 | | public bool Enabled { get; set; } = true; |
| | | 17 | | |
| | | 18 | | /// <summary> |
| | | 19 | | /// Gets or sets the logical OpenTelemetry service name. |
| | | 20 | | /// </summary> |
| | 992 | 21 | | public string ServiceName { get; set; } = "ProjectTemplate.Web"; |
| | | 22 | | |
| | | 23 | | /// <summary> |
| | | 24 | | /// Gets or sets the logical OpenTelemetry service version. |
| | | 25 | | /// </summary> |
| | 1208 | 26 | | public string? ServiceVersion { get; set; } = "1.0.0"; |
| | | 27 | | |
| | | 28 | | /// <summary> |
| | | 29 | | /// Gets or sets a value indicating whether tracing is enabled. |
| | | 30 | | /// </summary> |
| | 766 | 31 | | public bool EnableTracing { get; set; } = true; |
| | | 32 | | |
| | | 33 | | /// <summary> |
| | | 34 | | /// Gets or sets a value indicating whether metrics are enabled. |
| | | 35 | | /// </summary> |
| | 766 | 36 | | 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> |
| | 916 | 41 | | public bool EnableAspNetCoreInstrumentation { get; set; } = true; |
| | | 42 | | |
| | | 43 | | /// <summary> |
| | | 44 | | /// Gets or sets a value indicating whether HttpClient instrumentation is enabled. |
| | | 45 | | /// </summary> |
| | 916 | 46 | | public bool EnableHttpClientInstrumentation { get; set; } = true; |
| | | 47 | | |
| | | 48 | | /// <summary> |
| | | 49 | | /// Gets or sets OTLP exporter options. |
| | | 50 | | /// </summary> |
| | 1346 | 51 | | public ApplicationOtlpExporterOptions Otlp { get; set; } = new(); |
| | | 52 | | } |