13 instantiations of OtlpApplication
Aspire.Dashboard (1)
Otlp\Storage\TelemetryRepository.cs (1)
212return new OtlpApplication(key.Name, key.InstanceId!, _otlpContext);
Aspire.Dashboard.Components.Tests (1)
Controls\StructuredLogDetailsTests.cs (1)
27var app = new OtlpApplication("app1", "instance1", context);
Aspire.Dashboard.Tests (11)
Model\ApplicationsSelectHelpersTests.cs (1)
217return new OtlpApplication(applicationKey.Name, applicationKey.InstanceId!, TelemetryTestHelpers.CreateContext());
Model\SpanWaterfallViewModelTests.cs (2)
19var app1 = new OtlpApplication("app1", "instance", context); 20var app2 = new OtlpApplication("app2", "instance", context);
Model\TraceHelpersTests.cs (8)
19var app1 = new OtlpApplication("app1", "instance", context); 40var app1 = new OtlpApplication("app1", "instance", context); 41var app2 = new OtlpApplication("app2", "instance", context); 67var app1 = new OtlpApplication("app1", "instance", context); 68var app2 = new OtlpApplication("app2", "instance", context); 94var app1 = new OtlpApplication("app1", "instance", context); 95var app2 = new OtlpApplication("app2", "instance", context); 96var app3 = new OtlpApplication("app3", "instance", context);
80 references to OtlpApplication
Aspire.Dashboard (54)
Components\Pages\Metrics.razor.cs (1)
25private List<OtlpApplication> _applications = default!;
Components\Pages\StructuredLogs.razor.cs (2)
35private List<OtlpApplication> _applications = default!; 329private string GetResourceName(OtlpApplicationView app) => OtlpApplication.GetResourceName(app.Application, _applications);
Components\Pages\TraceDetail.razor.cs (2)
29private List<OtlpApplication> _applications = default!; 263private string GetResourceName(OtlpApplicationView app) => OtlpApplication.GetResourceName(app, _applications);
Components\Pages\Traces.razor.cs (4)
34private List<OtlpApplication> _applications = default!; 213private string GetResourceName(OtlpApplication app) => OtlpApplication.GetResourceName(app, _applications); 214private string GetResourceName(OtlpApplicationView app) => OtlpApplication.GetResourceName(app, _applications);
Components\ResourcesGridColumns\UnreadLogErrorsBadge.razor.cs (1)
36var application = TelemetryRepository.GetApplicationByCompositeName(resource.Name);
Model\Otlp\ApplicationsSelectHelpers.cs (4)
43public static List<SelectViewModel<ResourceTypeDetails>> CreateApplications(List<OtlpApplication> applications) 45var replicasByApplicationName = OtlpApplication.GetReplicasByApplicationName(applications); 54var app = replicas.Single(); 76Name = OtlpApplication.GetResourceName(replica, applications)
Model\Otlp\SpanWaterfallViewModel.cs (3)
35public string GetTooltip(List<OtlpApplication> allApplications) 50public static string GetTitle(OtlpSpan span, List<OtlpApplication> allApplications) 52return $"{OtlpApplication.GetResourceName(span.Source, allApplications)}: {GetDisplaySummary(span)}";
Model\TraceHelpers.cs (3)
48var appFirstTimes = new Dictionary<OtlpApplication, OrderedApplication>(); 86public sealed class OrderedApplication(OtlpApplication application, int index, DateTime firstDateTime, int totalSpans, int erroredSpans) 88public OtlpApplication Application { get; } = application;
Otlp\Model\OtlpApplication.cs (6)
145public static Dictionary<string, List<OtlpApplication>> GetReplicasByApplicationName(IEnumerable<OtlpApplication> allApplications) 152public static string GetResourceName(OtlpApplicationView app, List<OtlpApplication> allApplications) => 155public static string GetResourceName(OtlpApplication app, List<OtlpApplication> allApplications) 158foreach (var item in allApplications)
Otlp\Model\OtlpApplicationView.cs (4)
16public OtlpApplication Application { get; } 19public OtlpApplicationView(OtlpApplication application, RepeatedField<KeyValue> attributes) 27case OtlpApplication.SERVICE_NAME: 28case OtlpApplication.SERVICE_INSTANCE_ID:
Otlp\Model\OtlpHelpers.cs (3)
35if (attribute.Key == OtlpApplication.SERVICE_INSTANCE_ID) 39if (attribute.Key == OtlpApplication.SERVICE_NAME) 43if (attribute.Key == OtlpApplication.PROCESS_EXECUTABLE_NAME)
Otlp\Storage\TelemetryRepository.cs (21)
34private readonly ConcurrentDictionary<ApplicationKey, OtlpApplication> _applications = new(); 39private readonly HashSet<(OtlpApplication Application, string PropertyKey)> _logPropertyKeys = new(); 40private readonly HashSet<(OtlpApplication Application, string PropertyKey)> _tracePropertyKeys = new(); 82public List<OtlpApplication> GetApplications() 87public List<OtlpApplication> GetApplicationsByName(string name) 92private List<OtlpApplication> GetApplicationsCore(string? name) 94IEnumerable<OtlpApplication> results = _applications.Values; 104public OtlpApplication? GetApplicationByCompositeName(string compositeName) 117public OtlpApplication? GetApplication(ApplicationKey key) 124_applications.TryGetValue(key, out var application); 128public List<OtlpApplication> GetApplications(ApplicationKey key) 169foreach (var application in applications) 191if (_applications.TryGetValue(key, out var application)) 205(OtlpApplication, bool) GetOrAddApplication(ApplicationKey key, Resource resource) 209var application = _applications.GetOrAdd(key, _ => 383List<OtlpApplication>? applications = null; 417private static bool MatchApplications(OtlpApplication application, List<OtlpApplication> applications) 431List<OtlpApplication>? applications = null; 458List<OtlpApplication>? applications = null; 485List<OtlpApplication>? applications = null;
Aspire.Dashboard.Components.Tests (3)
Controls\StructuredLogDetailsTests.cs (2)
27var app = new OtlpApplication("app1", "instance1", context); 32new KeyValue { Key = OtlpApplication.SERVICE_NAME, Value = new AnyValue { StringValue = "value1" } }
tests\Shared\Telemetry\TelemetryTestHelpers.cs (1)
289public static OtlpSpan CreateSpan(OtlpApplication app, OtlpTrace trace, OtlpScope scope, string spanId, string? parentSpanId, DateTime startDate)
Aspire.Dashboard.Tests (23)
Model\ApplicationsSelectHelpersTests.cs (6)
23var appVMs = ApplicationsSelectHelpers.CreateApplications(new List<OtlpApplication> 68var appVMs = ApplicationsSelectHelpers.CreateApplications(new List<OtlpApplication> 110var apps = new Dictionary<string, OtlpApplication>(); 134var appVMs = ApplicationsSelectHelpers.CreateApplications(new List<OtlpApplication> 171var appVMs = ApplicationsSelectHelpers.CreateApplications(new List<OtlpApplication> 205private static OtlpApplication CreateOtlpApplication(string name, string instanceId)
Model\SpanWaterfallViewModelTests.cs (2)
19var app1 = new OtlpApplication("app1", "instance", context); 20var app2 = new OtlpApplication("app2", "instance", context);
Model\TraceHelpersTests.cs (8)
19var app1 = new OtlpApplication("app1", "instance", context); 40var app1 = new OtlpApplication("app1", "instance", context); 41var app2 = new OtlpApplication("app2", "instance", context); 67var app1 = new OtlpApplication("app1", "instance", context); 68var app2 = new OtlpApplication("app2", "instance", context); 94var app1 = new OtlpApplication("app1", "instance", context); 95var app2 = new OtlpApplication("app2", "instance", context); 96var app3 = new OtlpApplication("app3", "instance", context);
TelemetryRepositoryTests\ApplicationTests.cs (5)
41var app1 = repository.GetApplicationByCompositeName("app1-TestId"); 42var app2 = repository.GetApplicationByCompositeName("APP2-TESTID"); 43var notFound = repository.GetApplicationByCompositeName("APP2_TESTID"); 141var instance1Name = OtlpApplication.GetResourceName(applications[0], applications); 142var instance2Name = OtlpApplication.GetResourceName(applications[1], applications);
TelemetryRepositoryTests\TraceTests.cs (1)
1477var application = Assert.Single(repository.GetApplications());
tests\Shared\Telemetry\TelemetryTestHelpers.cs (1)
289public static OtlpSpan CreateSpan(OtlpApplication app, OtlpTrace trace, OtlpScope scope, string spanId, string? parentSpanId, DateTime startDate)