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)
13
public static readonly OtlpScope Empty = new
OtlpScope
(name: UnknownScopeName, version: string.Empty, attributes: []);
Aspire.Dashboard.Components.Tests (2)
Controls\PlotlyChartTests.cs (1)
64
Parent = new
OtlpScope
("Parent-Name-<b>Bold</b>", string.Empty, []),
tests\Shared\Telemetry\TelemetryTestHelpers.cs (1)
50
return new
OtlpScope
(scope.Name, scope.Version, scope.Attributes.ToKeyValuePairs(context));
Aspire.Dashboard.Tests (1)
tests\Shared\Telemetry\TelemetryTestHelpers.cs (1)
50
return new
OtlpScope
(scope.Name, scope.Version, scope.Attributes.ToKeyValuePairs(context));
40 references to OtlpScope
Aspire.Dashboard (19)
Components\Pages\Metrics.razor.cs (2)
248
public
OtlpScope
? SelectedMeter { get; set; }
273
if (PageViewModel.SelectedTreeItem?.Data is
OtlpScope
meter)
Otlp\Model\OtlpApplication.cs (2)
33
private readonly Dictionary<string,
OtlpScope
> _meters = new();
56
if (!OtlpHelpers.TryGetOrAddScope(_meters, sm.Scope, Context, TelemetryType.Metrics, out
var
scope))
Otlp\Model\OtlpHelpers.cs (4)
448
public static bool TryGetOrAddScope(Dictionary<string,
OtlpScope
> scopes, InstrumentationScope? scope, OtlpContext context, TelemetryType telemetryType, [NotNullWhen(true)] out
OtlpScope
? s)
456
ref
var
scopeRef = ref CollectionsMarshal.GetValueRefOrAddDefault(scopes, name, out _);
462
:
OtlpScope
.Empty;
Otlp\Model\OtlpInstrument.cs (1)
20
public required
OtlpScope
Parent { get; init; }
Otlp\Model\OtlpLogEntry.cs (2)
25
public
OtlpScope
Scope { get; }
28
public OtlpLogEntry(LogRecord record, OtlpApplicationView logApp,
OtlpScope
scope, OtlpContext context)
Otlp\Model\OtlpScope.cs (1)
13
public static readonly
OtlpScope
Empty = new OtlpScope(name: UnknownScopeName, version: string.Empty, attributes: []);
Otlp\Model\OtlpSpan.cs (2)
42
public
OtlpScope
Scope { get; }
67
public OtlpSpan(OtlpApplicationView applicationView, OtlpTrace trace,
OtlpScope
scope)
Otlp\Storage\TelemetryRepository.cs (5)
43
private readonly Dictionary<string,
OtlpScope
> _logScopes = new();
50
private readonly Dictionary<string,
OtlpScope
> _traceScopes = new();
339
if (!OtlpHelpers.TryGetOrAddScope(_logScopes, sl.Scope, _otlpContext, TelemetryType.Logs, out
var
scope))
921
if (!OtlpHelpers.TryGetOrAddScope(_traceScopes, scopeSpan.Scope, _otlpContext, TelemetryType.Traces, out
var
scope))
1168
private static OtlpSpan CreateSpan(OtlpApplicationView applicationView, Span span, OtlpTrace trace,
OtlpScope
scope, OtlpContext context)
Aspire.Dashboard.Components.Tests (4)
Pages\MetricsTests.cs (2)
232
Assert.Single(items1, i => i.Instance.Data as
OtlpScope
== instrument.Parent);
277
Assert.Single(items2, i => i.Instance.Data as
OtlpScope
== instrument.Parent);
tests\Shared\Telemetry\TelemetryTestHelpers.cs (2)
47
public static
OtlpScope
CreateOtlpScope(OtlpContext context, string? name = null, IEnumerable<KeyValuePair<string, string>>? attributes = null)
304
public static OtlpSpan CreateOtlpSpan(OtlpApplication app, OtlpTrace trace,
OtlpScope
scope, string spanId, string? parentSpanId, DateTime startDate,
Aspire.Dashboard.Tests (17)
Model\SpanWaterfallViewModelTests.cs (5)
24
var
scope = TelemetryTestHelpers.CreateOtlpScope(context);
54
var
scope = TelemetryTestHelpers.CreateOtlpScope(context);
87
var
scope = TelemetryTestHelpers.CreateOtlpScope(context);
127
var
scope = TelemetryTestHelpers.CreateOtlpScope(context);
149
var
scope = TelemetryTestHelpers.CreateOtlpScope(context);
Model\TraceHelpersTests.cs (5)
21
var
scope = TelemetryTestHelpers.CreateOtlpScope(context);
43
var
scope = TelemetryTestHelpers.CreateOtlpScope(context);
70
var
scope = TelemetryTestHelpers.CreateOtlpScope(context);
98
var
scope = TelemetryTestHelpers.CreateOtlpScope(context);
132
var
scope = TelemetryTestHelpers.CreateOtlpScope(context);
TelemetryRepositoryTests\LogTests.cs (1)
183
Assert.Same(
OtlpScope
.Empty, l.Scope);
TelemetryRepositoryTests\MetricsTests.cs (1)
1240
Assert.Same(
OtlpScope
.Empty, instrument.Parent);
TelemetryRepositoryTests\OtlpSpanTests.cs (1)
23
var
scope = TelemetryTestHelpers.CreateOtlpScope(context);
TelemetryRepositoryTests\TraceTests.cs (2)
451
Assert.Same(
OtlpScope
.Empty, trace.FirstSpan.Scope);
458
Assert.Same(
OtlpScope
.Empty, trace.FirstSpan.Scope);
tests\Shared\Telemetry\TelemetryTestHelpers.cs (2)
47
public static
OtlpScope
CreateOtlpScope(OtlpContext context, string? name = null, IEnumerable<KeyValuePair<string, string>>? attributes = null)
304
public static OtlpSpan CreateOtlpSpan(OtlpApplication app, OtlpTrace trace,
OtlpScope
scope, string spanId, string? parentSpanId, DateTime startDate,