...
├── output.py
├── output_methods
│ ├── init.py
│ ├── base_output.py
│ ├── emissions_data.py
│ ├── file.py
│ ├── http.py
│ ├── logger.py
│ └── metrics
│ ├── init.py
│ ├── metric_docs.py <==== contains metrics docs to be reused if we want to create other metrics (e.g. opentelemetry)
│ └── prometheus
│ ├── init.py
│ ├── metrics.py
│ └── prometheus.py
* The output methods are split by type (file output, output to logger, http, metrics...)
* `output.py` is only to simplify imports (we can remove it if needed)
Goal of this PR
Refactor output so it is easier to add new output methods.
Before this PR
output.py
file contains all the methods to output the emissions data.prometheus
folder contains the files to initialize thePrometheousOutput
... ├── output.py ├── output_methods │ ├── init.py │ ├── base_output.py │ ├── emissions_data.py │ ├── file.py │ ├── http.py │ ├── logger.py │ └── metrics │ ├── init.py │ ├── metric_docs.py <==== contains metrics docs to be reused if we want to create other metrics (e.g. opentelemetry) │ └── prometheus │ ├── init.py │ ├── metrics.py │ └── prometheus.py