2 writes to Otlp
Aspire.Dashboard.Tests (2)
DashboardOptionsTests.cs (1)
34Otlp =
OtlpApiKeyAuthenticationHandlerTests.cs (1)
94Otlp =
60 references to Otlp
Aspire.Dashboard (35)
Authentication\OtlpApiKey\OtlpApiKeyAuthenticationHandler.cs (1)
24var options = _dashboardOptions.CurrentValue.Otlp;
Authentication\OtlpCompositeAuthenticationHandler.cs (2)
44if (options.Otlp.AuthMode is OtlpAuthMode.ApiKey) 48else if (options.Otlp.AuthMode is OtlpAuthMode.ClientCertificate)
Components\Layout\MainLayout.razor.cs (4)
240return (Options.CurrentValue.Otlp.GetGrpcEndpointAddress() != null || Options.CurrentValue.Otlp.GetHttpEndpointAddress() != null) && 241Options.CurrentValue.Otlp.AuthMode == OtlpAuthMode.Unsecured && 242!Options.CurrentValue.Otlp.SuppressUnsecuredMessage;
Configuration\PostConfigureDashboardOptions.cs (5)
57options.Otlp.GrpcEndpointUrl = otlpGrpcUrl; 64options.Otlp.HttpEndpointUrl = otlpHttpUrl; 86options.Otlp.AuthMode = OtlpAuthMode.Unsecured; 94options.Otlp.AuthMode ??= OtlpAuthMode.Unsecured; 134options.Otlp.SuppressUnsecuredMessage = suppressUnsecuredTelemetryMessage;
Configuration\ValidateDashboardOptions.cs (10)
63errorMessages.Add($"Unexpected frontend authentication mode: {options.Otlp.AuthMode}"); 72if (!options.Otlp.TryParseOptions(out var otlpParseErrorMessage)) 78var hasOtlpEndpoint = !string.IsNullOrEmpty(options.Otlp.GrpcEndpointUrl) || !string.IsNullOrEmpty(options.Otlp.HttpEndpointUrl); 81switch (options.Otlp.AuthMode) 86if (string.IsNullOrEmpty(options.Otlp.PrimaryApiKey)) 90if (options.Otlp.SecondaryApiKey is { Length: 0 }) 96for (var i = 0; i < options.Otlp.AllowedCertificates.Count; i++) 98var allowedCertRule = options.Otlp.AllowedCertificates[i]; 109errorMessages.Add($"Unexpected OTLP authentication mode: {options.Otlp.AuthMode}");
DashboardWebApplication.cs (13)
279var isAllHttps = browserHttpsPort is not null && IsHttpsOrNull(dashboardOptions.Otlp.GetGrpcEndpointAddress()) && IsHttpsOrNull(dashboardOptions.Otlp.GetHttpEndpointAddress()); 316if (dashboardOptions.Otlp.Cors.IsCorsEnabled) 322var corsOptions = dashboardOptions.Otlp.Cors; 478if (dashboardOptions.Otlp.Cors.IsCorsEnabled) 509_dashboardOptionsMonitor.CurrentValue.Otlp.AuthMode == OtlpAuthMode.Unsecured) 545if (!string.IsNullOrEmpty(dashboardOptions.Otlp.Cors.AllowedOrigins)) 628_app.MapHttpOtlpApi(dashboardOptions.Otlp); 722EndpointInfo.TryAddEndpoint(endpoints, dashboardOptions.Otlp.GetGrpcEndpointAddress(), "OtlpGrpc", httpProtocols: HttpProtocols.Http2, requireCertificate: dashboardOptions.Otlp.AuthMode == OtlpAuthMode.ClientCertificate, connectionType: ConnectionType.OtlpGrpc); 723EndpointInfo.TryAddEndpoint(endpoints, dashboardOptions.Otlp.GetHttpEndpointAddress(), "OtlpHttp", httpProtocols: HttpProtocols.Http1AndHttp2, requireCertificate: dashboardOptions.Otlp.AuthMode == OtlpAuthMode.ClientCertificate, connectionType: ConnectionType.OtlpHttp); 864if (options.Otlp.AllowedCertificates is { Count: > 0 } allowList)
Aspire.Dashboard.Components.Tests (4)
Layout\MainLayoutTests.cs (4)
136o.Otlp.SuppressUnsecuredMessage = telemetrySuppressUnsecuredMessage; 1273o.Otlp.GrpcEndpointUrl = "http://localhost:4317"; 1274o.Otlp.AuthMode = OtlpAuthMode.Unsecured; 1277o.Otlp.TryParseOptions(out _);
Aspire.Dashboard.Tests (21)
DashboardOptionsTests.cs (13)
300options.Otlp.GrpcEndpointUrl = null; 301options.Otlp.HttpEndpointUrl = null; 313options.Otlp.GrpcEndpointUrl = "invalid"; 325options.Otlp.HttpEndpointUrl = "invalid"; 337options.Otlp.AuthMode = OtlpAuthMode.ApiKey; 338options.Otlp.PrimaryApiKey = "primary"; 339options.Otlp.SecondaryApiKey = null; 351options.Otlp.AuthMode = OtlpAuthMode.ApiKey; 352options.Otlp.PrimaryApiKey = ""; 364options.Otlp.AuthMode = OtlpAuthMode.ApiKey; 365options.Otlp.PrimaryApiKey = "primary"; 366options.Otlp.SecondaryApiKey = ""; 385Assert.True(options.CurrentValue.Otlp.SuppressUnsecuredMessage);
Integration\OtlpGrpcServiceTests.cs (2)
207if (o.Otlp.PrimaryApiKey != apiKey) 233Assert.Equal("Different", options.Otlp.PrimaryApiKey);
Integration\OtlpHttpServiceTests.cs (1)
172var options = app.DashboardOptionsMonitor.CurrentValue.Otlp;
Integration\StartupTests.cs (4)
363Assert.Equal(OtlpAuthMode.ApiKey, app.DashboardOptionsMonitor.CurrentValue.Otlp.AuthMode); 364Assert.Equal("TestKey123!", app.DashboardOptionsMonitor.CurrentValue.Otlp.PrimaryApiKey); 566Assert.Equal(OtlpAuthMode.Unsecured, app.DashboardOptionsMonitor.CurrentValue.Otlp.AuthMode); 587Assert.Equal(OtlpAuthMode.Unsecured, app.DashboardOptionsMonitor.CurrentValue.Otlp.AuthMode);
OtlpApiKeyAuthenticationHandlerTests.cs (1)
101Assert.True(options.Otlp.TryParseOptions(out _));