18 writes to Value
Aspire.Cli.Tests (18)
Commands\TelemetryCommandTests.cs (2)
205
new() { Key = "service.name",
Value
= new OtlpAnyValueJson { StringValue = serviceName } },
209
attrs.Add(new() { Key = "service.instance.id",
Value
= new OtlpAnyValueJson { StringValue = instanceId } });
Commands\TelemetryTestHelper.cs (2)
41
new() { Key = "service.name",
Value
= new OtlpAnyValueJson { StringValue = serviceName } },
45
attrs.Add(new() { Key = "service.instance.id",
Value
= new OtlpAnyValueJson { StringValue = instanceId } });
Mcp\ListStructuredLogsToolTests.cs (6)
61
new() { Key = "service.name",
Value
= new OtlpAnyValueJson { StringValue = serviceName } }
65
attributes.Add(new OtlpKeyValueJson { Key = "service.instance.id",
Value
= new OtlpAnyValueJson { StringValue = serviceInstanceId } });
104
new OtlpKeyValueJson { Key = OtlpHelpers.AspireLogIdAttribute,
Value
= new OtlpAnyValueJson { StringValue = "42" } },
105
new OtlpKeyValueJson { Key = "custom.attr",
Value
= new OtlpAnyValueJson { StringValue = "custom-value" } }
119
new OtlpKeyValueJson { Key = OtlpHelpers.AspireLogIdAttribute,
Value
= new OtlpAnyValueJson { IntValue = 43 } }
133
new OtlpKeyValueJson { Key = OtlpHelpers.AspireLogIdAttribute,
Value
= new OtlpAnyValueJson { IntValue = 44 } }
Mcp\ListTracesToolTests.cs (8)
30
new() { Key = "service.name",
Value
= new OtlpAnyValueJson { StringValue = serviceName } }
34
attributes.Add(new OtlpKeyValueJson { Key = "service.instance.id",
Value
= new OtlpAnyValueJson { StringValue = serviceInstanceId } });
73
new OtlpKeyValueJson { Key = "http.method",
Value
= new OtlpAnyValueJson { StringValue = "GET" } },
74
new OtlpKeyValueJson { Key = "http.url",
Value
= new OtlpAnyValueJson { StringValue = "/api/products" } }
90
new OtlpKeyValueJson { Key = "aspire.destination",
Value
= new OtlpAnyValueJson { StringValue = "catalog-service" } }
105
new OtlpKeyValueJson { Key = "error",
Value
= new OtlpAnyValueJson { StringValue = "Processing failed" } }
338
new() { Key = "service.name",
Value
= new OtlpAnyValueJson { StringValue = serviceName } }
342
attributes.Add(new OtlpKeyValueJson { Key = "service.instance.id",
Value
= new OtlpAnyValueJson { StringValue = serviceInstanceId } });
9 references to Value
aspire (9)
src\Shared\ConsoleLogs\SharedAIHelpers.cs (5)
475
if (attribute.
Value
is null)
480
return attribute.
Value
.StringValue
481
?? attribute.
Value
.IntValue?.ToString(CultureInfo.InvariantCulture)
482
?? attribute.
Value
.DoubleValue?.ToString(CultureInfo.InvariantCulture)
483
?? attribute.
Value
.BoolValue?.ToString(CultureInfo.InvariantCulture)
src\Shared\Otlp\Serialization\OtlpResourceJson.cs (4)
44
if (attr.Key == "service.name" && attr.
Value
?.StringValue is not null)
46
return attr.
Value
.StringValue;
65
if (attr.Key == "service.instance.id" && attr.
Value
?.StringValue is not null)
67
return attr.
Value
.StringValue;