The original exporter supported only bitcoin core blockchain, the other ones that I tested - bitcoinabc and litecoin were having failing RPC calls and the exporter would not proceed further.
The reason was that all calls were into a single function and if one of them fails the other ones won't be executed. That made the exporter unusable for UTXO blockchains besides bitcoin core.
Implementation
Every RPC call and the setting of corresponding prometheus metrics was moved into separate function. Error handling was refactored to be per RPC call and the ability to control which calls will be executed by supplying env vars was added.
This adds flexibility to decide what data do you want to get which improves speed and adds support to much more UTXO blockchains.
Background
The original exporter supported only bitcoin core blockchain, the other ones that I tested - bitcoinabc and litecoin were having failing RPC calls and the exporter would not proceed further. The reason was that all calls were into a single function and if one of them fails the other ones won't be executed. That made the exporter unusable for UTXO blockchains besides bitcoin core.
Implementation
Every RPC call and the setting of corresponding prometheus metrics was moved into separate function. Error handling was refactored to be per RPC call and the ability to control which calls will be executed by supplying env vars was added. This adds flexibility to decide what data do you want to get which improves speed and adds support to much more UTXO blockchains.