33 references to TelemetryRepositoryLimits
Aspire.Dashboard (17)
Otlp\Model\OtlpHelpers.cs (2)
526
if (scopes.Count >=
TelemetryRepositoryLimits
.MaxScopeCount)
528
throw new InvalidOperationException($"Scope limit of {
TelemetryRepositoryLimits
.MaxScopeCount} reached for {telemetryType}. Scope '{name}' will not be added.");
Otlp\Model\OtlpResource.cs (2)
86
if (_resourceViews.Count >=
TelemetryRepositoryLimits
.MaxResourceViewCount)
88
throw new InvalidOperationException($"Resource view limit of {
TelemetryRepositoryLimits
.MaxResourceViewCount} reached.");
Otlp\Storage\SqliteTelemetryRepository.Caching.cs (7)
147
if (resourceViewCount >=
TelemetryRepositoryLimits
.MaxResourceViewCount)
149
throw new InvalidOperationException($"Resource view limit of {
TelemetryRepositoryLimits
.MaxResourceViewCount} reached.");
226
if (scopeCount >=
TelemetryRepositoryLimits
.MaxScopeCount)
228
throw new InvalidOperationException($"Scope limit of {
TelemetryRepositoryLimits
.MaxScopeCount} reached. Scope '{incomingScope.Name}' will not be added.");
291
if (instrumentCount >=
TelemetryRepositoryLimits
.MaxInstrumentCount)
293
throw new InvalidOperationException($"Instrument limit of {
TelemetryRepositoryLimits
.MaxInstrumentCount} reached. Instrument '{metric.Name}' will not be added.");
363
var availableCount = Math.Max(0,
TelemetryRepositoryLimits
.MaxInstrumentCount - instrumentCount);
Otlp\Storage\SqliteTelemetryRepository.Metrics.Writes.cs (2)
509
if (dimensionCount >=
TelemetryRepositoryLimits
.MaxDimensionCount)
511
throw new InvalidOperationException($"Dimension limit of {
TelemetryRepositoryLimits
.MaxDimensionCount} reached.");
Otlp\Storage\TelemetryRepositoryLimits.cs (4)
29
if (_values.Count + newKeyCount >
TelemetryRepositoryLimits
.MaxKnownAttributeValueCount)
31
throw new InvalidOperationException($"Known attribute key limit of {
TelemetryRepositoryLimits
.MaxKnownAttributeValueCount} reached.");
38
values.Count >=
TelemetryRepositoryLimits
.MaxKnownAttributeValuesPerKey)
40
throw new InvalidOperationException($"Known attribute value limit of {
TelemetryRepositoryLimits
.MaxKnownAttributeValuesPerKey} reached for key '{key}'.");
Aspire.Dashboard.Tests (16)
TelemetryRepositoryTests\SqliteTelemetryPersistenceTests.cs (2)
760
SELECT value + 1 FROM numbers WHERE value < {
TelemetryRepositoryLimits
.MaxResourceViewCount - 1}
769
Assert.Equal((long)
TelemetryRepositoryLimits
.MaxResourceViewCount, command.ExecuteScalar());
TelemetryRepositoryTests\TelemetryLimitTests.cs (10)
128
for (var i = 0; i <
TelemetryRepositoryLimits
.MaxInstrumentCount; i++)
158
Assert.Equal(
TelemetryRepositoryLimits
.MaxInstrumentCount, instruments.Count);
182
Assert.Equal(
TelemetryRepositoryLimits
.MaxInstrumentCount, instruments.Count);
188
var attributeCount =
TelemetryRepositoryLimits
.MaxKnownAttributeValueCount + 1;
221
var metrics = Enumerable.Range(0,
TelemetryRepositoryLimits
.MaxKnownAttributeValuesPerKey + 1)
245
Assert.Equal(
TelemetryRepositoryLimits
.MaxKnownAttributeValuesPerKey, addContext.SuccessCount);
248
$"Known attribute value limit of {
TelemetryRepositoryLimits
.MaxKnownAttributeValuesPerKey} reached for key 'key'.",
442
for (var i = 0; i <
TelemetryRepositoryLimits
.MaxScopeCount; i++)
489
for (var i = 0; i <
TelemetryRepositoryLimits
.MaxScopeCount; i++)
534
for (var i = 0; i <
TelemetryRepositoryLimits
.MaxScopeCount; i++)
tests\Shared\Telemetry\InMemoryTelemetryRepository.cs (4)
1952
else if (resourceEntry.Instruments.Count <
TelemetryRepositoryLimits
.MaxInstrumentCount)
1974
throw new InvalidOperationException($"Instrument limit of {
TelemetryRepositoryLimits
.MaxInstrumentCount} reached. Instrument '{metric.Name}' will not be added.");
2682
if (Dimensions.Count >=
TelemetryRepositoryLimits
.MaxDimensionCount)
2684
throw new InvalidOperationException($"Dimension limit of {
TelemetryRepositoryLimits
.MaxDimensionCount} reached for instrument '{Summary.Name}'.");