47 references to OtlpSpanKind
Aspire.Dashboard (23)
Components_Pages_TraceDetail_razor.g.cs (2)
1441var isServerOrConsumer = context.Span.Kind == OtlpSpanKind.Server || context.Span.Kind == OtlpSpanKind.Consumer;
Model\Otlp\SpanWaterfallViewModel.cs (2)
162var isUninstrumentedPeer = hasPeerService && span.Kind is OtlpSpanKind.Client or OtlpSpanKind.Producer && !span.GetChildSpans().Any();
Model\TraceHelpers.cs (3)
132case OtlpSpanKind.Server: 134case OtlpSpanKind.Consumer: 143case OtlpSpanKind.Producer:
Otlp\Model\OtlpSpan.cs (6)
32public required OtlpSpanKind Kind { get; init; } 150if (childSpan.Source.ResourceKey != Source.ResourceKey && childSpan.Kind is OtlpSpanKind.Server or OtlpSpanKind.Consumer) 174if (span.Kind is OtlpSpanKind.Client or OtlpSpanKind.Producer or OtlpSpanKind.Consumer)
Otlp\Storage\TelemetryRepository.cs (10)
950internal static OtlpSpanKind ConvertSpanKind(SpanKind? kind) 956SpanKind.Unspecified => OtlpSpanKind.Internal, 957SpanKind.Internal => OtlpSpanKind.Internal, 958SpanKind.Client => OtlpSpanKind.Client, 959SpanKind.Server => OtlpSpanKind.Server, 960SpanKind.Producer => OtlpSpanKind.Producer, 961SpanKind.Consumer => OtlpSpanKind.Consumer, 962_ => OtlpSpanKind.Unspecified 1146var hasUninstrumentedPeer = hasPeerService && span.Kind is OtlpSpanKind.Client or OtlpSpanKind.Producer && !span.GetChildSpans().Any();
Aspire.Dashboard.Components.Tests (2)
tests\Shared\Telemetry\TelemetryTestHelpers.cs (2)
307KeyValuePair<string, string>[]? attributes = null, OtlpSpanStatusCode? statusCode = null, string? statusMessage = null, OtlpSpanKind kind = OtlpSpanKind.Unspecified,
Aspire.Dashboard.Tests (22)
Model\SpanWaterfallViewModelTests.cs (4)
88trace.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")])); 89trace.AddSpan(TelemetryTestHelpers.CreateOtlpSpan(app2, trace, scope, spanId: "2", parentSpanId: null, startDate: new DateTime(2001, 2, 1, 1, 1, 2, DateTimeKind.Utc), kind: OtlpSpanKind.Client)); 138kind: OtlpSpanKind.Client); 198kind: OtlpSpanKind.Client);
TelemetryRepositoryTests\OtlpSpanTests.cs (7)
96kind: OtlpSpanKind.Client, uninstrumentedPeer: app2); 116kind: OtlpSpanKind.Client); 118kind: OtlpSpanKind.Server); 137OtlpSpanKind.Client, 148OtlpSpanKind.Client, 159OtlpSpanKind.Server, 170public void GetDisplaySummary_SpanData_ReturnExpectedDisplaySummary(string expectedDisplaySummary, string spanName, OtlpSpanKind kind, KeyValuePair<string, string>[] attributes)
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)] 33public void ConvertSpanKind(OtlpSpanKind expected, Span.Types.SpanKind value) 35var result = TelemetryRepository.ConvertSpanKind(value);
tests\Shared\Telemetry\TelemetryTestHelpers.cs (2)
307KeyValuePair<string, string>[]? attributes = null, OtlpSpanStatusCode? statusCode = null, string? statusMessage = null, OtlpSpanKind kind = OtlpSpanKind.Unspecified,