1 instantiation of CachedResource
Aspire.Dashboard (1)
Otlp\Storage\SqliteTelemetryRepository.Caching.cs (1)
621var 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, 554if (_cachedResourcesById.TryGetValue(group.Key.ResourceId, out var resource)) 566if (_cachedResourcesById.TryGetValue(record.ResourceId, out var resource)) 581if (_cachedResourcesById.TryGetValue(record.ResourceId, out var resource) && 589foreach (var resource in _cachedResourcesById.Values) 603private CachedResource GetOrAddCachedResource(CachedResourceRecord record) 606if (!_cachedResourcesByKey.TryGetValue(key, out var cachedResource)) 618private CachedResource CreateCachedResource(long resourceId, ResourceKey key, bool uninstrumentedPeer) 621var cachedResource = new CachedResource(resourceId, resource); 627private static CachedResourceView AddCachedResourceView(CachedResource resource, long resourceViewId, KeyValuePair<string, string>[] properties) 655private static CachedResourceScope AddCachedScope(CachedResource resource, CachedScope scope, CachedTelemetryType telemetryType) 666private static CachedInstrument AddCachedInstrument(CachedResource resource, CachedResourceScope resourceScope, CachedInstrumentRecord record) 724var resource = _cachedResourcesById[resourceId]; 737return _cachedResourcesById.TryGetValue(resourceId, out var resource) ? resource.Resource : null; 741private IEnumerable<CachedResource> GetCachedResources(ResourceKey key) 745: _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; 523private static void MarkResourcesHaveTraces(SqliteConnection connection, IDbTransaction transaction, HashSet<CachedResource> resources) 533foreach (var resource in resourcesToUpdate) 565var cachedPeerResource = GetOrAddCachedResource(connection, transaction, peerKey, uninstrumentedPeer: true); 1112var cachedPeerResource = GetOrAddCachedResource(writeConnection, transaction, peerKey, uninstrumentedPeer: true);