Cardinality is the number of distinct label-value combinations, or dimensions, represented in a telemetry data set. In Prometheus metrics, every added label can create additional series and collected values. section 5.6.1 section 7.5.2
Treat cardinality as an operational design choice. Stable labels such as server name, type, ID, exporter, or service group support querying, fault diagnosis, and event correlation, while uncontrolled values can significantly affect exporter behavior. section 5.6.1 section 7.5.2
Evaluate cardinality by checking:
- How many possible values each metric dimension can take. section 7.5.2
- Whether a label adds useful diagnostic or correlation value. section 5.6.1
- Whether each dimension creates additional values that Fluent Bit must collect and calculate. section 7.5.2
Listing 5.6 Prometheus exporter: prometheus-exporter-output.conf
[SERVICE] flush 5 log_level info [INPUT] name node_exporter_metrics #1 tag node_metrics scrape_interval 5 #2 [OUTPUT] name prometheus_exporter #3 match * port 9885 #4 host 0.0.0.0 add_label fluentbit exporter #5
A Prometheus exporter configuration adds the constant fluentbit="exporter" label; generated metrics then combine it with dimensions such as CPU mode, CPU number, and disk device. section 5.6.1
Dimensioning metrics from logs
A log-to-metrics configuration uses label_field greeting, producing separate counter values for bonjour, goodbye, and hello. A second counter omits that dimension and reports one total for all messages. The comparison makes the cardinality trade-off visible. section 7.5.2







