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