52 references to OtlpSpanKind
Aspire.Dashboard (25)
Model\Otlp\SpanWaterfallViewModel.cs (2)
104
var isUninstrumentedPeer = hasPeerService && span.Kind is
OtlpSpanKind
.Client or
OtlpSpanKind
.Producer && !span.GetChildSpans().Any();
Model\TraceHelpers.cs (3)
133
case
OtlpSpanKind
.Server:
135
case
OtlpSpanKind
.Consumer:
144
case
OtlpSpanKind
.Producer:
Otlp\Model\OtlpHelpers.cs (8)
30
internal static
OtlpSpanKind
ConvertSpanKind(SpanKind? kind)
36
SpanKind.Unspecified =>
OtlpSpanKind
.Internal,
37
SpanKind.Internal =>
OtlpSpanKind
.Internal,
38
SpanKind.Client =>
OtlpSpanKind
.Client,
39
SpanKind.Server =>
OtlpSpanKind
.Server,
40
SpanKind.Producer =>
OtlpSpanKind
.Producer,
41
SpanKind.Consumer =>
OtlpSpanKind
.Consumer,
42
_ =>
OtlpSpanKind
.Unspecified
Otlp\Model\OtlpSpan.cs (6)
34
public required
OtlpSpanKind
Kind { get; init; }
152
if (childSpan.Source.ResourceKey != Source.ResourceKey && childSpan.Kind is
OtlpSpanKind
.Server or
OtlpSpanKind
.Consumer)
176
if (span.Kind is
OtlpSpanKind
.Client or
OtlpSpanKind
.Producer or
OtlpSpanKind
.Consumer)
Otlp\Storage\SqliteTelemetryRepository.Traces.Reads.cs (1)
793
Kind = (
OtlpSpanKind
)record.Kind,
Otlp\Storage\SqliteTelemetryRepository.Traces.Writes.cs (5)
562
if (hasPeerAddress && span.Kind is
OtlpSpanKind
.Client or
OtlpSpanKind
.Producer && !hasChildren)
1105
if ((
OtlpSpanKind
)span.Kind is
OtlpSpanKind
.Client or
OtlpSpanKind
.Producer &&
Aspire.Dashboard.Components.Tests (2)
tests\Shared\Telemetry\TelemetryTestHelpers.cs (2)
268
KeyValuePair<string, string>[]? attributes = null, OtlpSpanStatusCode? statusCode = null, string? statusMessage = null,
OtlpSpanKind
kind =
OtlpSpanKind
.Unspecified,
Aspire.Dashboard.Tests (25)
Integration\OtlpHttpJsonTests.cs (1)
544
Assert.Equal(Aspire.Dashboard.Otlp.Model.
OtlpSpanKind
.Server, span.Kind);
Model\SpanWaterfallViewModelTests.cs (3)
84
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/getScriptTag"), KeyValuePair.Create("server.address", "localhost")]));
85
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));
117
kind:
OtlpSpanKind
.Client,
Model\TelemetryExportServiceTests.cs (3)
328
Assert.Equal((int)
OtlpSpanKind
.Server, span.Kind);
495
kind:
OtlpSpanKind
.Client);
503
kind:
OtlpSpanKind
.Server);
TelemetryRepositoryTests\OtlpSpanTests.cs (7)
96
kind:
OtlpSpanKind
.Client, uninstrumentedPeer: app2);
116
kind:
OtlpSpanKind
.Client);
118
kind:
OtlpSpanKind
.Server);
137
OtlpSpanKind
.Client,
148
OtlpSpanKind
.Client,
159
OtlpSpanKind
.Server,
170
public void GetDisplaySummary_SpanData_ReturnExpectedDisplaySummary(string expectedDisplaySummary, string spanName,
OtlpSpanKind
kind, KeyValuePair<string, string>[] attributes)
TelemetryRepositoryTests\TraceTests.cs (9)
27
[InlineData(
OtlpSpanKind
.Server, Span.Types.SpanKind.Server)]
28
[InlineData(
OtlpSpanKind
.Client, Span.Types.SpanKind.Client)]
29
[InlineData(
OtlpSpanKind
.Consumer, Span.Types.SpanKind.Consumer)]
30
[InlineData(
OtlpSpanKind
.Producer, Span.Types.SpanKind.Producer)]
31
[InlineData(
OtlpSpanKind
.Internal, Span.Types.SpanKind.Internal)]
32
[InlineData(
OtlpSpanKind
.Internal, Span.Types.SpanKind.Unspecified)]
33
[InlineData(
OtlpSpanKind
.Unspecified, (Span.Types.SpanKind)1000)]
34
public void ConvertSpanKind(
OtlpSpanKind
expected, Span.Types.SpanKind value)
36
var
result = OtlpHelpers.ConvertSpanKind(value);
tests\Shared\Telemetry\TelemetryTestHelpers.cs (2)
268
KeyValuePair<string, string>[]? attributes = null, OtlpSpanStatusCode? statusCode = null, string? statusMessage = null,
OtlpSpanKind
kind =
OtlpSpanKind
.Unspecified,