Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion src/Aspire.Dashboard/Components/Pages/TraceDetail.razor
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,22 @@
@if (context.HasUninstrumentedPeer)
{
<span class="uninstrumented-peer">
<FluentIcon Style="@($"fill: {ColorGenerator.Instance.GetColorHexByKey(context.UninstrumentedPeer)};")" Icon="Icons.Filled.Size16.ArrowCircleRight" Class="uninstrumented-peer-icon"/>
@{
Icon icon;
if (context.Span.Attributes.HasKey("db.system"))
{
icon = new Icons.Filled.Size16.Database();
}
else
{
// Everything else.
icon = new Icons.Filled.Size16.ArrowCircleRight();
}
}
<FluentIcon
Style="@($"fill: {ColorGenerator.Instance.GetColorHexByKey(context.UninstrumentedPeer)};")"
Value="icon"
Class="uninstrumented-peer-icon"/>
@context.UninstrumentedPeer
</span>
}
Expand Down
12 changes: 12 additions & 0 deletions src/Aspire.Dashboard/Otlp/Model/OtlpHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,18 @@ private static void CopyKeyValues(RepeatedField<KeyValue> attributes, KeyValuePa
return null;
}

public static bool HasKey(this KeyValuePair<string, string>[] values, string name)
{
for (var i = 0; i < values.Length; i++)
{
if (values[i].Key == name)
{
return true;
}
}
return false;
}

public static string ConcatProperties(this KeyValuePair<string, string>[] properties)
{
StringBuilder sb = new();
Expand Down