1 instantiation of CachedResource
Aspire.Dashboard (1)
Otlp\Storage\SqliteTelemetryRepository.Caching.cs (1)
619var cachedResource = new CachedResource(resourceId, resource);
37 references to CachedResource
Aspire.Dashboard (37)
Otlp\Storage\SqliteTelemetryRepository.Caching.cs (25)
23private readonly Dictionary<ResourceKey, CachedResource> _cachedResourcesByKey = []; 24private readonly Dictionary<long, CachedResource> _cachedResourcesById = []; 29private CachedResource GetOrAddCachedResource( 37CachedResource cachedResource; 38if (_cachedResourcesByKey.TryGetValue(resourceKey, out var existingResource)) 102CachedResource resource, 183CachedResource resource, 264CachedResource resource, 339CachedResource resource, 425CachedResource resource, 552if (_cachedResourcesById.TryGetValue(group.Key.ResourceId, out var resource)) 564if (_cachedResourcesById.TryGetValue(record.ResourceId, out var resource)) 579if (_cachedResourcesById.TryGetValue(record.ResourceId, out var resource) && 587foreach (var resource in _cachedResourcesById.Values) 601private CachedResource GetOrAddCachedResource(CachedResourceRecord record) 604if (!_cachedResourcesByKey.TryGetValue(key, out var cachedResource)) 616private CachedResource CreateCachedResource(long resourceId, ResourceKey key, bool uninstrumentedPeer) 619var cachedResource = new CachedResource(resourceId, resource); 625private static CachedResourceView AddCachedResourceView(CachedResource resource, long resourceViewId, KeyValuePair<string, string>[] properties) 653private static CachedResourceScope AddCachedScope(CachedResource resource, CachedScope scope, CachedTelemetryType telemetryType) 664private static CachedInstrument AddCachedInstrument(CachedResource resource, CachedResourceScope resourceScope, CachedInstrumentRecord record) 722var resource = _cachedResourcesById[resourceId]; 735return _cachedResourcesById.TryGetValue(resourceId, out var resource) ? resource.Resource : null; 739private IEnumerable<CachedResource> GetCachedResources(ResourceKey key) 743: _cachedResourcesByKey.TryGetValue(key, out var resource) ? [resource] : [];
Otlp\Storage\SqliteTelemetryRepository.Logs.cs (4)
32var resourcesWithLogs = new HashSet<CachedResource>(); 36CachedResource cachedResource; 167private static void MarkResourcesHaveLogs(SqliteConnection connection, IDbTransaction transaction, HashSet<CachedResource> resources) 177foreach (var resource in resourcesToUpdate)
Otlp\Storage\SqliteTelemetryRepository.Metrics.Writes.cs (2)
43CachedResource cachedResource; 112CachedResource cachedResource,
Otlp\Storage\SqliteTelemetryRepository.Traces.Writes.cs (6)
48var resourcesWithTraces = new HashSet<CachedResource>(); 53CachedResource cachedResource; 524private static void MarkResourcesHaveTraces(SqliteConnection connection, IDbTransaction transaction, HashSet<CachedResource> resources) 534foreach (var resource in resourcesToUpdate) 566var cachedPeerResource = GetOrAddCachedResource(connection, transaction, peerKey, uninstrumentedPeer: true); 1113var cachedPeerResource = GetOrAddCachedResource(writeConnection, transaction, peerKey, uninstrumentedPeer: true);