12 instantiations of OtlpKeyValueJson
Aspire.Dashboard (6)
Model\TelemetryExportService.cs (5)
620
new
OtlpKeyValueJson
625
new
OtlpKeyValueJson
635
attributes.Add(new
OtlpKeyValueJson
672
result[i] = new
OtlpKeyValueJson
683
result[attributes.Length + i] = new
OtlpKeyValueJson
OtlpJsonSerializerContext.OtlpKeyValueJson.g.cs (1)
31
ObjectCreator = () => new global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
(),
Aspire.Dashboard.Tests (6)
Model\TelemetryImportServiceTests.cs (6)
439
new
OtlpKeyValueJson
{ Key = "service.name", Value = new OtlpAnyValueJson { StringValue = serviceName } },
440
new
OtlpKeyValueJson
{ Key = "service.instance.id", Value = new OtlpAnyValueJson { StringValue = instanceId } }
484
new
OtlpKeyValueJson
{ Key = "service.name", Value = new OtlpAnyValueJson { StringValue = serviceName } },
485
new
OtlpKeyValueJson
{ Key = "service.instance.id", Value = new OtlpAnyValueJson { StringValue = instanceId } }
529
new
OtlpKeyValueJson
{ Key = "service.name", Value = new OtlpAnyValueJson { StringValue = serviceName } },
530
new
OtlpKeyValueJson
{ Key = "service.instance.id", Value = new OtlpAnyValueJson { StringValue = instanceId } }
119 references to OtlpKeyValueJson
Aspire.Dashboard (117)
Model\TelemetryExportService.cs (3)
618
var attributes = new List<
OtlpKeyValueJson
>
658
private static
OtlpKeyValueJson
[]? ConvertAttributes(KeyValuePair<string, string>[] attributes, Func<KeyValuePair<string, string>[]>? getAdditionalAttributes = null)
668
var result = new
OtlpKeyValueJson
[attributes.Length + additionalCount];
Otlp\Model\Serialization\OtlpJsonProtobufConverter.cs (14)
153
foreach (
var
attr in json.Attributes)
195
foreach (
var
attr in json.Attributes)
221
foreach (
var
attr in json.Attributes)
315
foreach (
var
attr in json.Attributes)
416
foreach (
var
kv in json.Metadata)
507
foreach (
var
attr in json.Attributes)
544
foreach (
var
attr in json.Attributes)
603
foreach (
var
attr in json.Attributes)
676
foreach (
var
attr in json.Attributes)
718
foreach (
var
attr in json.FilteredAttributes)
751
foreach (
var
attr in json.Attributes)
773
foreach (
var
attr in json.Attributes)
782
private static KeyValue ToProtobuf(
OtlpKeyValueJson
json)
848
foreach (
var
kv in json.Values)
Otlp\Model\Serialization\OtlpJsonSerializerContext.cs (1)
25
[JsonSerializable(typeof(
OtlpKeyValueJson
))]
Otlp\Model\Serialization\OtlpMetricsJson.cs (6)
114
public
OtlpKeyValueJson
[]? Metadata { get; set; }
211
public
OtlpKeyValueJson
[]? Attributes { get; set; }
263
public
OtlpKeyValueJson
[]? Attributes { get; set; }
339
public
OtlpKeyValueJson
[]? Attributes { get; set; }
455
public
OtlpKeyValueJson
[]? Attributes { get; set; }
528
public
OtlpKeyValueJson
[]? FilteredAttributes { get; set; }
OtlpJsonSerializerContext.GetJsonTypeInfo.g.cs (2)
214
if (type == typeof(global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
))
218
if (type == typeof(global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]))
OtlpJsonSerializerContext.OtlpExemplarJson.g.cs (3)
51
var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]>
66
AttributeProviderFactory = static () => typeof(global::Aspire.Dashboard.Otlp.Model.Serialization.OtlpExemplarJson).GetProperty("FilteredAttributes", InstanceMemberBindingFlags, null, typeof(global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]), global::System.Array.Empty<global::System.Type>(), null),
69
properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]>(options, info0);
OtlpJsonSerializerContext.OtlpExponentialHistogramDataPointJson.g.cs (3)
51
var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]>
66
AttributeProviderFactory = static () => typeof(global::Aspire.Dashboard.Otlp.Model.Serialization.OtlpExponentialHistogramDataPointJson).GetProperty("Attributes", InstanceMemberBindingFlags, null, typeof(global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]), global::System.Array.Empty<global::System.Type>(), null),
69
properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]>(options, info0);
OtlpJsonSerializerContext.OtlpHistogramDataPointJson.g.cs (3)
51
var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]>
66
AttributeProviderFactory = static () => typeof(global::Aspire.Dashboard.Otlp.Model.Serialization.OtlpHistogramDataPointJson).GetProperty("Attributes", InstanceMemberBindingFlags, null, typeof(global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]), global::System.Array.Empty<global::System.Type>(), null),
69
properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]>(options, info0);
OtlpJsonSerializerContext.OtlpInstrumentationScopeJson.g.cs (4)
91
var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]>
106
AttributeProviderFactory = static () => typeof(global::Aspire.Otlp.Serialization.OtlpInstrumentationScopeJson).GetProperty("Attributes", InstanceMemberBindingFlags, null, typeof(global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]), global::System.Array.Empty<global::System.Type>(), null),
109
properties[2] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]>(options, info2);
156
global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[] __value_Attributes = ((global::Aspire.Otlp.Serialization.OtlpInstrumentationScopeJson)value).Attributes;
OtlpJsonSerializerContext.OtlpKeyValueJson.g.cs (21)
13
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
>? _OtlpKeyValueJson;
19
public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
> OtlpKeyValueJson
22
get => _OtlpKeyValueJson ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
>)Options.GetTypeInfo(typeof(global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
));
25
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
> Create_OtlpKeyValueJson(global::System.Text.Json.JsonSerializerOptions options)
27
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
> jsonTypeInfo))
29
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
>
35
ConstructorAttributeProviderFactory = static () => typeof(global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
39
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
>(options, objectInfo);
56
DeclaringType = typeof(global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
),
58
Getter = static obj => ((global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
)obj).Key,
59
Setter = static (obj, value) => ((global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
)obj).Key = value!,
66
AttributeProviderFactory = static () => typeof(global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
).GetProperty("Key", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
76
DeclaringType = typeof(global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
),
78
Getter = static obj => ((global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
)obj).Value,
79
Setter = static (obj, value) => ((global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
)obj).Value = value!,
86
AttributeProviderFactory = static () => typeof(global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
).GetProperty("Value", InstanceMemberBindingFlags, null, typeof(global::Aspire.Otlp.Serialization.OtlpAnyValueJson), global::System.Array.Empty<global::System.Type>(), null),
96
private void OtlpKeyValueJsonSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
? value)
106
string __value_Key = ((global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
)value).Key;
111
global::Aspire.Otlp.Serialization.OtlpAnyValueJson __value_Value = ((global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
)value).Value;
OtlpJsonSerializerContext.OtlpKeyValueJsonArray.g.cs (10)
13
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]>? _OtlpKeyValueJsonArray;
19
public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]> OtlpKeyValueJsonArray
22
get => _OtlpKeyValueJsonArray ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]>)Options.GetTypeInfo(typeof(global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]));
25
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]> Create_OtlpKeyValueJsonArray(global::System.Text.Json.JsonSerializerOptions options)
27
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]> jsonTypeInfo))
29
var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]>
35
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateArrayInfo<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
>(options, info);
45
private void OtlpKeyValueJsonArraySerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]? value)
OtlpJsonSerializerContext.OtlpKeyValueListJson.g.cs (4)
51
var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]>
66
AttributeProviderFactory = static () => typeof(global::Aspire.Otlp.Serialization.OtlpKeyValueListJson).GetProperty("Values", InstanceMemberBindingFlags, null, typeof(global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]), global::System.Array.Empty<global::System.Type>(), null),
69
properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]>(options, info0);
86
global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[] __value_Values = ((global::Aspire.Otlp.Serialization.OtlpKeyValueListJson)value).Values;
OtlpJsonSerializerContext.OtlpLogRecordJson.g.cs (3)
151
var info5 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]>
166
AttributeProviderFactory = static () => typeof(global::Aspire.Otlp.Serialization.OtlpLogRecordJson).GetProperty("Attributes", InstanceMemberBindingFlags, null, typeof(global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]), global::System.Array.Empty<global::System.Type>(), null),
169
properties[5] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]>(options, info5);
OtlpJsonSerializerContext.OtlpMetricJson.g.cs (4)
211
var info8 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]>
226
AttributeProviderFactory = static () => typeof(global::Aspire.Dashboard.Otlp.Model.Serialization.OtlpMetricJson).GetProperty("Metadata", InstanceMemberBindingFlags, null, typeof(global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]), global::System.Array.Empty<global::System.Type>(), null),
229
properties[8] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]>(options, info8);
291
global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[] __value_Metadata = ((global::Aspire.Dashboard.Otlp.Model.Serialization.OtlpMetricJson)value).Metadata;
OtlpJsonSerializerContext.OtlpNumberDataPointJson.g.cs (3)
51
var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]>
66
AttributeProviderFactory = static () => typeof(global::Aspire.Dashboard.Otlp.Model.Serialization.OtlpNumberDataPointJson).GetProperty("Attributes", InstanceMemberBindingFlags, null, typeof(global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]), global::System.Array.Empty<global::System.Type>(), null),
69
properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]>(options, info0);
OtlpJsonSerializerContext.OtlpResourceJson.g.cs (4)
51
var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]>
66
AttributeProviderFactory = static () => typeof(global::Aspire.Otlp.Serialization.OtlpResourceJson).GetProperty("Attributes", InstanceMemberBindingFlags, null, typeof(global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]), global::System.Array.Empty<global::System.Type>(), null),
69
properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]>(options, info0);
126
global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[] __value_Attributes = ((global::Aspire.Otlp.Serialization.OtlpResourceJson)value).Attributes;
OtlpJsonSerializerContext.OtlpSpanEventJson.g.cs (3)
91
var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]>
106
AttributeProviderFactory = static () => typeof(global::Aspire.Otlp.Serialization.OtlpSpanEventJson).GetProperty("Attributes", InstanceMemberBindingFlags, null, typeof(global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]), global::System.Array.Empty<global::System.Type>(), null),
109
properties[2] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]>(options, info2);
OtlpJsonSerializerContext.OtlpSpanJson.g.cs (3)
231
var info9 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]>
246
AttributeProviderFactory = static () => typeof(global::Aspire.Otlp.Serialization.OtlpSpanJson).GetProperty("Attributes", InstanceMemberBindingFlags, null, typeof(global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]), global::System.Array.Empty<global::System.Type>(), null),
249
properties[9] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]>(options, info9);
OtlpJsonSerializerContext.OtlpSpanLinkJson.g.cs (4)
111
var info3 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]>
126
AttributeProviderFactory = static () => typeof(global::Aspire.Otlp.Serialization.OtlpSpanLinkJson).GetProperty("Attributes", InstanceMemberBindingFlags, null, typeof(global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]), global::System.Array.Empty<global::System.Type>(), null),
129
properties[3] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]>(options, info3);
201
global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[] __value_Attributes = ((global::Aspire.Otlp.Serialization.OtlpSpanLinkJson)value).Attributes;
OtlpJsonSerializerContext.OtlpSummaryDataPointJson.g.cs (3)
51
var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]>
66
AttributeProviderFactory = static () => typeof(global::Aspire.Dashboard.Otlp.Model.Serialization.OtlpSummaryDataPointJson).GetProperty("Attributes", InstanceMemberBindingFlags, null, typeof(global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]), global::System.Array.Empty<global::System.Type>(), null),
69
properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Aspire.Otlp.Serialization.
OtlpKeyValueJson
[]>(options, info0);
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; }
121
public
OtlpKeyValueJson
[]? Attributes { get; set; }
src\Shared\Otlp\Serialization\OtlpLogsJson.cs (1)
97
public
OtlpKeyValueJson
[]? Attributes { get; set; }
src\Shared\Otlp\Serialization\OtlpResourceJson.cs (2)
17
public
OtlpKeyValueJson
[]? Attributes { get; set; }
42
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.Dashboard.Tests (2)
Model\TelemetryExportServiceTests.cs (2)
129
var
logIdAttribute = Assert.Single(logRecord.Attributes, a => a.Key == OtlpHelpers.AspireLogIdAttribute);
864
var
japaneseAttr = Assert.Single(logRecord.Attributes, a => a.Key == "japanese.attr");