generateDatadogSeries() {
		const series = [];

		const now = this.posixTimestamp(Date.now());

		this.registry.store.forEach(metric => {
			// Filtering
			if (!this.matchMetricName(metric.name)) return;
			// Skip datetime metrics (register too much labels)
			if (metric.name.startsWith("os.datetime")) return;

			/* More info: https://docs.datadoghq.com/api/?lang=bash#post-timeseries-points

				metric [required]:
					The name of the timeseries
				type [optional, default=gauge]:
					Type of your metric either: gauge, rate, or count
				interval [optional, default=None]:
					If the type of the metric is rate or count, define the corresponding interval.
				points [required]:
					A JSON array of points. Each point is of the form:
					[[POSIX_timestamp, numeric_value], ...]
					Note: The timestamp should be in seconds, current, and its format should be a 32bit float gauge-type value. Current is defined as not more than 10 minutes in the future or more than 1 hour in the past.
				host [optional]:
					The name of the host that produced the metric.
				tags [optional, default=None]:
					A list of tags associated with the metric.
			*/

			const snapshot = metric.snapshot();
			if (snapshot.length == 0) return;

			switch (metric.type) {
				case METRIC.TYPE_COUNTER:
				case METRIC.TYPE_GAUGE: {
					snapshot.forEach(item => {
						series.push({
							metric: this.formatMetricName(metric.name),
							type: "gauge",
							points: [[now, item.value]],
							tags: this.labelsToTags(item.labels),
							host: this.opts.host
						});
					});

					break;
				}
				/*case METRIC.TYPE_INFO: {
					series.push(`# HELP ${metricName} ${metricDesc}`);
					series.push(`# TYPE ${metricName} gauge`);
					snapshot.forEach(item => {
						const labelStr = this.labelsToStr(item.labels, { value: item.value });
						series.push(`${metricName}${labelStr} 1`);
					});
					series.push("");

					break;
				}*/
				case METRIC.TYPE_HISTOGRAM: {
					snapshot.forEach(item => {
						if (item.buckets) {
							Object.keys(item.buckets).forEach(le => {
								series.push({
									metric: this.formatMetricName(metric.name + ".bucket_" + le),
									type: "rate",
									points: [[now, item.buckets[le]]],
									tags: this.labelsToTags(item.labels),
									host: this.opts.host
								});
							});
							// +Inf
							series.push({
								metric: this.formatMetricName(metric.name + ".bucket_inf"),
								type: "rate",
								points: [[now, item.count]],
								tags: this.labelsToTags(item.labels),
								host: this.opts.host
							});
						}

						if (item.quantiles) {
							Object.keys(item.quantiles).forEach(key => {
								series.push({
									metric: this.formatMetricName(metric.name + ".q" + key),
									type: "rate",
									points: [[now, item.quantiles[key]]],
									tags: this.labelsToTags(item.labels),
									host: this.opts.host
								});
							});

							// Add other calculated values
							series.push({
								metric: this.formatMetricName(metric.name + ".sum"),
								type: "rate",
								points: [[now, item.sum]],
								tags: this.labelsToTags(item.labels),
								host: this.opts.host
							});

							series.push({
								metric: this.formatMetricName(metric.name + ".count"),
								type: "rate",
								points: [[now, item.count]],
								tags: this.labelsToTags(item.labels),
								host: this.opts.host
							});

							series.push({
								metric: this.formatMetricName(metric.name + ".min"),
								type: "rate",
								points: [[now, item.min]],
								tags: this.labelsToTags(item.labels),
								host: this.opts.host
							});

							series.push({
								metric: this.formatMetricName(metric.name + ".mean"),
								type: "rate",
								points: [[now, item.mean]],
								tags: this.labelsToTags(item.labels),
								host: this.opts.host
							});

							series.push({
								metric: this.formatMetricName(metric.name + ".variance"),
								type: "rate",
								points: [[now, item.variance]],
								tags: this.labelsToTags(item.labels),
								host: this.opts.host
							});

							series.push({
								metric: this.formatMetricName(metric.name + ".stddev"),
								type: "rate",
								points: [[now, item.stdDev]],
								tags: this.labelsToTags(item.labels),
								host: this.opts.host
							});

							series.push({
								metric: this.formatMetricName(metric.name + ".max"),
								type: "rate",
								points: [[now, item.max]],
								tags: this.labelsToTags(item.labels),
								host: this.opts.host
							});
						}
					});
					break;
				}
			}
		});

		return series;
	}
Generate Datadog metric data.
@returns {Array<Object>}

@memberof DatadogReporter