14 writes to StringValue
Aspire.Dashboard (7)
Model\TelemetryExportService.cs (6)
267Body = new OtlpAnyValueJson { StringValue = log.Message }, 623Value = new OtlpAnyValueJson { StringValue = resourceView.Resource.ResourceName } 628Value = new OtlpAnyValueJson { StringValue = resourceView.Resource.InstanceId } 638Value = new OtlpAnyValueJson { StringValue = property.Value } 675Value = new OtlpAnyValueJson { StringValue = attributes[i].Value } 686Value = new OtlpAnyValueJson { StringValue = additionalAttributes[i].Value }
OtlpJsonSerializerContext.OtlpAnyValueJson.g.cs (1)
59Setter = static (obj, value) => ((global::Aspire.Otlp.Serialization.OtlpAnyValueJson)obj).StringValue = 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 } }
20 references to StringValue
Aspire.Dashboard (7)
Otlp\Model\Serialization\OtlpJsonProtobufConverter.cs (2)
799if (json.StringValue is not null) 801anyValue.StringValue = json.StringValue;
OtlpJsonSerializerContext.OtlpAnyValueJson.g.cs (1)
58Getter = static obj => ((global::Aspire.Otlp.Serialization.OtlpAnyValueJson)obj).StringValue,
src\Shared\ConsoleLogs\SharedAIHelpers.cs (2)
467return logRecord.Body?.StringValue; 480return attribute.Value.StringValue
src\Shared\Otlp\Serialization\OtlpResourceJson.cs (2)
44if (attr.Key == "service.name" && attr.Value?.StringValue is not null) 46return 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));