diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.LiveMetrics/src/Generated/Docs/LiveMetricsClient.xml b/sdk/monitor/Azure.Monitor.OpenTelemetry.LiveMetrics/src/Generated/Docs/LiveMetricsClient.xml
new file mode 100644
index 000000000000..77f79765e1d8
--- /dev/null
+++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.LiveMetrics/src/Generated/Docs/LiveMetricsClient.xml
@@ -0,0 +1,671 @@
+
+
+
+
+
+This sample shows how to call IsSubscribedAsync.
+ response = await client.IsSubscribedAsync("");
+]]>
+This sample shows how to call IsSubscribedAsync with all parameters.
+",
+1234,
+"",
+"",
+"",
+"",
+true,
+true)
+{
+ Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"),
+ TransmissionTime = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"),
+ Metrics = { new MetricPoint("", 123.45, 1234) },
+ Documents = {new Models.Request
+ {
+ Name = "",
+ Url = new Uri("http://localhost:3000"),
+ ResponseCode = "",
+ Duration = "",
+ DocumentStreamIds = {""},
+ Properties = {new KeyValuePairStringString("", "")},
+ }},
+ TopCpuProcesses = { new ProcessCpuData("", 1234) },
+ CollectionConfigurationErrors = {new CollectionConfigurationError(CollectionConfigurationErrorType.Unknown, "", "", new KeyValuePairStringString[]
+ {
+ default
+ })},
+};
+Response response = await client.IsSubscribedAsync("", monitoringDataPoint: monitoringDataPoint, transmissionTime: 1234L, machineName: "", instanceName: "", streamId: "", roleName: "", invariantVersion: "", configurationEtag: "");
+]]>
+
+
+
+This sample shows how to call IsSubscribed.
+ response = client.IsSubscribed("");
+]]>
+This sample shows how to call IsSubscribed with all parameters.
+",
+1234,
+"",
+"",
+"",
+"",
+true,
+true)
+{
+ Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"),
+ TransmissionTime = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"),
+ Metrics = { new MetricPoint("", 123.45, 1234) },
+ Documents = {new Models.Request
+ {
+ Name = "",
+ Url = new Uri("http://localhost:3000"),
+ ResponseCode = "",
+ Duration = "",
+ DocumentStreamIds = {""},
+ Properties = {new KeyValuePairStringString("", "")},
+ }},
+ TopCpuProcesses = { new ProcessCpuData("", 1234) },
+ CollectionConfigurationErrors = {new CollectionConfigurationError(CollectionConfigurationErrorType.Unknown, "", "", new KeyValuePairStringString[]
+ {
+ default
+ })},
+};
+Response response = client.IsSubscribed("", monitoringDataPoint: monitoringDataPoint, transmissionTime: 1234L, machineName: "", instanceName: "", streamId: "", roleName: "", invariantVersion: "", configurationEtag: "");
+]]>
+
+
+
+This sample shows how to call IsSubscribedAsync and parse the result.
+", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("ETag").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("Id").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("TelemetryType").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("FilterGroups")[0].GetProperty("Filters")[0].GetProperty("FieldName").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("FilterGroups")[0].GetProperty("Filters")[0].GetProperty("Predicate").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("FilterGroups")[0].GetProperty("Filters")[0].GetProperty("Comparand").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("Projection").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("Aggregation").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("BackEndAggregation").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("Id").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("DocumentFilterGroups")[0].GetProperty("TelemetryType").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("DocumentFilterGroups")[0].GetProperty("Filters").GetProperty("Filters")[0].GetProperty("FieldName").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("DocumentFilterGroups")[0].GetProperty("Filters").GetProperty("Filters")[0].GetProperty("Predicate").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("DocumentFilterGroups")[0].GetProperty("Filters").GetProperty("Filters")[0].GetProperty("Comparand").ToString());
+]]>
+This sample shows how to call IsSubscribedAsync with all parameters and request content and parse the result.
+",
+ InvariantVersion = 1234,
+ Instance = "",
+ RoleName = "",
+ MachineName = "",
+ StreamId = "",
+ Timestamp = "2022-05-10T14:57:31.2311892-04:00",
+ TransmissionTime = "2022-05-10T14:57:31.2311892-04:00",
+ IsWebApp = true,
+ PerformanceCollectionSupported = true,
+ Metrics = new object[]
+ {
+ new
+ {
+ Name = "",
+ Value = 123.45,
+ Weight = 1234,
+ }
+ },
+ Documents = new object[]
+ {
+ new
+ {
+ Name = "",
+ Url = "http://localhost:3000",
+ ResponseCode = "",
+ Duration = "",
+ DocumentType = "Request",
+ DocumentStreamIds = new object[]
+ {
+ ""
+ },
+ Properties = new object[]
+ {
+ new
+ {
+ key = "",
+ value = "",
+ }
+ },
+ }
+ },
+ TopCpuProcesses = new object[]
+ {
+ new
+ {
+ ProcessName = "",
+ CpuPercentage = 1234,
+ }
+ },
+ CollectionConfigurationErrors = new object[]
+ {
+ new
+ {
+ CollectionConfigurationErrorType = "Unknown",
+ Message = "",
+ FullException = "",
+ Data = new object[]
+ {
+ null
+ },
+ }
+ },
+});
+Response response = await client.IsSubscribedAsync("", content, transmissionTime: 1234L, machineName: "", instanceName: "", streamId: "", roleName: "", invariantVersion: "", configurationEtag: "");
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("ETag").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("Id").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("TelemetryType").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("FilterGroups")[0].GetProperty("Filters")[0].GetProperty("FieldName").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("FilterGroups")[0].GetProperty("Filters")[0].GetProperty("Predicate").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("FilterGroups")[0].GetProperty("Filters")[0].GetProperty("Comparand").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("Projection").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("Aggregation").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("BackEndAggregation").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("Id").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("DocumentFilterGroups")[0].GetProperty("TelemetryType").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("DocumentFilterGroups")[0].GetProperty("Filters").GetProperty("Filters")[0].GetProperty("FieldName").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("DocumentFilterGroups")[0].GetProperty("Filters").GetProperty("Filters")[0].GetProperty("Predicate").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("DocumentFilterGroups")[0].GetProperty("Filters").GetProperty("Filters")[0].GetProperty("Comparand").ToString());
+Console.WriteLine(result.GetProperty("QuotaInfo").GetProperty("InitialQuota").ToString());
+Console.WriteLine(result.GetProperty("QuotaInfo").GetProperty("MaxQuota").ToString());
+Console.WriteLine(result.GetProperty("QuotaInfo").GetProperty("QuotaAccrualRatePerSec").ToString());
+]]>
+
+
+
+This sample shows how to call IsSubscribed and parse the result.
+", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("ETag").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("Id").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("TelemetryType").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("FilterGroups")[0].GetProperty("Filters")[0].GetProperty("FieldName").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("FilterGroups")[0].GetProperty("Filters")[0].GetProperty("Predicate").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("FilterGroups")[0].GetProperty("Filters")[0].GetProperty("Comparand").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("Projection").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("Aggregation").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("BackEndAggregation").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("Id").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("DocumentFilterGroups")[0].GetProperty("TelemetryType").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("DocumentFilterGroups")[0].GetProperty("Filters").GetProperty("Filters")[0].GetProperty("FieldName").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("DocumentFilterGroups")[0].GetProperty("Filters").GetProperty("Filters")[0].GetProperty("Predicate").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("DocumentFilterGroups")[0].GetProperty("Filters").GetProperty("Filters")[0].GetProperty("Comparand").ToString());
+]]>
+This sample shows how to call IsSubscribed with all parameters and request content and parse the result.
+",
+ InvariantVersion = 1234,
+ Instance = "",
+ RoleName = "",
+ MachineName = "",
+ StreamId = "",
+ Timestamp = "2022-05-10T14:57:31.2311892-04:00",
+ TransmissionTime = "2022-05-10T14:57:31.2311892-04:00",
+ IsWebApp = true,
+ PerformanceCollectionSupported = true,
+ Metrics = new object[]
+ {
+ new
+ {
+ Name = "",
+ Value = 123.45,
+ Weight = 1234,
+ }
+ },
+ Documents = new object[]
+ {
+ new
+ {
+ Name = "",
+ Url = "http://localhost:3000",
+ ResponseCode = "",
+ Duration = "",
+ DocumentType = "Request",
+ DocumentStreamIds = new object[]
+ {
+ ""
+ },
+ Properties = new object[]
+ {
+ new
+ {
+ key = "",
+ value = "",
+ }
+ },
+ }
+ },
+ TopCpuProcesses = new object[]
+ {
+ new
+ {
+ ProcessName = "",
+ CpuPercentage = 1234,
+ }
+ },
+ CollectionConfigurationErrors = new object[]
+ {
+ new
+ {
+ CollectionConfigurationErrorType = "Unknown",
+ Message = "",
+ FullException = "",
+ Data = new object[]
+ {
+ null
+ },
+ }
+ },
+});
+Response response = client.IsSubscribed("", content, transmissionTime: 1234L, machineName: "", instanceName: "", streamId: "", roleName: "", invariantVersion: "", configurationEtag: "");
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("ETag").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("Id").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("TelemetryType").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("FilterGroups")[0].GetProperty("Filters")[0].GetProperty("FieldName").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("FilterGroups")[0].GetProperty("Filters")[0].GetProperty("Predicate").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("FilterGroups")[0].GetProperty("Filters")[0].GetProperty("Comparand").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("Projection").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("Aggregation").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("BackEndAggregation").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("Id").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("DocumentFilterGroups")[0].GetProperty("TelemetryType").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("DocumentFilterGroups")[0].GetProperty("Filters").GetProperty("Filters")[0].GetProperty("FieldName").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("DocumentFilterGroups")[0].GetProperty("Filters").GetProperty("Filters")[0].GetProperty("Predicate").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("DocumentFilterGroups")[0].GetProperty("Filters").GetProperty("Filters")[0].GetProperty("Comparand").ToString());
+Console.WriteLine(result.GetProperty("QuotaInfo").GetProperty("InitialQuota").ToString());
+Console.WriteLine(result.GetProperty("QuotaInfo").GetProperty("MaxQuota").ToString());
+Console.WriteLine(result.GetProperty("QuotaInfo").GetProperty("QuotaAccrualRatePerSec").ToString());
+]]>
+
+
+
+This sample shows how to call PublishAsync.
+ response = await client.PublishAsync("");
+]]>
+This sample shows how to call PublishAsync with all parameters.
+ response = await client.PublishAsync("", monitoringDataPoints: new MonitoringDataPoint[]
+{
+ new MonitoringDataPoint(
+ "",
+ 1234,
+ "",
+ "",
+ "",
+ "",
+ true,
+ true)
+ {
+ Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"),
+ TransmissionTime = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"),
+ Metrics = {new MetricPoint("", 123.45, 1234)},
+ Documents = {new Models.Request
+ {
+ Name = "",
+ Url = new Uri("http://localhost:3000"),
+ ResponseCode = "",
+ Duration = "",
+ DocumentStreamIds = {""},
+ Properties = {new KeyValuePairStringString("", "")},
+ }},
+ TopCpuProcesses = {new ProcessCpuData("", 1234)},
+ CollectionConfigurationErrors = {new CollectionConfigurationError(CollectionConfigurationErrorType.Unknown, "", "", new KeyValuePairStringString[]
+ {
+ default
+ })},
+ }
+}, configurationEtag: "", transmissionTime: 1234L);
+]]>
+
+
+
+This sample shows how to call Publish.
+ response = client.Publish("");
+]]>
+This sample shows how to call Publish with all parameters.
+ response = client.Publish("", monitoringDataPoints: new MonitoringDataPoint[]
+{
+ new MonitoringDataPoint(
+ "",
+ 1234,
+ "",
+ "",
+ "",
+ "",
+ true,
+ true)
+ {
+ Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"),
+ TransmissionTime = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"),
+ Metrics = {new MetricPoint("", 123.45, 1234)},
+ Documents = {new Models.Request
+ {
+ Name = "",
+ Url = new Uri("http://localhost:3000"),
+ ResponseCode = "",
+ Duration = "",
+ DocumentStreamIds = {""},
+ Properties = {new KeyValuePairStringString("", "")},
+ }},
+ TopCpuProcesses = {new ProcessCpuData("", 1234)},
+ CollectionConfigurationErrors = {new CollectionConfigurationError(CollectionConfigurationErrorType.Unknown, "", "", new KeyValuePairStringString[]
+ {
+ default
+ })},
+ }
+}, configurationEtag: "", transmissionTime: 1234L);
+]]>
+
+
+
+This sample shows how to call PublishAsync and parse the result.
+", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("ETag").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("Id").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("TelemetryType").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("FilterGroups")[0].GetProperty("Filters")[0].GetProperty("FieldName").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("FilterGroups")[0].GetProperty("Filters")[0].GetProperty("Predicate").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("FilterGroups")[0].GetProperty("Filters")[0].GetProperty("Comparand").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("Projection").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("Aggregation").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("BackEndAggregation").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("Id").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("DocumentFilterGroups")[0].GetProperty("TelemetryType").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("DocumentFilterGroups")[0].GetProperty("Filters").GetProperty("Filters")[0].GetProperty("FieldName").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("DocumentFilterGroups")[0].GetProperty("Filters").GetProperty("Filters")[0].GetProperty("Predicate").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("DocumentFilterGroups")[0].GetProperty("Filters").GetProperty("Filters")[0].GetProperty("Comparand").ToString());
+]]>
+This sample shows how to call PublishAsync with all parameters and request content and parse the result.
+",
+ InvariantVersion = 1234,
+ Instance = "",
+ RoleName = "",
+ MachineName = "",
+ StreamId = "",
+ Timestamp = "2022-05-10T14:57:31.2311892-04:00",
+ TransmissionTime = "2022-05-10T14:57:31.2311892-04:00",
+ IsWebApp = true,
+ PerformanceCollectionSupported = true,
+ Metrics = new object[]
+ {
+ new
+ {
+ Name = "",
+ Value = 123.45,
+ Weight = 1234,
+ }
+ },
+ Documents = new object[]
+ {
+ new
+ {
+ Name = "",
+ Url = "http://localhost:3000",
+ ResponseCode = "",
+ Duration = "",
+ DocumentType = "Request",
+ DocumentStreamIds = new object[]
+ {
+ ""
+ },
+ Properties = new object[]
+ {
+ new
+ {
+ key = "",
+ value = "",
+ }
+ },
+ }
+ },
+ TopCpuProcesses = new object[]
+ {
+ new
+ {
+ ProcessName = "",
+ CpuPercentage = 1234,
+ }
+ },
+ CollectionConfigurationErrors = new object[]
+ {
+ new
+ {
+ CollectionConfigurationErrorType = "Unknown",
+ Message = "",
+ FullException = "",
+ Data = new object[]
+ {
+ null
+ },
+ }
+ },
+ }
+});
+Response response = await client.PublishAsync("", content, configurationEtag: "", transmissionTime: 1234L);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("ETag").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("Id").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("TelemetryType").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("FilterGroups")[0].GetProperty("Filters")[0].GetProperty("FieldName").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("FilterGroups")[0].GetProperty("Filters")[0].GetProperty("Predicate").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("FilterGroups")[0].GetProperty("Filters")[0].GetProperty("Comparand").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("Projection").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("Aggregation").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("BackEndAggregation").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("Id").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("DocumentFilterGroups")[0].GetProperty("TelemetryType").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("DocumentFilterGroups")[0].GetProperty("Filters").GetProperty("Filters")[0].GetProperty("FieldName").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("DocumentFilterGroups")[0].GetProperty("Filters").GetProperty("Filters")[0].GetProperty("Predicate").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("DocumentFilterGroups")[0].GetProperty("Filters").GetProperty("Filters")[0].GetProperty("Comparand").ToString());
+Console.WriteLine(result.GetProperty("QuotaInfo").GetProperty("InitialQuota").ToString());
+Console.WriteLine(result.GetProperty("QuotaInfo").GetProperty("MaxQuota").ToString());
+Console.WriteLine(result.GetProperty("QuotaInfo").GetProperty("QuotaAccrualRatePerSec").ToString());
+]]>
+
+
+
+This sample shows how to call Publish and parse the result.
+", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("ETag").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("Id").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("TelemetryType").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("FilterGroups")[0].GetProperty("Filters")[0].GetProperty("FieldName").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("FilterGroups")[0].GetProperty("Filters")[0].GetProperty("Predicate").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("FilterGroups")[0].GetProperty("Filters")[0].GetProperty("Comparand").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("Projection").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("Aggregation").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("BackEndAggregation").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("Id").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("DocumentFilterGroups")[0].GetProperty("TelemetryType").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("DocumentFilterGroups")[0].GetProperty("Filters").GetProperty("Filters")[0].GetProperty("FieldName").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("DocumentFilterGroups")[0].GetProperty("Filters").GetProperty("Filters")[0].GetProperty("Predicate").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("DocumentFilterGroups")[0].GetProperty("Filters").GetProperty("Filters")[0].GetProperty("Comparand").ToString());
+]]>
+This sample shows how to call Publish with all parameters and request content and parse the result.
+",
+ InvariantVersion = 1234,
+ Instance = "",
+ RoleName = "",
+ MachineName = "",
+ StreamId = "",
+ Timestamp = "2022-05-10T14:57:31.2311892-04:00",
+ TransmissionTime = "2022-05-10T14:57:31.2311892-04:00",
+ IsWebApp = true,
+ PerformanceCollectionSupported = true,
+ Metrics = new object[]
+ {
+ new
+ {
+ Name = "",
+ Value = 123.45,
+ Weight = 1234,
+ }
+ },
+ Documents = new object[]
+ {
+ new
+ {
+ Name = "",
+ Url = "http://localhost:3000",
+ ResponseCode = "",
+ Duration = "",
+ DocumentType = "Request",
+ DocumentStreamIds = new object[]
+ {
+ ""
+ },
+ Properties = new object[]
+ {
+ new
+ {
+ key = "",
+ value = "",
+ }
+ },
+ }
+ },
+ TopCpuProcesses = new object[]
+ {
+ new
+ {
+ ProcessName = "",
+ CpuPercentage = 1234,
+ }
+ },
+ CollectionConfigurationErrors = new object[]
+ {
+ new
+ {
+ CollectionConfigurationErrorType = "Unknown",
+ Message = "",
+ FullException = "",
+ Data = new object[]
+ {
+ null
+ },
+ }
+ },
+ }
+});
+Response response = client.Publish("", content, configurationEtag: "", transmissionTime: 1234L);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("ETag").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("Id").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("TelemetryType").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("FilterGroups")[0].GetProperty("Filters")[0].GetProperty("FieldName").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("FilterGroups")[0].GetProperty("Filters")[0].GetProperty("Predicate").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("FilterGroups")[0].GetProperty("Filters")[0].GetProperty("Comparand").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("Projection").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("Aggregation").ToString());
+Console.WriteLine(result.GetProperty("Metrics")[0].GetProperty("BackEndAggregation").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("Id").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("DocumentFilterGroups")[0].GetProperty("TelemetryType").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("DocumentFilterGroups")[0].GetProperty("Filters").GetProperty("Filters")[0].GetProperty("FieldName").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("DocumentFilterGroups")[0].GetProperty("Filters").GetProperty("Filters")[0].GetProperty("Predicate").ToString());
+Console.WriteLine(result.GetProperty("DocumentStreams")[0].GetProperty("DocumentFilterGroups")[0].GetProperty("Filters").GetProperty("Filters")[0].GetProperty("Comparand").ToString());
+Console.WriteLine(result.GetProperty("QuotaInfo").GetProperty("InitialQuota").ToString());
+Console.WriteLine(result.GetProperty("QuotaInfo").GetProperty("MaxQuota").ToString());
+Console.WriteLine(result.GetProperty("QuotaInfo").GetProperty("QuotaAccrualRatePerSec").ToString());
+]]>
+
+
+
\ No newline at end of file
diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.LiveMetrics/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/monitor/Azure.Monitor.OpenTelemetry.LiveMetrics/src/Generated/Internal/ModelSerializationExtensions.cs
index 20ed94831bbd..dae7504308bd 100644
--- a/sdk/monitor/Azure.Monitor.OpenTelemetry.LiveMetrics/src/Generated/Internal/ModelSerializationExtensions.cs
+++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.LiveMetrics/src/Generated/Internal/ModelSerializationExtensions.cs
@@ -6,6 +6,7 @@
#nullable disable
using System;
+using System.ClientModel.Primitives;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
@@ -164,13 +165,16 @@ public static void WriteNumberValue(this Utf8JsonWriter writer, DateTimeOffset v
writer.WriteNumberValue(value.ToUnixTimeSeconds());
}
- public static void WriteObjectValue(this Utf8JsonWriter writer, object value)
+ public static void WriteObjectValue(this Utf8JsonWriter writer, object value, ModelReaderWriterOptions options = null)
{
switch (value)
{
case null:
writer.WriteNullValue();
break;
+ case IJsonModel jsonModel:
+ jsonModel.Write(writer, options ?? new ModelReaderWriterOptions("W"));
+ break;
case IUtf8JsonSerializable serializable:
serializable.Write(writer);
break;
@@ -225,7 +229,7 @@ public static void WriteObjectValue(this Utf8JsonWriter writer, object value)
foreach (var pair in enumerable)
{
writer.WritePropertyName(pair.Key);
- writer.WriteObjectValue