4 ms·
Are you collecting data from your own program or from other programs? On a separate note: I don't think it's a good idea to "abstract" different metrics publis
by crabbone 3y ago
Are you collecting data from your own program or from other programs?
On a separate note: I don't think it's a good idea to "abstract" different metrics publishers. Just like it's not a good idea with "abstracting" SQL database by using a made-up SQL-like language.
In reality, publishers are very different. If you try to find an intersection of their features, you end up with a very small subset of what either one of them has to offer. On top of that, there are often subtle differences in semantics or in collection procedures that aren't immediately apparent, but may cause serious miscalculations downstream if you try to substitute one for the other.
If, in practice, if you want to bridge between different publishers, the best way to accomplish it is to have both publishers working together and have some import/export mechanism between them. Often such import/export mechanisms are developed by publishers themselves (eg. Prometheus "exporter" for collectd), so you have something that's more reliable than a third-party library trying to mediate between two different publishers (which is bound to always play catch with those publishers in terms of feature support).