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