我已经测试了在新 Azure 门户中创建经典存储帐户 ( manage.windowsazure.com ) 和“新”存储帐户。对它们进行类似的设置并运行相同的代码来创建和配置队列。但指标仅显示门户中的经典存储帐户(能够在新门户中查看两个帐户)
我已经像这样设置了 ServiceProperties,并且可以在获取服务属性或在 Azure 门户中查看时成功看到保存的这些更改。
CloudStorageAccount storageAccount =
CloudStorageAccount.parse(storageConnectionString);
CloudQueueClient queueClient = storageAccount.createCloudQueueClient();
MetricsProperties metricsProperties = new MetricsProperties();
metricsProperties.setMetricsLevel(MetricsLevel.SERVICE_AND_API);
metricsProperties.setRetentionIntervalInDays(2);
LoggingProperties loggingProperties = new LoggingProperties();
loggingProperties.setRetentionIntervalInDays(10);
loggingProperties.setLogOperationTypes(EnumSet.of(LoggingOperations.READ, LoggingOperations.WRITE, LoggingOperations.DELETE));
ServiceProperties serviceProperties = new ServiceProperties();
serviceProperties.setHourMetrics(metricsProperties);
serviceProperties.setMinuteMetrics(metricsProperties);
serviceProperties.setLogging(loggingProperties);
queueClient.uploadServiceProperties(serviceProperties);
当我使用 Microsoft Azure 存储资源管理器时,两个帐户都设置了指标表和日志记录,因此两者看起来都像这样,并且表包含数据。所以从这里看起来很相似。但指标图表和选项仅适用于 Azure 门户中的经典存储帐户。对于“新”存储帐户,它只显示“无可用数据”。
这是一个错误吗?还是经典存储帐户默认配置了一些我需要手动应用到新存储帐户以使其行为相似的属性?