27 writes to Key
Aspire.Cli.Tests (27)
Commands\TelemetryCommandTests.cs (2)
375
new() {
Key
= "service.name", Value = new OtlpAnyValueJson { StringValue = serviceName } },
379
attrs.Add(new() {
Key
= "service.instance.id", Value = new OtlpAnyValueJson { StringValue = instanceId } });
Commands\TelemetryLogsCommandTests.cs (2)
597
new OtlpKeyValueJson {
Key
= "aspire.log_id", Value = new OtlpAnyValueJson { StringValue = "42" } },
598
new OtlpKeyValueJson {
Key
= "http.method", Value = new OtlpAnyValueJson { StringValue = "GET" } }
Commands\TelemetrySpansCommandTests.cs (2)
331
new OtlpKeyValueJson {
Key
= "http.method", Value = new OtlpAnyValueJson { StringValue = "GET" } },
332
new OtlpKeyValueJson {
Key
= "aspire.destination", Value = new OtlpAnyValueJson { StringValue = "backend" } }
Commands\TelemetryTestHelper.cs (2)
43
new() {
Key
= "service.name", Value = new OtlpAnyValueJson { StringValue = serviceName } },
47
attrs.Add(new() {
Key
= "service.instance.id", Value = new OtlpAnyValueJson { StringValue = instanceId } });
Commands\TelemetryTracesCommandTests.cs (1)
536
new OtlpKeyValueJson {
Key
= "http.method", Value = new OtlpAnyValueJson { StringValue = "GET" } }
Mcp\ExcludeFromMcpTests.cs (3)
466
Attributes = [new OtlpKeyValueJson {
Key
= "service.name", Value = new OtlpAnyValueJson { StringValue = name } }]
481
Attributes = [new OtlpKeyValueJson {
Key
= OtlpHelpers.AspireLogIdAttribute, Value = new OtlpAnyValueJson { IntValue = 1 } }]
511
Attributes = [new OtlpKeyValueJson {
Key
= "service.name", Value = new OtlpAnyValueJson { StringValue = name } }]
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" } }
332
new() {
Key
= "service.name", Value = new OtlpAnyValueJson { StringValue = serviceName } }
336
attributes.Add(new OtlpKeyValueJson {
Key
= "service.instance.id", Value = new OtlpAnyValueJson { StringValue = serviceInstanceId } });
ProfileCaptureServiceTests.cs (1)
619
Key
= sessionTagName,
11 references to Key
aspire (11)
Profiling\ProfileCaptureService.cs (1)
483
IsProfilingSessionIdTag(attribute.
Key
) &&
src\Shared\ConsoleLogs\SharedAIHelpers.cs (8)
223
foreach (var attr in span.Attributes.Where(a => a.
Key
!= OtlpHelpers.AspireDestinationNameAttribute))
226
attributesObj[attr.
Key
!] = context.AddValue(attrValue, id => $@"Duplicate of attribute ""{id.Key}"" for span {OtlpHelpers.ToShortenedId(id.SpanId)}", (SpanId: spanId, attr.
Key
));
420
var key = attribute.
Key
;
635
if (attr.
Key
== key)
672
return attributes.Where(a => a.
Key
is not (ExceptionStackTraceField or ExceptionMessageField or ExceptionTypeField or OtlpHelpers.AspireLogIdAttribute));
726
attributesObject[attr.
Key
!] = context.AddValue(attrValue, id => $@"Duplicate of attribute ""{id.Key}"" for log entry {id.LogId}", (LogId: logId, attr.
Key
));
src\Shared\Otlp\Serialization\OtlpResourceJson.cs (2)
44
if (attr.
Key
== "service.name" && attr.Value?.StringValue is not null)
65
if (attr.
Key
== "service.instance.id" && attr.Value?.StringValue is not null)