<commit_before>## Metrics

Heapster exports the following metrics to its backends.

| Metric Name              | Description                                                                                        | Type       | Units        | Supported Since |
|--------------------------|----------------------------------------------------------------------------------------------------|------------|--------------|-----------------|
| uptime                   | Number of millisecond since the container was started                                              | Cumulative | Milliseconds | v0.9            |
| cpu/usage                | Cumulative CPU usage on all cores                                                                  | Cumulative | Nanoseconds  | v0.9            |
| memory/usage             | Total memory usage                                                                                 | Gauge      | Bytes        | v0.9            |
| memory/working_set       | Total working set usage. Working set is the memory being used and not easily dropped by the Kernel | Gauge      | Bytes        | v0.9            |
| memory/page_faults       | Total number of page faults                                                                        | Cumulative | Count        | v0.9            |
| memory/major_page_faults | Number of major page faults                                                                        | Cumulative | Count        | HEAD            |
| network/rx               | Cumulative number of bytes received over the network                                               | Cumulative | Bytes        | v0.9            |
| network/rx_errors        | Cumulative number of errors while receiving over the network                                       | Cumulative | Count        | v0.9            |
| network/tx               | Cumulative number of bytes sent over the network                                                   | Cumulative | Bytes        | v0.9            |
| network/tx_errors        | Cumulative number of errors while sending over the network                                         | Cumulative | Count        | v0.9            |
| filesystem/usage         | Total number of bytes used on a filesystem identified by label 'resource_id'                       | Gauge      | Bytes        | v0.11.0         |

*Note: Gauge refers to instantaneous metrics*

## Labels

Heapster tags each metric with the following labels.

| Label Name     | Description                                                                   | Supported Since | Kubernetes specific |
|----------------|-------------------------------------------------------------------------------|-----------------|---------------------|
| pod_id         | Unique ID of a Pod                                                            | v0.9            | Yes                 |
| pod_name       | User-provided name of a Pod                                                   | v0.13           | Yes                 |
| pod_namespace  | The namespace of a Pod                                                        | v0.10           | Yes                 |
| container_name | User-provided name of the container or full cgroup name for system containers | v0.9            | No                  |
| labels         | Comma-separated list of user-provided labels. Format is 'key:value'           | v0.9            | Yes                 |
| hostname       | Hostname where the container ran                                              | v0.9            | No                  |
| resource_id    | An unique identifier used to differentiate multiple metrics of the same type. e.x. Fs partitions under filesystem/usage | v0.11.0 | No |


## Storage Schema

### InfluxDB

Each metric translates to a separate 'series' in InfluxDB. Labels are stored as additional columns.
The series name is constructed by combining the metric name with its type and units: "metric Name"_"units"_"type".<commit_msg>Updating docs with new labels being added.<commit_after>## Metrics

Heapster exports the following metrics to its backends.

| Metric Name              | Description                                                                                        | Type       | Units        | Supported Since |
|--------------------------|----------------------------------------------------------------------------------------------------|------------|--------------|-----------------|
| uptime                   | Number of millisecond since the container was started                                              | Cumulative | Milliseconds | v0.9            |
| cpu/usage                | Cumulative CPU usage on all cores                                                                  | Cumulative | Nanoseconds  | v0.9            |
| memory/usage             | Total memory usage                                                                                 | Gauge      | Bytes        | v0.9            |
| memory/working_set       | Total working set usage. Working set is the memory being used and not easily dropped by the Kernel | Gauge      | Bytes        | v0.9            |
| memory/page_faults       | Total number of page faults                                                                        | Cumulative | Count        | v0.9            |
| memory/major_page_faults | Number of major page faults                                                                        | Cumulative | Count        | HEAD            |
| network/rx               | Cumulative number of bytes received over the network                                               | Cumulative | Bytes        | v0.9            |
| network/rx_errors        | Cumulative number of errors while receiving over the network                                       | Cumulative | Count        | v0.9            |
| network/tx               | Cumulative number of bytes sent over the network                                                   | Cumulative | Bytes        | v0.9            |
| network/tx_errors        | Cumulative number of errors while sending over the network                                         | Cumulative | Count        | v0.9            |
| filesystem/usage         | Total number of bytes used on a filesystem identified by label 'resource_id'                       | Gauge      | Bytes        | v0.11.0         |

*Note: Gauge refers to instantaneous metrics*

## Labels

Heapster tags each metric with the following labels.

| Label Name     | Description                                                                   | Supported Since | Kubernetes specific |
|----------------|-------------------------------------------------------------------------------|-----------------|---------------------|
| pod_id         | Unique ID of a Pod                                                            | v0.9            | Yes                 |
| pod_name       | User-provided name of a Pod                                                   | v0.13           | Yes                 |
| pod_namespace  | The namespace of a Pod                                                        | v0.10           | Yes                 |
| container_name | User-provided name of the container or full cgroup name for system containers | v0.9            | No                  |
| labels         | Comma-separated list of user-provided labels. Format is 'key:value'           | v0.9            | Yes                 |
| hostname       | Hostname where the container ran                                              | v0.9            | No                  |
| namespace_id   | UID of the namespace of a Pod                                                 | v0.14.1         | Yes                 |
| host_id    | Cloud-provider specified or user specified Identifier of a node               | v0.14.1         | Yes                 |
| resource_id    | An unique identifier used to differentiate multiple metrics of the same type. e.x. Fs partitions under filesystem/usage | v0.11.0 | No |


## Storage Schema

### InfluxDB

Each metric translates to a separate 'series' in InfluxDB. Labels are stored as additional columns.
The series name is constructed by combining the metric name with its type and units: "metric Name"_"units"_"type".
{'fraction_non_alphanumeric': 0.12147401272356259, 'fraction_numerical': 0.010562957628135878, 'mean_word_length': 0.8376709307454786, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 76, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2721196', 'n_tokens_mistral': 1604, 'n_tokens_neox': 1484, 'n_words': 601}