18 instantiations of OtlpKeyValueJson
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 } });
29 references to OtlpKeyValueJson
aspire (24)
src\Shared\ConsoleLogs\SharedAIHelpers.cs (8)
221
foreach (
var
attr in span.Attributes.Where(a => a.Key != OtlpHelpers.AspireDestinationNameAttribute))
292
private static string MapOtelAttributeValue(
OtlpKeyValueJson
attribute)
473
public static string GetAttributeValue(
OtlpKeyValueJson
attribute)
490
public static string? GetAttributeStringValue(
OtlpKeyValueJson
[]? attributes, string key)
497
foreach (
var
attr in attributes)
529
public static IEnumerable<
OtlpKeyValueJson
> GetFilteredAttributes(
OtlpKeyValueJson
[]? attributes)
585
foreach (
var
attr in GetFilteredAttributes(logEntry.LogRecord.Attributes))
src\Shared\Otlp\Serialization\OtlpCommonJson.cs (2)
79
public
OtlpKeyValueJson
[]? Values { get; set; }
146
public
OtlpKeyValueJson
[]? Attributes { get; set; }
src\Shared\Otlp\Serialization\OtlpJsonSerializerContext.cs (1)
29
[JsonSerializable(typeof(
OtlpKeyValueJson
))]
src\Shared\Otlp\Serialization\OtlpLogsJson.cs (1)
97
public
OtlpKeyValueJson
[]? Attributes { get; set; }
src\Shared\Otlp\Serialization\OtlpMetricsJson.cs (6)
113
public
OtlpKeyValueJson
[]? Metadata { get; set; }
210
public
OtlpKeyValueJson
[]? Attributes { get; set; }
262
public
OtlpKeyValueJson
[]? Attributes { get; set; }
338
public
OtlpKeyValueJson
[]? Attributes { get; set; }
454
public
OtlpKeyValueJson
[]? Attributes { get; set; }
527
public
OtlpKeyValueJson
[]? FilteredAttributes { get; set; }
src\Shared\Otlp\Serialization\OtlpResourceJson.cs (3)
17
public
OtlpKeyValueJson
[]? Attributes { get; set; }
42
foreach (
var
attr in Attributes)
63
foreach (
var
attr in Attributes)
src\Shared\Otlp\Serialization\OtlpTraceJson.cs (3)
122
public
OtlpKeyValueJson
[]? Attributes { get; set; }
186
public
OtlpKeyValueJson
[]? Attributes { get; set; }
223
public
OtlpKeyValueJson
[]? Attributes { get; set; }
Aspire.Cli.Tests (5)
Commands\TelemetryCommandTests.cs (1)
203
var attrs = new List<
OtlpKeyValueJson
>
Commands\TelemetryTestHelper.cs (1)
39
var attrs = new List<
OtlpKeyValueJson
>
Mcp\ListStructuredLogsToolTests.cs (1)
59
var attributes = new List<
OtlpKeyValueJson
>
Mcp\ListTracesToolTests.cs (2)
28
var attributes = new List<
OtlpKeyValueJson
>
336
var attributes = new List<
OtlpKeyValueJson
>