private static void WriteMetricValue <T>( IMetricSnapshotWriter writer, string context, MetricValueSourceBase <T> valueSource, string field, object value, DateTime timestamp) { var tags = ConcatMetricTags(valueSource); if (valueSource.IsMultidimensional) { writer.Write( context, valueSource.MultidimensionalName, field, value, tags, timestamp); return; } writer.Write(context, valueSource.Name, field, value, tags, timestamp); }
private static void WriteMetricWithSetItems <T>( IMetricSnapshotWriter writer, string context, MetricValueSourceBase <T> valueSource, MetricTags setItemTags, IDictionary <string, object> itemData, string metricSetItemSuffix, DateTime timestamp) { var keys = itemData.Keys.ToList(); var values = keys.Select(k => itemData[k]); var tags = ConcatMetricTags(valueSource, setItemTags); if (valueSource.IsMultidimensional) { writer.Write( context, valueSource.MultidimensionalName + metricSetItemSuffix, keys, values, tags, timestamp); return; } writer.Write(context, valueSource.Name + metricSetItemSuffix, keys, values, tags, timestamp); }
private static void WriteMetric <T>( IMetricSnapshotWriter writer, string context, MetricValueSourceBase <T> valueSource, IDictionary <string, object> data, DateTime timestamp) { var keys = data.Keys.ToList(); var values = keys.Select(k => data[k]); var tags = ConcatMetricTags(valueSource); if (valueSource.IsMultidimensional) { writer.Write( context, valueSource.MultidimensionalName, keys, values, tags, timestamp); return; } writer.Write(context, valueSource.Name, keys, values, tags, timestamp); }