18 writes to Key
Aspire.Cli.Tests (18)
Commands\TelemetryCommandTests.cs (2)
205new() { Key = "service.name", Value = new OtlpAnyValueJson { StringValue = serviceName } }, 209attrs.Add(new() { Key = "service.instance.id", Value = new OtlpAnyValueJson { StringValue = instanceId } });
Commands\TelemetryTestHelper.cs (2)
41new() { Key = "service.name", Value = new OtlpAnyValueJson { StringValue = serviceName } }, 45attrs.Add(new() { Key = "service.instance.id", Value = new OtlpAnyValueJson { StringValue = instanceId } });
Mcp\ListStructuredLogsToolTests.cs (6)
61new() { Key = "service.name", Value = new OtlpAnyValueJson { StringValue = serviceName } } 65attributes.Add(new OtlpKeyValueJson { Key = "service.instance.id", Value = new OtlpAnyValueJson { StringValue = serviceInstanceId } }); 104new OtlpKeyValueJson { Key = OtlpHelpers.AspireLogIdAttribute, Value = new OtlpAnyValueJson { StringValue = "42" } }, 105new OtlpKeyValueJson { Key = "custom.attr", Value = new OtlpAnyValueJson { StringValue = "custom-value" } } 119new OtlpKeyValueJson { Key = OtlpHelpers.AspireLogIdAttribute, Value = new OtlpAnyValueJson { IntValue = 43 } } 133new OtlpKeyValueJson { Key = OtlpHelpers.AspireLogIdAttribute, Value = new OtlpAnyValueJson { IntValue = 44 } }
Mcp\ListTracesToolTests.cs (8)
30new() { Key = "service.name", Value = new OtlpAnyValueJson { StringValue = serviceName } } 34attributes.Add(new OtlpKeyValueJson { Key = "service.instance.id", Value = new OtlpAnyValueJson { StringValue = serviceInstanceId } }); 73new OtlpKeyValueJson { Key = "http.method", Value = new OtlpAnyValueJson { StringValue = "GET" } }, 74new OtlpKeyValueJson { Key = "http.url", Value = new OtlpAnyValueJson { StringValue = "/api/products" } } 90new OtlpKeyValueJson { Key = "aspire.destination", Value = new OtlpAnyValueJson { StringValue = "catalog-service" } } 105new OtlpKeyValueJson { Key = "error", Value = new OtlpAnyValueJson { StringValue = "Processing failed" } } 338new() { Key = "service.name", Value = new OtlpAnyValueJson { StringValue = serviceName } } 342attributes.Add(new OtlpKeyValueJson { Key = "service.instance.id", Value = new OtlpAnyValueJson { StringValue = serviceInstanceId } });
10 references to Key
aspire (10)
src\Shared\ConsoleLogs\SharedAIHelpers.cs (8)
221foreach (var attr in span.Attributes.Where(a => a.Key != OtlpHelpers.AspireDestinationNameAttribute)) 224attributesObj[attr.Key!] = context.AddValue(attrValue, id => $@"Duplicate of attribute ""{id.Key}"" for span {OtlpHelpers.ToShortenedId(id.SpanId)}", (SpanId: spanId, attr.Key)); 294var key = attribute.Key; 499if (attr.Key == key) 536return attributes.Where(a => a.Key is not (ExceptionStackTraceField or ExceptionMessageField or ExceptionTypeField or OtlpHelpers.AspireLogIdAttribute)); 588attributesObject[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)