13 writes to StringValue
Aspire.Dashboard (6)
Model\TelemetryExportService.cs (6)
260Body = new OtlpAnyValueJson { StringValue = log.Message }, 614Value = new OtlpAnyValueJson { StringValue = property.Value } 631Value = new OtlpAnyValueJson { StringValue = resource.ResourceName } 636Value = new OtlpAnyValueJson { StringValue = resource.InstanceId } 669Value = new OtlpAnyValueJson { StringValue = attributes[i].Value } 680Value = new OtlpAnyValueJson { StringValue = additionalAttributes[i].Value }
Aspire.Dashboard.Tests (7)
Model\TelemetryImportServiceTests.cs (7)
492new OtlpKeyValueJson { Key = "service.name", Value = new OtlpAnyValueJson { StringValue = serviceName } }, 493new OtlpKeyValueJson { Key = "service.instance.id", Value = new OtlpAnyValueJson { StringValue = instanceId } } 508Body = new OtlpAnyValueJson { StringValue = message } 537new OtlpKeyValueJson { Key = "service.name", Value = new OtlpAnyValueJson { StringValue = serviceName } }, 538new OtlpKeyValueJson { Key = "service.instance.id", Value = new OtlpAnyValueJson { StringValue = instanceId } } 582new OtlpKeyValueJson { Key = "service.name", Value = new OtlpAnyValueJson { StringValue = serviceName } }, 583new OtlpKeyValueJson { Key = "service.instance.id", Value = new OtlpAnyValueJson { StringValue = instanceId } }
22 references to StringValue
Aspire.Dashboard (6)
Otlp\Model\Serialization\OtlpJsonProtobufConverter.cs (2)
799if (json.StringValue is not null) 801anyValue.StringValue = json.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 (16)
Model\TelemetryExportServiceTests.cs (15)
78Assert.Contains(resourceLogs.Resource.Attributes, a => a.Key == OtlpResource.SERVICE_NAME && a.Value?.StringValue == "TestService"); 79Assert.Contains(resourceLogs.Resource.Attributes, a => a.Key == OtlpResource.SERVICE_INSTANCE_ID && a.Value?.StringValue == "instance-1"); 92Assert.Equal("Test log message", logRecord.Body?.StringValue); 100Assert.Contains(logRecord.Attributes, a => a.Key == "custom.attr" && a.Value?.StringValue == "custom-value"); 139Assert.Equal(logs.Items[0].InternalId.ToString(CultureInfo.InvariantCulture), logIdAttribute.Value?.StringValue); 315Assert.Contains(resourceSpans.Resource.Attributes, a => a.Key == OtlpResource.SERVICE_NAME && a.Value?.StringValue == "TestService"); 338Assert.Contains(span.Attributes, a => a.Key == "http.method" && a.Value?.StringValue == "GET"); 432Assert.Contains(span.Attributes, a => a.Key == OtlpHelpers.AspireDestinationNameAttribute && a.Value?.StringValue == "target-service"); 476Assert.Contains(span.Attributes, a => a.Key == OtlpHelpers.AspireDestinationNameAttribute && a.Value?.StringValue == "target-service"); 515attribute => attribute.Key == OtlpHelpers.AspireDestinationNameAttribute && attribute.Value?.StringValue == "destination-replica-1"); 576Assert.Contains(resourceMetrics.Resource.Attributes, a => a.Key == OtlpResource.SERVICE_NAME && a.Value?.StringValue == "TestService"); 577Assert.Contains(resourceMetrics.Resource.Attributes, a => a.Key == "service.version" && a.Value?.StringValue == "1.2.3"); 725Assert.Equal("log-resource1-111", logRecord.Body?.StringValue); 1023Assert.Equal(japaneseMessage, logRecord.Body?.StringValue); 1028Assert.Equal(japaneseAttributeValue, japaneseAttr.Value?.StringValue);
Model\TelemetryImportServiceTests.cs (1)
383Assert.Contains(exportedLogRecord.Attributes!, a => a.Key == OtlpHelpers.AspireLogIdAttribute && a.Value?.StringValue == originalInternalId.ToString(CultureInfo.InvariantCulture));