Skip to content

Commit 835daf9

Browse files
adamintAdam Ratzman
andauthored
Change outgoing request to arrow in trace span (#1684)
* Change outgoing request to arrow in trace span, change uninstrumented peer icon to arrow bounce * change instrumented icon ArrowExportLtr * update icons --------- Co-authored-by: Adam Ratzman <adamratzman@microsoft.com>
1 parent 0695487 commit 835daf9

File tree

2 files changed

+26
-7
lines changed

2 files changed

+26
-7
lines changed

src/Aspire.Dashboard/Components/Pages/TraceDetail.razor

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,33 @@
5656
<FluentDataGrid Class="trace-view-grid" ResizableColumns="true" ItemsProvider="@GetData" TGridItem="SpanWaterfallViewModel" RowClass="@GetRowClass" GridTemplateColumns="2fr 6fr">
5757
<TemplateColumn Title="Name">
5858
<div class="col-long-content" title="@context.GetTooltip()" @onclick="() => OnShowProperties(context)">
59-
<span class="span-name-container" style="@($"margin-left: {(context.Depth - 1) * 15}px; border-left-color: {ColorGenerator.Instance.GetColorHexByKey(GetResourceName(context.Span.Source))};")">
59+
@{
60+
var isServerKind = context.Span.Kind == OtlpSpanKind.Server;
61+
var spanNameContainerStyle = $"margin-left: {(context.Depth - 1) * 15}px;";
62+
if (!isServerKind)
63+
{
64+
spanNameContainerStyle += $"border-left-color: {ColorGenerator.Instance.GetColorHexByKey(GetResourceName(context.Span.Source))}; border-left-width: 5px; border-left-style: solid; padding-left: 5px;";
65+
}
66+
}
67+
<span class="span-name-container" style="@spanNameContainerStyle">
68+
@if (isServerKind)
69+
{
70+
<FluentIcon
71+
Class="server-request-icon"
72+
Color="Color.Custom"
73+
CustomColor="@ColorGenerator.Instance.GetColorHexByKey(GetResourceName(context.Span.Source))"
74+
Icon="Icons.Filled.Size16.Server"/>
75+
}
76+
6077
@if (context.IsError)
6178
{
62-
<FluentIcon Icon="Icons.Filled.Size12.ErrorCircle" Color="Color.Error" Class="trace-tag-icon" />
79+
<FluentIcon Icon="Icons.Filled.Size12.ErrorCircle" Color="Color.Error" Class="trace-tag-icon"/>
6380
}
6481
@GetResourceName(context.Span.Source)
6582
@if (context.HasUninstrumentedPeer)
6683
{
6784
<span class="uninstrumented-peer">
68-
<FluentIcon Style="@($"fill: {ColorGenerator.Instance.GetColorHexByKey(context.UninstrumentedPeer)};")" Icon="Icons.Filled.Size16.ArrowCircleRight" Class="uninstrumented-peer-icon" />
85+
<FluentIcon Style="@($"fill: {ColorGenerator.Instance.GetColorHexByKey(context.UninstrumentedPeer)};")" Icon="Icons.Filled.Size16.ArrowCircleRight" Class="uninstrumented-peer-icon"/>
6986
@context.UninstrumentedPeer
7087
</span>
7188
}

src/Aspire.Dashboard/Components/Pages/TraceDetail.razor.css

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,6 @@
8787
}
8888

8989
::deep .span-name-container {
90-
border-left-width: 5px;
91-
border-left-style: solid;
92-
padding-left: 5px;
9390
line-height: 28px;
9491
}
9592

@@ -132,7 +129,12 @@
132129
}
133130

134131
::deep .uninstrumented-peer {
135-
padding-left: 0.5rem;
132+
padding-left: 0.25rem;
133+
}
134+
135+
::deep .server-request-icon {
136+
margin-right: 3px;
137+
vertical-align: text-bottom;
136138
}
137139

138140
::deep .uninstrumented-peer-icon {

0 commit comments

Comments
 (0)