5 instantiations of OtlpScope
Aspire.Dashboard (2)
Otlp\Model\OtlpHelpers.cs (1)
461? 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));
40 references to OtlpScope
Aspire.Dashboard (19)
Components\Pages\Metrics.razor.cs (2)
248public OtlpScope? SelectedMeter { get; set; } 273if (PageViewModel.SelectedTreeItem?.Data is OtlpScope meter)
Otlp\Model\OtlpApplication.cs (2)
33private readonly Dictionary<string, OtlpScope> _meters = new(); 56if (!OtlpHelpers.TryGetOrAddScope(_meters, sm.Scope, Context, TelemetryType.Metrics, out var scope))
Otlp\Model\OtlpHelpers.cs (4)
448public static bool TryGetOrAddScope(Dictionary<string, OtlpScope> scopes, InstrumentationScope? scope, OtlpContext context, TelemetryType telemetryType, [NotNullWhen(true)] out OtlpScope? s) 456ref var scopeRef = ref CollectionsMarshal.GetValueRefOrAddDefault(scopes, name, out _); 462: OtlpScope.Empty;
Otlp\Model\OtlpInstrument.cs (1)
20public required OtlpScope Parent { get; init; }
Otlp\Model\OtlpLogEntry.cs (2)
25public OtlpScope Scope { get; } 28public OtlpLogEntry(LogRecord record, OtlpApplicationView logApp, OtlpScope scope, OtlpContext context)
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; } 67public OtlpSpan(OtlpApplicationView applicationView, 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)) 921if (!OtlpHelpers.TryGetOrAddScope(_traceScopes, scopeSpan.Scope, _otlpContext, TelemetryType.Traces, out var scope)) 1168private static OtlpSpan CreateSpan(OtlpApplicationView applicationView, 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) 304public static OtlpSpan CreateOtlpSpan(OtlpApplication app, OtlpTrace trace, OtlpScope scope, string spanId, string? parentSpanId, DateTime startDate,
Aspire.Dashboard.Tests (17)
Model\SpanWaterfallViewModelTests.cs (5)
24var scope = TelemetryTestHelpers.CreateOtlpScope(context); 54var scope = TelemetryTestHelpers.CreateOtlpScope(context); 87var scope = TelemetryTestHelpers.CreateOtlpScope(context); 127var scope = TelemetryTestHelpers.CreateOtlpScope(context); 149var 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) 304public static OtlpSpan CreateOtlpSpan(OtlpApplication app, OtlpTrace trace, OtlpScope scope, string spanId, string? parentSpanId, DateTime startDate,