34 references to OtlpSpanKind
Aspire.Dashboard (18)
Components\Pages\TraceDetail.razor.cs (2)
141
case
OtlpSpanKind
.Server:
143
case
OtlpSpanKind
.Consumer:
Model\Otlp\SpanWaterfallViewModel.cs (2)
148
var isUninstrumentedPeer = hasPeerService && span.Kind is
OtlpSpanKind
.Client or
OtlpSpanKind
.Producer && !span.GetChildSpans().Any();
Otlp\Model\OtlpSpan.cs (4)
31
public required
OtlpSpanKind
Kind { get; init; }
136
if (span.Kind is
OtlpSpanKind
.Client or
OtlpSpanKind
.Producer or
OtlpSpanKind
.Consumer)
Otlp\Storage\TelemetryRepository.cs (10)
892
internal static
OtlpSpanKind
ConvertSpanKind(SpanKind? kind)
898
SpanKind.Unspecified =>
OtlpSpanKind
.Internal,
899
SpanKind.Internal =>
OtlpSpanKind
.Internal,
900
SpanKind.Client =>
OtlpSpanKind
.Client,
901
SpanKind.Server =>
OtlpSpanKind
.Server,
902
SpanKind.Producer =>
OtlpSpanKind
.Producer,
903
SpanKind.Consumer =>
OtlpSpanKind
.Consumer,
904
_ =>
OtlpSpanKind
.Unspecified
1074
var hasUninstrumentedPeer = hasPeerService && span.Kind is
OtlpSpanKind
.Client or
OtlpSpanKind
.Producer && !span.GetChildSpans().Any();
Aspire.Dashboard.Components.Tests (2)
tests\Shared\Telemetry\TelemetryTestHelpers.cs (2)
305
KeyValuePair<string, string>[]? attributes = null, OtlpSpanStatusCode? statusCode = null, string? statusMessage = null,
OtlpSpanKind
kind =
OtlpSpanKind
.Unspecified,
Aspire.Dashboard.Tests (14)
Model\SpanWaterfallViewModelTests.cs (3)
55
trace.AddSpan(TelemetryTestHelpers.CreateOtlpSpan(app1, trace, scope, spanId: "1", parentSpanId: null, startDate: new DateTime(2001, 1, 1, 1, 1, 2, DateTimeKind.Utc), kind:
OtlpSpanKind
.Client, attributes: [KeyValuePair.Create("http.url", "http://localhost:59267/6eed7c2dedc14419901b813e8fe87a86/getScriptTag"), KeyValuePair.Create("server.address", "localhost")]));
56
trace.AddSpan(TelemetryTestHelpers.CreateOtlpSpan(app2, trace, scope, spanId: "2", parentSpanId: null, startDate: new DateTime(2001, 2, 1, 1, 1, 2, DateTimeKind.Utc), kind:
OtlpSpanKind
.Client));
105
kind:
OtlpSpanKind
.Client);
TelemetryRepositoryTests\TraceTests.cs (9)
26
[InlineData(
OtlpSpanKind
.Server, Span.Types.SpanKind.Server)]
27
[InlineData(
OtlpSpanKind
.Client, Span.Types.SpanKind.Client)]
28
[InlineData(
OtlpSpanKind
.Consumer, Span.Types.SpanKind.Consumer)]
29
[InlineData(
OtlpSpanKind
.Producer, Span.Types.SpanKind.Producer)]
30
[InlineData(
OtlpSpanKind
.Internal, Span.Types.SpanKind.Internal)]
31
[InlineData(
OtlpSpanKind
.Internal, Span.Types.SpanKind.Unspecified)]
32
[InlineData(
OtlpSpanKind
.Unspecified, (Span.Types.SpanKind)1000)]
33
public void ConvertSpanKind(
OtlpSpanKind
expected, Span.Types.SpanKind value)
35
var
result = TelemetryRepository.ConvertSpanKind(value);
tests\Shared\Telemetry\TelemetryTestHelpers.cs (2)
305
KeyValuePair<string, string>[]? attributes = null, OtlpSpanStatusCode? statusCode = null, string? statusMessage = null,
OtlpSpanKind
kind =
OtlpSpanKind
.Unspecified,