14 instantiations of OtlpApplication
Aspire.Dashboard (1)
Otlp\Storage\TelemetryRepository.cs (1)
216return 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 (12)
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);
TelemetryRepositoryTests\OtlpSpanTests.cs (1)
21var app1 = new OtlpApplication("app1", "instance", context);
87 references to OtlpApplication
Aspire.Dashboard (59)
Components\Pages\Metrics.razor.cs (1)
25private List<OtlpApplication> _applications = default!;
Components\Pages\StructuredLogs.razor.cs (2)
35private List<OtlpApplication> _applications = default!; 338private string GetResourceName(OtlpApplicationView app) => OtlpApplication.GetResourceName(app.Application, _applications);
Components\Pages\TraceDetail.razor.cs (2)
30private List<OtlpApplication> _applications = default!; 285private string GetResourceName(OtlpApplicationView app) => OtlpApplication.GetResourceName(app, _applications);
Components\Pages\Traces.razor.cs (4)
34private List<OtlpApplication> _applications = default!; 222private string GetResourceName(OtlpApplication app) => OtlpApplication.GetResourceName(app, _applications); 223private 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)
240public static Dictionary<string, List<OtlpApplication>> GetReplicasByApplicationName(IEnumerable<OtlpApplication> allApplications) 247public static string GetResourceName(OtlpApplicationView app, List<OtlpApplication> allApplications) => 250public static string GetResourceName(OtlpApplication app, List<OtlpApplication> allApplications) 253foreach (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 (26)
35private readonly ConcurrentDictionary<ApplicationKey, OtlpApplication> _applications = new(); 40private readonly HashSet<(OtlpApplication Application, string PropertyKey)> _logPropertyKeys = new(); 41private readonly HashSet<(OtlpApplication Application, string PropertyKey)> _tracePropertyKeys = new(); 86public List<OtlpApplication> GetApplications() 91public List<OtlpApplication> GetApplicationsByName(string name) 96private List<OtlpApplication> GetApplicationsCore(string? name) 98IEnumerable<OtlpApplication> results = _applications.Values; 108public OtlpApplication? GetApplicationByCompositeName(string compositeName) 121public OtlpApplication? GetApplication(ApplicationKey key) 128_applications.TryGetValue(key, out var application); 132public List<OtlpApplication> GetApplications(ApplicationKey key) 173foreach (var application in applications) 195if (_applications.TryGetValue(key, out var application)) 209(OtlpApplication, bool) GetOrAddApplication(ApplicationKey key, Resource resource) 213var application = _applications.GetOrAdd(key, _ => 387List<OtlpApplication>? applications = null; 423List<OtlpApplication>? applications = null; 450List<OtlpApplication>? applications = null; 477List<OtlpApplication>? applications = null; 554private static bool MatchApplications(ApplicationKey applicationKey, List<OtlpApplication> applications) 556foreach (var application in applications) 567private static bool MatchApplications(OtlpTrace t, List<OtlpApplication> applications) 593List<OtlpApplication>? applications = null; 630List<OtlpApplication>? applications = null; 667List<OtlpApplication> applications; 677foreach (var app in applications)
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)
290public static OtlpSpan CreateOtlpSpan(OtlpApplication app, OtlpTrace trace, OtlpScope scope, string spanId, string? parentSpanId, DateTime startDate,
Aspire.Dashboard.Tests (25)
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\MetricsTests.cs (1)
1111var applications = Assert.Single(repository.GetApplications());
TelemetryRepositoryTests\OtlpSpanTests.cs (1)
21var app1 = new OtlpApplication("app1", "instance", context);
TelemetryRepositoryTests\TraceTests.cs (1)
1477var application = Assert.Single(repository.GetApplications());
tests\Shared\Telemetry\TelemetryTestHelpers.cs (1)
290public static OtlpSpan CreateOtlpSpan(OtlpApplication app, OtlpTrace trace, OtlpScope scope, string spanId, string? parentSpanId, DateTime startDate,