2 writes to Attributes
Aspire.Dashboard (2)
Model\TelemetryExportService.cs (1)
268Attributes = ConvertAttributes(log.Attributes, () =>
OtlpJsonSerializerContext.OtlpLogRecordJson.g.cs (1)
159Setter = static (obj, value) => ((global::Aspire.Otlp.Serialization.OtlpLogRecordJson)obj).Attributes = value!,
15 references to Attributes
Aspire.Dashboard (8)
Otlp\Model\Serialization\OtlpJsonProtobufConverter.cs (2)
313if (json.Attributes is not null) 315foreach (var attr in json.Attributes)
OtlpJsonSerializerContext.OtlpLogRecordJson.g.cs (1)
158Getter = static obj => ((global::Aspire.Otlp.Serialization.OtlpLogRecordJson)obj).Attributes,
src\Shared\ConsoleLogs\SharedAIHelpers.cs (5)
544var stackTrace = GetAttributeStringValue(logEntry.LogRecord.Attributes, ExceptionStackTraceField); 550var message = GetAttributeStringValue(logEntry.LogRecord.Attributes, ExceptionMessageField); 553var type = GetAttributeStringValue(logEntry.LogRecord.Attributes, ExceptionTypeField); 580var logIdString = GetAttributeStringValue(logEntry.LogRecord.Attributes, OtlpHelpers.AspireLogIdAttribute); 585foreach (var attr in GetFilteredAttributes(logEntry.LogRecord.Attributes))
Aspire.Dashboard.Tests (7)
Model\TelemetryExportServiceTests.cs (6)
91Assert.NotNull(logRecord.Attributes); 92Assert.Contains(logRecord.Attributes, a => a.Key == "custom.attr" && a.Value?.StringValue == "custom-value"); 126Assert.NotNull(logRecord.Attributes); 129var logIdAttribute = Assert.Single(logRecord.Attributes, a => a.Key == OtlpHelpers.AspireLogIdAttribute); 863Assert.NotNull(logRecord.Attributes); 864var japaneseAttr = Assert.Single(logRecord.Attributes, a => a.Key == "japanese.attr");
Model\TelemetryImportServiceTests.cs (1)
349Assert.Contains(exportedLogRecord.Attributes!, a => a.Key == OtlpHelpers.AspireLogIdAttribute && a.Value?.StringValue == originalInternalId.ToString(CultureInfo.InvariantCulture));