private void LogMetricsDeclaration(MetricsDeclaration metricsDeclaration) { metricsDeclaration.Metrics.ForEach(SanitizeStorageQueueDeclaration); var serializer = YamlSerialization.CreateSerializer(); var rawDeclaration = serializer.Serialize(metricsDeclaration); Logger.LogInformation("Following metrics configuration was configured:\n{Configuration}", rawDeclaration); }
public string Serialize(object metricsDeclaration) { Guard.NotNull(metricsDeclaration, nameof(metricsDeclaration)); var serializer = YamlSerialization.CreateSerializer(); var rawMetricsDeclaration = serializer.Serialize(metricsDeclaration); return(rawMetricsDeclaration); }
public string Build() { var metricsDeclaration = new MetricsDeclaration { AzureMetadata = azureMetadata, Metrics = metrics }; var serializer = YamlSerialization.CreateSerializer(); return(serializer.Serialize(metricsDeclaration)); }