daml/ledger/metrics/collection
Gary Verhaegen dfa648f585
hunt down DAML better (#13195)
Process:

- `git ls-files -z | xargs -0 -n 100 sed -i --follow-symlinks 's/DAML/Daml/g'`
- `git add -p`
- `git restore -p`
- Check there is no unstaged change left.

To review:

- Check for false positives by carefully reviewing the diff in this PR.
- Check for false negatives with `git grep DAML`.
- Quicker check for fals positives:

```
git grep DAML | grep -v migration | grep -v DAML_
```

Fixes #13190

Note: This is the "second half" of #13191, which failed to cover all the
remaining DAMLs because of:

```
$ git ls-files | grep "'"
compiler/damlc/tests/daml-test-files/MangledScenario'.daml
```

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-08 17:04:58 +01:00
..
grafana hunt down DAML better (#13195) 2022-03-08 17:04:58 +01:00
graphite Enhanced docker-compose Graphite/Grafana (#9067) 2021-03-11 17:34:43 +01:00
docker-compose.yml update copyright headers (#12240) 2022-01-03 16:36:51 +00:00
README.md Enhanced docker-compose Graphite/Grafana (#9067) 2021-03-11 17:34:43 +01:00
reset-all.sh update copyright headers (#12240) 2022-01-03 16:36:51 +00:00
summary.js update copyright headers (#12240) 2022-01-03 16:36:51 +00:00

Basic Usage

  1. Launch Grafana & Graphite:

    $ docker-compose up -d
    
  2. Explore available dashboards:

    $ open http://localhost:3000/
    
    # login with admin/admin
    
  3. Power off when done:

    $ docker-compose down
    

Fresh Restart

This will purge all data and configuration changes, and restart Graphite and Grafana:

$ reset-all.sh

Customizing Graphite

After startup, you can explore and adjust the current Graphite configuration in ./graphite/conf. Configuration changes remain effective after restarts, but they will be purged by reset-all.sh. At the first start, i.e., if the configuration directory is empty, Graphite will reset the configuration to the default.

If you want to change the default configuration, put your adjusted configuration files into ./graphite/default_conf. Changes to the default configuration will not be purged by reset-all.sh.

The following changes have been made to the default configuration:

  • storage-aggregation.conf: Removed a section that would aggregate metrics ending in .count using sum. Such metrics will be aggregated by using the avg function instead. Rationale: Codahale Meters and Counters will report metrics ending in .count containing the total number of events measured. Such metrics need to be aggregated with the avg function, as they reflect the total number of events (as opposed to the delta w.r.t. the last report).

  • storage-aggregation.conf: Changed the default xFilesFactor from 0.3 to 0.0. Rationale: If a metric is reported only once per minute, Graphite would discard the metric values after the first aggregation step.

  • storage-schemas.conf: Changed the default retention schedule to 10s:7d,1m:30d,10m:1800d.

Customizing Grafana

The easiest way to customize Grafana is through the web ui. Changes will be persisted to the Grafana db and remain effective after restarts.

You can also import dashboards programmatically:

  1. Export the dashboard to a json file through the Grafana UI. (Go to the dashboard, share, export, ...)
  2. Put the dashboard file into ./grafana/dashboards
  3. Restart: docker-compose restart.