27 writes to Key
Aspire.Cli.Tests (27)
Commands\TelemetryCommandTests.cs (2)
591new() { Key = "service.name", Value = new OtlpAnyValueJson { StringValue = serviceName } }, 595attrs.Add(new() { Key = "service.instance.id", Value = new OtlpAnyValueJson { StringValue = instanceId } });
Commands\TelemetryLogsCommandTests.cs (2)
602new OtlpKeyValueJson { Key = "aspire.log_id", Value = new OtlpAnyValueJson { StringValue = "42" } }, 603new OtlpKeyValueJson { Key = "http.method", Value = new OtlpAnyValueJson { StringValue = "GET" } }
Commands\TelemetrySpansCommandTests.cs (2)
331new OtlpKeyValueJson { Key = "http.method", Value = new OtlpAnyValueJson { StringValue = "GET" } }, 332new OtlpKeyValueJson { Key = "aspire.destination", Value = new OtlpAnyValueJson { StringValue = "backend" } }
Commands\TelemetryTestHelper.cs (2)
43new() { Key = "service.name", Value = new OtlpAnyValueJson { StringValue = serviceName } }, 47attrs.Add(new() { Key = "service.instance.id", Value = new OtlpAnyValueJson { StringValue = instanceId } });
Commands\TelemetryTracesCommandTests.cs (1)
536new OtlpKeyValueJson { Key = "http.method", Value = new OtlpAnyValueJson { StringValue = "GET" } }
Mcp\ExcludeFromMcpTests.cs (3)
500Attributes = [new OtlpKeyValueJson { Key = "service.name", Value = new OtlpAnyValueJson { StringValue = name } }] 515Attributes = [new OtlpKeyValueJson { Key = OtlpHelpers.AspireLogIdAttribute, Value = new OtlpAnyValueJson { IntValue = 1 } }] 545Attributes = [new OtlpKeyValueJson { Key = "service.name", Value = new OtlpAnyValueJson { StringValue = name } }]
Mcp\ListStructuredLogsToolTests.cs (6)
173new() { Key = "service.name", Value = new OtlpAnyValueJson { StringValue = serviceName } } 177attributes.Add(new OtlpKeyValueJson { Key = "service.instance.id", Value = new OtlpAnyValueJson { StringValue = serviceInstanceId } }); 216new OtlpKeyValueJson { Key = OtlpHelpers.AspireLogIdAttribute, Value = new OtlpAnyValueJson { StringValue = "42" } }, 217new OtlpKeyValueJson { Key = "custom.attr", Value = new OtlpAnyValueJson { StringValue = "custom-value" } } 231new OtlpKeyValueJson { Key = OtlpHelpers.AspireLogIdAttribute, Value = new OtlpAnyValueJson { IntValue = 43 } } 245new OtlpKeyValueJson { Key = OtlpHelpers.AspireLogIdAttribute, Value = new OtlpAnyValueJson { IntValue = 44 } }
Mcp\ListTracesToolTests.cs (8)
94new() { Key = "service.name", Value = new OtlpAnyValueJson { StringValue = serviceName } } 98attributes.Add(new OtlpKeyValueJson { Key = "service.instance.id", Value = new OtlpAnyValueJson { StringValue = serviceInstanceId } }); 137new OtlpKeyValueJson { Key = "http.method", Value = new OtlpAnyValueJson { StringValue = "GET" } }, 138new OtlpKeyValueJson { Key = "http.url", Value = new OtlpAnyValueJson { StringValue = "/api/products" } } 154new OtlpKeyValueJson { Key = "aspire.destination", Value = new OtlpAnyValueJson { StringValue = "catalog-service" } } 169new OtlpKeyValueJson { Key = "error", Value = new OtlpAnyValueJson { StringValue = "Processing failed" } } 396new() { Key = "service.name", Value = new OtlpAnyValueJson { StringValue = serviceName } } 400attributes.Add(new OtlpKeyValueJson { Key = "service.instance.id", Value = new OtlpAnyValueJson { StringValue = serviceInstanceId } });
ProfileCaptureServiceTests.cs (1)
682Key = sessionTagName,
11 references to Key
aspire (11)
Profiling\ProfileCaptureService.cs (1)
486IsProfilingSessionIdTag(attribute.Key) &&
src\Shared\ConsoleLogs\SharedAIHelpers.cs (8)
223foreach (var attr in span.Attributes.Where(a => a.Key != OtlpHelpers.AspireDestinationNameAttribute)) 226attributesObj[attr.Key!] = context.AddValue(attrValue, id => $@"Duplicate of attribute ""{id.Key}"" for span {OtlpHelpers.ToShortenedId(id.SpanId)}", (SpanId: spanId, attr.Key)); 420var key = attribute.Key; 635if (attr.Key == key) 672return attributes.Where(a => a.Key is not (ExceptionStackTraceField or ExceptionMessageField or ExceptionTypeField or OtlpHelpers.AspireLogIdAttribute)); 726attributesObject[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)
44if (attr.Key == "service.name" && attr.Value?.StringValue is not null) 65if (attr.Key == "service.instance.id" && attr.Value?.StringValue is not null)