github.com/hellofresh/janus@v0.0.0-20230925145208-ce8de8183c67/docs/misc/monitoring.md (about)

     1  # Monitoring
     2  
     3  `Janus` uses [OpenCensus](https://opencensus.io) to collect and export metrics. OpenCensus supports several exporters, which are:
     4  - Datadog
     5  - Prometheus
     6  - Stackdriver
     7  
     8  Currently only Prometheus exporter is available in `Janus`.
     9  
    10  This can be configured via the configuration file or environment variable:
    11  
    12  ```toml
    13  # Stats / Metric Collection
    14  
    15  [stats]
    16    # Backend system used to export collected metrics
    17    #
    18    # Valid Values: "datadog", "prometheus", or "stackdriver"
    19    #
    20    # Default: None
    21    #
    22    Exporter: "prometheus"
    23  ```
    24  
    25  ---
    26  
    27  ###### The following feature is deprecated and it is planned for removal.
    28  
    29  ---
    30  
    31  `Janus` monitoring is built on top of [`hellofresh/stats-go`](https://github.com/hellofresh/stats-go) library.
    32  You can configure it with the following env variables:
    33  
    34  * `STATS_DSN` (default `log://`) - DSN of stats backend
    35  * `STATS_IDS` - second level ID list for URLs to generalise metric names, see details in [Generalise resources by type and stripping resource ID](https://github.com/hellofresh/stats-go#generalise-resources-by-type-and-stripping-resource-id)
    36  * `STATS_AUTO_DISCOVER_THRESHOLD` - threshold for second level IDs autodiscovery, see details in [Generalise resources by type and stripping resource ID](https://github.com/hellofresh/stats-go#generalise-resources-by-type-and-stripping-resource-id)
    37  * `STATS_AUTO_DISCOVER_WHITE_LIST` - white list for second level IDs autodiscovery, see details in [Generalise resources by type and stripping resource ID](https://github.com/hellofresh/stats-go#generalise-resources-by-type-and-stripping-resource-id)
    38  * `STATS_ERRORS_SECTION` (default `error-log`) - section for error logs monitoring, see details in [Usage for error logs monitoring](https://github.com/hellofresh/stats-go#usage-for-error-logs-monitoring-using-githubcomsirupsenlogrus)