Nice.

Note that I pointed this out to the WakaTime owner (friend of mine), so
it's linked off of https://wakatime.com/community now :)

On Sat, Aug 22, 2020 at 11:18 PM Jacob Colvin <[email protected]>
wrote:

> Hello Prometheus Developers,
>
> I recently created my first exporter in Go, wakatime_exporter, which
> basically just converts data from the Wakatime API into the Prometheus
> exposition format.
>
> https://github.com/MacroPower/wakatime_exporter
>
> I've been running it for a few weeks now and am happy with the results.
> But, I'm sure there are a lot of things I could have done better,
> specifically in terms of the design of the exporter. My code is all based
> on the HAProxy exporter, but my changes have been significant enough that
> it doesn't very closely resemble it anymore.
>
> If any of you have time, I would greatly appreciate any feedback you might
> have. But, to give one thing I'm specifically concerned about: I feel like
> there is just too much duplication in my code. I separated my exporter into
> different modules for each Wakatime endpoint, because I had seen similar
> architecture in other exporters (and I think it generally makes sense for a
> number of other reasons). But the result is each modules' NewExporter,
> Collect, and Describe functions being nearly identical to each other. Does
> anyone know any way I could solve this?
>
> Thank you!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Prometheus Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/prometheus-developers/d61fe504-d5da-41e5-a495-6e50489aa43fn%40googlegroups.com
> <https://groups.google.com/d/msgid/prometheus-developers/d61fe504-d5da-41e5-a495-6e50489aa43fn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-developers/CA%2BT6YoxJP2RYEErKyvVvOgE9hxGUa3ywp6wWj7fzTKC%3D3gBjfA%40mail.gmail.com.

Reply via email to