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