示例#1
0
        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);
        }
示例#2
0
        public string Serialize(object metricsDeclaration)
        {
            Guard.NotNull(metricsDeclaration, nameof(metricsDeclaration));

            var serializer            = YamlSerialization.CreateSerializer();
            var rawMetricsDeclaration = serializer.Serialize(metricsDeclaration);

            return(rawMetricsDeclaration);
        }
示例#3
0
        public string Build()
        {
            var metricsDeclaration = new MetricsDeclaration
            {
                AzureMetadata = azureMetadata,
                Metrics       = metrics
            };

            var serializer = YamlSerialization.CreateSerializer();

            return(serializer.Serialize(metricsDeclaration));
        }