1 instantiation of CachedResource
Aspire.Dashboard (1)
Otlp\Storage\SqliteTelemetryRepository.Caching.cs (1)
623var 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, 340CachedResource resource, 427CachedResource resource, 556if (_cachedResourcesById.TryGetValue(group.Key.ResourceId, out var resource)) 568if (_cachedResourcesById.TryGetValue(record.ResourceId, out var resource)) 583if (_cachedResourcesById.TryGetValue(record.ResourceId, out var resource) && 591foreach (var resource in _cachedResourcesById.Values) 605private CachedResource GetOrAddCachedResource(CachedResourceRecord record) 608if (!_cachedResourcesByKey.TryGetValue(key, out var cachedResource)) 620private CachedResource CreateCachedResource(long resourceId, ResourceKey key, bool uninstrumentedPeer) 623var cachedResource = new CachedResource(resourceId, resource); 629private static CachedResourceView AddCachedResourceView(CachedResource resource, long resourceViewId, KeyValuePair<string, string>[] properties) 657private static CachedResourceScope AddCachedScope(CachedResource resource, CachedScope scope, CachedTelemetryType telemetryType) 668private static CachedInstrument AddCachedInstrument(CachedResource resource, CachedResourceScope resourceScope, CachedInstrumentRecord record) 727var resource = _cachedResourcesById[resourceId]; 740return _cachedResourcesById.TryGetValue(resourceId, out var resource) ? resource.Resource : null; 744private IEnumerable<CachedResource> GetCachedResources(ResourceKey key) 748: _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)
45CachedResource cachedResource; 131CachedResource 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);