13 writes to StringValue
Aspire.Dashboard (6)
Model\TelemetryExportService.cs (6)
268Body = new OtlpAnyValueJson { StringValue = log.Message }, 624Value = new OtlpAnyValueJson { StringValue = resourceView.Resource.ResourceName } 629Value = new OtlpAnyValueJson { StringValue = resourceView.Resource.InstanceId } 639Value = new OtlpAnyValueJson { StringValue = property.Value } 676Value = new OtlpAnyValueJson { StringValue = attributes[i].Value } 687Value = new OtlpAnyValueJson { StringValue = additionalAttributes[i].Value }
Aspire.Dashboard.Tests (7)
Model\TelemetryImportServiceTests.cs (7)
439new OtlpKeyValueJson { Key = "service.name", Value = new OtlpAnyValueJson { StringValue = serviceName } }, 440new OtlpKeyValueJson { Key = "service.instance.id", Value = new OtlpAnyValueJson { StringValue = instanceId } } 455Body = new OtlpAnyValueJson { StringValue = message } 484new OtlpKeyValueJson { Key = "service.name", Value = new OtlpAnyValueJson { StringValue = serviceName } }, 485new OtlpKeyValueJson { Key = "service.instance.id", Value = new OtlpAnyValueJson { StringValue = instanceId } } 529new OtlpKeyValueJson { Key = "service.name", Value = new OtlpAnyValueJson { StringValue = serviceName } }, 530new OtlpKeyValueJson { Key = "service.instance.id", Value = new OtlpAnyValueJson { StringValue = instanceId } }
21 references to StringValue
Aspire.Dashboard (8)
Otlp\Model\Serialization\OtlpJsonProtobufConverter.cs (2)
799if (json.StringValue is not null) 801anyValue.StringValue = json.StringValue;
src\Shared\ConsoleLogs\SharedAIHelpers.cs (2)
467return logRecord.Body?.StringValue; 480return attribute.Value.StringValue
src\Shared\Otlp\Serialization\OtlpResourceJson.cs (4)
44if (attr.Key == "service.name" && attr.Value?.StringValue is not null) 46return attr.Value.StringValue; 65if (attr.Key == "service.instance.id" && attr.Value?.StringValue is not null) 67return attr.Value.StringValue;
Aspire.Dashboard.Tests (13)
Model\TelemetryExportServiceTests.cs (12)
70Assert.Contains(resourceLogs.Resource.Attributes, a => a.Key == OtlpResource.SERVICE_NAME && a.Value?.StringValue == "TestService"); 71Assert.Contains(resourceLogs.Resource.Attributes, a => a.Key == OtlpResource.SERVICE_INSTANCE_ID && a.Value?.StringValue == "instance-1"); 84Assert.Equal("Test log message", logRecord.Body?.StringValue); 92Assert.Contains(logRecord.Attributes, a => a.Key == "custom.attr" && a.Value?.StringValue == "custom-value"); 130Assert.Equal(logs.Items[0].InternalId.ToString(CultureInfo.InvariantCulture), logIdAttribute.Value?.StringValue); 304Assert.Contains(resourceSpans.Resource.Attributes, a => a.Key == OtlpResource.SERVICE_NAME && a.Value?.StringValue == "TestService"); 327Assert.Contains(span.Attributes, a => a.Key == "http.method" && a.Value?.StringValue == "GET"); 419Assert.Contains(span.Attributes, a => a.Key == OtlpHelpers.AspireDestinationNameAttribute && a.Value?.StringValue == "target-service"); 519Assert.Contains(resourceMetrics.Resource.Attributes, a => a.Key == OtlpResource.SERVICE_NAME && a.Value?.StringValue == "TestService"); 665Assert.Equal("log-resource1-111", logRecord.Body?.StringValue); 860Assert.Equal(japaneseMessage, logRecord.Body?.StringValue); 865Assert.Equal(japaneseAttributeValue, japaneseAttr.Value?.StringValue);
Model\TelemetryImportServiceTests.cs (1)
349Assert.Contains(exportedLogRecord.Attributes!, a => a.Key == OtlpHelpers.AspireLogIdAttribute && a.Value?.StringValue == originalInternalId.ToString(CultureInfo.InvariantCulture));