| | | 1 | | namespace Elsa.Diagnostics.OpenTelemetry.Options; |
| | | 2 | | |
| | | 3 | | public class OpenTelemetryDiagnosticsOptions |
| | | 4 | | { |
| | 49 | 5 | | public int TraceCapacity { get; set; } = 5_000; |
| | 48 | 6 | | public int SpanCapacity { get; set; } = 25_000; |
| | 48 | 7 | | public int MetricPointCapacity { get; set; } = 25_000; |
| | 48 | 8 | | public int LogRecordCapacity { get; set; } = 10_000; |
| | 47 | 9 | | public int ResourceCapacity { get; set; } = 500; |
| | 35 | 10 | | public int SubscriberChannelCapacity { get; set; } = 1_000; |
| | 44 | 11 | | public int MaxQuerySize { get; set; } = 1_000; |
| | 36 | 12 | | public long MaxHttpRequestBodySize { get; set; } = 10 * 1024 * 1024; |
| | 51 | 13 | | public string HttpEndpointPath { get; set; } = "/elsa/otlp/v1"; |
| | 3 | 14 | | public string? GrpcEndpointPath { get; set; } |
| | 32 | 15 | | public string GrpcDisabledReason { get; set; } = "gRPC ingestion is not enabled for this host."; |
| | 30 | 16 | | public string HubRoute { get; set; } = "/elsa/hubs/diagnostics/opentelemetry"; |
| | 7 | 17 | | public bool EnableGrpc { get; set; } |
| | 22 | 18 | | public string? ApiKey { get; set; } |
| | 35 | 19 | | public string ApiKeyHeaderName { get; set; } = "x-otlp-api-key"; |
| | 44 | 20 | | public bool AllowUnauthenticatedLoopback { get; set; } = true; |
| | | 21 | | |
| | 8 | 22 | | public ICollection<string> SensitiveNames { get; set; } = |
| | 30 | 23 | | [ |
| | 30 | 24 | | "authorization", |
| | 30 | 25 | | "token", |
| | 30 | 26 | | "password", |
| | 30 | 27 | | "secret", |
| | 30 | 28 | | "api-key", |
| | 30 | 29 | | "apikey", |
| | 30 | 30 | | "cookie", |
| | 30 | 31 | | "connection-string", |
| | 30 | 32 | | "connectionstring" |
| | 30 | 33 | | ]; |
| | | 34 | | |
| | 8 | 35 | | public ICollection<string> SensitiveTextPatterns { get; set; } = |
| | 30 | 36 | | [ |
| | 30 | 37 | | "(?i)bearer\\s+[A-Za-z0-9._~+/=-]+", |
| | 30 | 38 | | "(?i)(password|secret|token|api[-_]?key)\\s*[=:]\\s*[^\\s,;]+", |
| | 30 | 39 | | "(?i)(AccountKey|SharedAccessKey)=([^;\\s]+)" |
| | 30 | 40 | | ]; |
| | | 41 | | |
| | 54 | 42 | | public TimeSpan SensitiveTextPatternTimeout { get; set; } = TimeSpan.FromMilliseconds(100); |
| | | 43 | | } |