2 writes to Otlp
Aspire.Dashboard.Tests (2)
DashboardOptionsTests.cs (1)
22Otlp =
OtlpApiKeyAuthenticationHandlerTests.cs (1)
79Otlp =
35 references to Otlp
Aspire.Dashboard (25)
Authentication\OtlpApiKey\OtlpApiKeyAuthenticationHandler.cs (1)
24var options = _dashboardOptions.CurrentValue.Otlp;
Configuration\PostConfigureDashboardOptions.cs (4)
32options.Otlp.GrpcEndpointUrl = otlpGrpcUrl; 37options.Otlp.HttpEndpointUrl = otlpHttpUrl; 50options.Otlp.AuthMode = OtlpAuthMode.Unsecured; 55options.Otlp.AuthMode ??= OtlpAuthMode.Unsecured;
Configuration\ValidateDashboardOptions.cs (7)
54errorMessages.Add($"Unexpected frontend authentication mode: {options.Otlp.AuthMode}"); 63if (!options.Otlp.TryParseOptions(out var otlpParseErrorMessage)) 68switch (options.Otlp.AuthMode) 73if (string.IsNullOrEmpty(options.Otlp.PrimaryApiKey)) 79for (var i = 0; i < options.Otlp.AllowedCertificates.Count; i++) 81var allowedCertRule = options.Otlp.AllowedCertificates[i]; 92errorMessages.Add($"Unexpected OTLP authentication mode: {options.Otlp.AuthMode}");
DashboardWebApplication.cs (13)
140var isAllHttps = browserHttpsPort is not null && IsHttpsOrNull(dashboardOptions.Otlp.GetGrpcEndpointUri()) && IsHttpsOrNull(dashboardOptions.Otlp.GetHttpEndpointUri()); 162if (!string.IsNullOrEmpty(dashboardOptions.Otlp.Cors.AllowedOrigins)) 177var corsOptions = dashboardOptions.Otlp.Cors; 275if (_dashboardOptionsMonitor.CurrentValue.Otlp.AuthMode == OtlpAuthMode.Unsecured) 298if (!string.IsNullOrEmpty(dashboardOptions.Otlp.Cors.AllowedOrigins)) 349_app.MapHttpOtlpApi(dashboardOptions.Otlp); 444var otlpGrpcUri = dashboardOptions.Otlp.GetGrpcEndpointUri(); 445var otlpHttpUri = dashboardOptions.Otlp.GetHttpEndpointUri(); 457AddEndpointConfiguration(initialValues, "OtlpGrpc", otlpGrpcUri.OriginalString, HttpProtocols.Http2, requiredClientCertificate: dashboardOptions.Otlp.AuthMode == OtlpAuthMode.ClientCertificate); 461AddEndpointConfiguration(initialValues, "OtlpHttp", otlpHttpUri.OriginalString, HttpProtocols.Http1AndHttp2, requiredClientCertificate: dashboardOptions.Otlp.AuthMode == OtlpAuthMode.ClientCertificate); 483AddEndpointConfiguration(initialValues, "OtlpGrpc", url!, HttpProtocols.Http1AndHttp2, requiredClientCertificate: dashboardOptions.Otlp.AuthMode == OtlpAuthMode.ClientCertificate); 627if (options.Otlp.AllowedCertificates is { Count: > 0 } allowList)
Aspire.Dashboard.Tests (10)
DashboardOptionsTests.cs (4)
213options.Otlp.GrpcEndpointUrl = null; 214options.Otlp.HttpEndpointUrl = null; 228options.Otlp.GrpcEndpointUrl = "invalid"; 240options.Otlp.HttpEndpointUrl = "invalid";
Integration\OtlpGrpcServiceTests.cs (1)
224Assert.Equal("Different", options.Otlp.PrimaryApiKey);
Integration\StartupTests.cs (4)
99Assert.Equal(OtlpAuthMode.ApiKey, app.DashboardOptionsMonitor.CurrentValue.Otlp.AuthMode); 100Assert.Equal("TestKey123!", app.DashboardOptionsMonitor.CurrentValue.Otlp.PrimaryApiKey); 280Assert.Equal(OtlpAuthMode.Unsecured, app.DashboardOptionsMonitor.CurrentValue.Otlp.AuthMode); 299Assert.Equal(OtlpAuthMode.Unsecured, app.DashboardOptionsMonitor.CurrentValue.Otlp.AuthMode);
OtlpApiKeyAuthenticationHandlerTests.cs (1)
86Assert.True(options.Otlp.TryParseOptions(out _));