5 instantiations of OtlpScope
Aspire.Dashboard (2)
Otlp\Model\OtlpHelpers.cs (1)
473? new OtlpScope(scope.Name, scope.Version, scope.Attributes.ToKeyValuePairs(context))
Otlp\Model\OtlpScope.cs (1)
13public static readonly OtlpScope Empty = new OtlpScope(name: UnknownScopeName, version: string.Empty, attributes: []);
Aspire.Dashboard.Components.Tests (2)
Controls\PlotlyChartTests.cs (1)
64Parent = new OtlpScope("Parent-Name-<b>Bold</b>", string.Empty, []),
tests\Shared\Telemetry\TelemetryTestHelpers.cs (1)
50return new OtlpScope(scope.Name, scope.Version, scope.Attributes.ToKeyValuePairs(context));
Aspire.Dashboard.Tests (1)
tests\Shared\Telemetry\TelemetryTestHelpers.cs (1)
50return new OtlpScope(scope.Name, scope.Version, scope.Attributes.ToKeyValuePairs(context));
42 references to OtlpScope
Aspire.Dashboard (19)
Components\Pages\Metrics.razor.cs (2)
258public OtlpScope? SelectedMeter { get; set; } 283if (PageViewModel.SelectedTreeItem?.Data is OtlpScope meter)
Otlp\Model\OtlpHelpers.cs (4)
460public static bool TryGetOrAddScope(Dictionary<string, OtlpScope> scopes, InstrumentationScope? scope, OtlpContext context, TelemetryType telemetryType, [NotNullWhen(true)] out OtlpScope? s) 468ref var scopeRef = ref CollectionsMarshal.GetValueRefOrAddDefault(scopes, name, out _); 474: OtlpScope.Empty;
Otlp\Model\OtlpInstrument.cs (1)
20public required OtlpScope Parent { get; init; }
Otlp\Model\OtlpLogEntry.cs (2)
25public OtlpScope Scope { get; } 30public OtlpLogEntry(LogRecord record, OtlpResourceView resourceView, OtlpScope scope, OtlpContext context)
Otlp\Model\OtlpResource.cs (2)
33private readonly Dictionary<string, OtlpScope> _meters = new(); 56if (!OtlpHelpers.TryGetOrAddScope(_meters, sm.Scope, Context, TelemetryType.Metrics, out var scope))
Otlp\Model\OtlpScope.cs (1)
13public static readonly OtlpScope Empty = new OtlpScope(name: UnknownScopeName, version: string.Empty, attributes: []);
Otlp\Model\OtlpSpan.cs (2)
42public OtlpScope Scope { get; } 73public OtlpSpan(OtlpResourceView resourceView, OtlpTrace trace, OtlpScope scope)
Otlp\Storage\TelemetryRepository.cs (5)
43private readonly Dictionary<string, OtlpScope> _logScopes = new(); 50private readonly Dictionary<string, OtlpScope> _traceScopes = new(); 339if (!OtlpHelpers.TryGetOrAddScope(_logScopes, sl.Scope, _otlpContext, TelemetryType.Logs, out var scope)) 952if (!OtlpHelpers.TryGetOrAddScope(_traceScopes, scopeSpan.Scope, _otlpContext, TelemetryType.Traces, out var scope)) 1212private static OtlpSpan CreateSpan(OtlpResourceView resourceView, Span span, OtlpTrace trace, OtlpScope scope, OtlpContext context)
Aspire.Dashboard.Components.Tests (4)
Pages\MetricsTests.cs (2)
232Assert.Single(items1, i => i.Instance.Data as OtlpScope == instrument.Parent); 277Assert.Single(items2, i => i.Instance.Data as OtlpScope == instrument.Parent);
tests\Shared\Telemetry\TelemetryTestHelpers.cs (2)
47public static OtlpScope CreateOtlpScope(OtlpContext context, string? name = null, IEnumerable<KeyValuePair<string, string>>? attributes = null) 306public static OtlpSpan CreateOtlpSpan(OtlpResource resource, OtlpTrace trace, OtlpScope scope, string spanId, string? parentSpanId, DateTime startDate,
Aspire.Dashboard.Tests (19)
Model\SpanWaterfallViewModelTests.cs (7)
27var scope = TelemetryTestHelpers.CreateOtlpScope(context); 58var scope = TelemetryTestHelpers.CreateOtlpScope(context); 87var scope = TelemetryTestHelpers.CreateOtlpScope(context); 120var scope = TelemetryTestHelpers.CreateOtlpScope(context); 181var scope = TelemetryTestHelpers.CreateOtlpScope(context, name: scopeName); 231var scope = TelemetryTestHelpers.CreateOtlpScope(context); 253var scope = TelemetryTestHelpers.CreateOtlpScope(context);
Model\TraceHelpersTests.cs (5)
21var scope = TelemetryTestHelpers.CreateOtlpScope(context); 43var scope = TelemetryTestHelpers.CreateOtlpScope(context); 70var scope = TelemetryTestHelpers.CreateOtlpScope(context); 98var scope = TelemetryTestHelpers.CreateOtlpScope(context); 132var scope = TelemetryTestHelpers.CreateOtlpScope(context);
TelemetryRepositoryTests\LogTests.cs (1)
183Assert.Same(OtlpScope.Empty, l.Scope);
TelemetryRepositoryTests\MetricsTests.cs (1)
1240Assert.Same(OtlpScope.Empty, instrument.Parent);
TelemetryRepositoryTests\OtlpSpanTests.cs (1)
23var scope = TelemetryTestHelpers.CreateOtlpScope(context);
TelemetryRepositoryTests\TraceTests.cs (2)
451Assert.Same(OtlpScope.Empty, trace.FirstSpan.Scope); 458Assert.Same(OtlpScope.Empty, trace.FirstSpan.Scope);
tests\Shared\Telemetry\TelemetryTestHelpers.cs (2)
47public static OtlpScope CreateOtlpScope(OtlpContext context, string? name = null, IEnumerable<KeyValuePair<string, string>>? attributes = null) 306public static OtlpSpan CreateOtlpSpan(OtlpResource resource, OtlpTrace trace, OtlpScope scope, string spanId, string? parentSpanId, DateTime startDate,