BigW Consortium Gitlab

influxdb_schema.md 3.09 KB
Newer Older
1 2 3 4
# InfluxDB Schema

The following measurements are currently stored in InfluxDB:

5 6 7 8 9 10 11
- `PROCESS_file_descriptors`
- `PROCESS_gc_statistics`
- `PROCESS_memory_usage`
- `PROCESS_method_calls`
- `PROCESS_object_counts`
- `PROCESS_transactions`
- `PROCESS_views`
12

13 14
Here, `PROCESS` is replaced with either `rails` or `sidekiq` depending on the
process type. In all series, any form of duration is stored in milliseconds.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34

## PROCESS_file_descriptors

This measurement contains the number of open file descriptors over time. The
value field `value` contains the number of descriptors.

## PROCESS_gc_statistics

This measurement contains Ruby garbage collection statistics such as the amount
of minor/major GC runs (relative to the last sampling interval), the time spent
in garbage collection cycles, and all fields/values returned by `GC.stat`.

## PROCESS_memory_usage

This measurement contains the process' memory usage (in bytes) over time. The
value field `value` contains the number of bytes.

## PROCESS_method_calls

This measurement contains the methods called during a transaction along with
35 36
their duration, and a name of the transaction action that invoked the method (if
available). The method call duration is stored in the value field `duration`,
37 38 39 40
while the method name is stored in the tag `method`. The tag `action` contains
the full name of the transaction action. Both the `method` and `action` fields
are in the following format:

41 42 43
```
ClassName#method_name
```
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59

For example, a method called by the `show` method in the `UsersController` class
would have `action` set to `UsersController#show`.

## PROCESS_object_counts

This measurement is used to store retained Ruby objects (per class) and the
amount of retained objects. The number of objects is stored in the `count` value
field while the class name is stored in the `type` tag.

## PROCESS_transactions

This measurement is used to store basic transaction details such as the time it
took to complete a transaction, how much time was spent in SQL queries, etc. The
following value fields are available:

60 61 62 63 64 65 66
| Value | Description |
| ----- | ----------- |
| `duration`  | The total duration of the transaction |
| `allocated_memory` | The amount of bytes allocated while the transaction was running. This value is only reliable when using single-threaded application servers |
| `method_duration` | The total time spent in method calls |
| `sql_duration` | The total time spent in SQL queries |
| `view_duration` | The total time spent in views |
67 68 69 70 71 72

## PROCESS_views

This measurement is used to store view rendering timings for a transaction. The
following value fields are available:

73 74 75 76
| Value | Description |
| ----- | ----------- |
| `duration` | The rendering time of the view |
| `view` | The path of the view, relative to the application's root directory |
77 78 79

The `action` tag contains the action name of the transaction that rendered the
view.
80 81 82 83 84

---

Read more on:

85
- [Introduction to GitLab Performance Monitoring](introduction.md)
86 87
- [GitLab Configuration](gitlab_configuration.md)
- [InfluxDB Configuration](influxdb_configuration.md)
88
- [Grafana Install/Configuration](grafana_configuration.md)