4 writes to Attributes
Aspire.Dashboard (2)
Otlp\Model\OtlpSpan.cs (1)
94
Attributes
= item.Attributes,
Otlp\Storage\TelemetryRepository.cs (1)
1268
Attributes
= span.Attributes.ToKeyValuePairs(context),
Aspire.Dashboard.Components.Tests (1)
tests\Shared\Telemetry\TelemetryTestHelpers.cs (1)
312
Attributes
= attributes ?? [],
Aspire.Dashboard.Tests (1)
tests\Shared\Telemetry\TelemetryTestHelpers.cs (1)
312
Attributes
= attributes ?? [],
41 references to Attributes
Aspire.Dashboard (40)
Components\Controls\SpanDetails.razor.cs (1)
119
if (GenAIHelpers.IsGenAISpan(ViewModel.Span.
Attributes
))
Components\Pages\TraceDetail.razor.cs (1)
547
return GenAIHelpers.IsGenAISpan(spanViewModel.Span.
Attributes
);
Components_Pages_TraceDetail_razor.g.cs (2)
1802
if (context.Span.
Attributes
.HasKey("db.system"))
1806
else if (context.Span.
Attributes
.HasKey("messaging.system"))
Model\Assistant\AIHelpers.cs (3)
56
attributes = s.
Attributes
135
if (resolver.TryResolvePeer(span.
Attributes
, out var name, out _))
142
return span.
Attributes
.GetPeerAddress();
Model\GenAI\GenAIVisualizerDialogViewModel.cs (8)
67
: OtlpHelpers.GetPeerAddress(spanDetailsViewModel.Span.
Attributes
) ?? UnknownPeerName
70
viewModel.ModelName = viewModel.Span.
Attributes
.GetValue(GenAIHelpers.GenAIResponseModel);
71
viewModel.InputTokens = viewModel.Span.
Attributes
.GetValueAsInteger(GenAIHelpers.GenAIUsageInputTokens);
72
viewModel.OutputTokens = viewModel.Span.
Attributes
.GetValueAsInteger(GenAIHelpers.GenAIUsageOutputTokens);
108
viewModel.Span.
Attributes
.GetValue("error.type"),
182
var systemInstructions = viewModel.Span.
Attributes
.GetValue(GenAIHelpers.GenAISystemInstructions);
183
var inputMessages = viewModel.Span.
Attributes
.GetValue(GenAIHelpers.GenAIInputMessages);
184
var outputMessages = viewModel.Span.
Attributes
.GetValue(GenAIHelpers.GenAIOutputInstructions);
Model\Otlp\SpanWaterfallViewModel.cs (3)
161
var hasPeerService = OtlpHelpers.GetPeerAddress(span.
Attributes
) != null;
230
if (resolver.TryResolvePeer(span.
Attributes
, out var name, out _))
237
return OtlpHelpers.GetPeerAddress(span.
Attributes
);
Model\SpanType.cs (1)
98
if (!string.IsNullOrEmpty(span.
Attributes
.GetValue(attributeName)))
Model\TraceHelpers.cs (2)
135
if (span.
Attributes
.HasKey("messaging.system"))
144
if (span.
Attributes
.HasKey("messaging.system"))
Otlp\Model\OtlpSpan.cs (16)
94
Attributes = item.
Attributes
,
128
foreach (var kv in
Attributes
.OrderBy(a => a.Key))
176
if (span.
Attributes
.GetValueWithFallback("http.request.method", "http.method") is { Length: > 0 } httpMethod)
178
var statusCode = span.
Attributes
.GetValueWithFallback("http.response.status_code", "http.status_code");
187
else if (!string.IsNullOrEmpty(OtlpHelpers.GetValue(span.
Attributes
, "db.system")))
189
var dbSystem = OtlpHelpers.GetValue(span.
Attributes
, "db.system");
193
else if (!string.IsNullOrEmpty(OtlpHelpers.GetValue(span.
Attributes
, "rpc.system")))
195
var rpcSystem = OtlpHelpers.GetValue(span.
Attributes
, "rpc.system");
196
var rpcService = OtlpHelpers.GetValue(span.
Attributes
, "rpc.service");
197
var rpcMethod = OtlpHelpers.GetValue(span.
Attributes
, "rpc.method");
201
var grpcStatusCode = OtlpHelpers.GetValue(span.
Attributes
, "rpc.grpc.status_code");
214
else if (!string.IsNullOrEmpty(OtlpHelpers.GetValue(span.
Attributes
, "messaging.system")))
216
var messagingSystem = OtlpHelpers.GetValue(span.
Attributes
, "messaging.system");
217
var messagingOperation = OtlpHelpers.GetValue(span.
Attributes
, "messaging.operation");
218
var destinationName = OtlpHelpers.GetValue(span.
Attributes
, "messaging.destination.name");
241
_ => span.
Attributes
.GetValue(field)
Otlp\Storage\TelemetryRepository.cs (3)
1076
foreach (var kvp in newSpan.
Attributes
)
1145
var hasPeerService = OtlpHelpers.GetPeerAddress(span.
Attributes
) != null;
1173
if (resolver.TryResolvePeer(span.
Attributes
, out _, out var matchedResourced))
Aspire.Dashboard.Tests (1)
TelemetryRepositoryTests\TraceTests.cs (1)
826
Assert.Collection(trace.FirstSpan.
Attributes
,