Standard path for mixins

23 views
Skip to first unread message

Ben Kochie

unread,
Mar 3, 2021, 9:47:55 AM3/3/21
to Prometheus Developers
We currently have mixins spread out over various paths within each repository. It would be nice if there was a standard path for this.

What do people think of having all projects keep their mixins in `/monitoring-mixin`?

alertmanager/doc/alertmanager-mixin
mysqld_exporter/mysqld-mixin
node_exporter/docs/node-mixin
prometheus/documentation/prometheus-mixin

Tom Wilkie

unread,
Mar 3, 2021, 9:59:57 AM3/3/21
to Ben Kochie, Frederic Branczyk, Prometheus Developers
@Frederic Branczyk should weigh in on this, but I believe the module name == the directory name in jsonnet bundler, so if we call them all monitoring-mixin then it will make it tricky to import multiple ones into the same project.  So with that in mind I like "<project>-mixin".

But we could be more consistent about root-of-repo vs docs vs documentation directories...

Tom

--
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 prometheus-devel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/CABbyFmrhhG-%3DEQcb2zm%3Dkc2%3DuqX7nxHb2%3D6YG8cgTNec-fqdRQ%40mail.gmail.com.

Frederic Branczyk

unread,
Mar 3, 2021, 10:08:32 AM3/3/21
to Tom Wilkie, Ben Kochie, Prometheus Developers
In newer versions of jsonnet-bundler this is not strictly necessary anymore, the module name has been only a “legacy” import option for the last year (I just checked the version allowing it went out almost to the day exactly a year ago). If there are conflicts the absolute (go import style) full module name must be specified, which might be nice way to move the ecosystem forward anyways.

I don’t think this should stop us from doing this, I don’t feel strongly one way or the other about the directory structure itself though I agree we could be more consistent.

Matthias Loibl

unread,
Mar 3, 2021, 10:34:37 AM3/3/21
to Prometheus Developers
Hi,
agreed to what has been said so far.

Do you simply want more consistency or is it for discoverability too, Ben?
The latter should be solved with https://monitoring.mixins.dev

Ben Kochie

unread,
Mar 3, 2021, 10:38:46 AM3/3/21
to Matthias Loibl, Prometheus Developers
* Make it easier to find in the repo.
* Make testing easier.


Reply all
Reply to author
Forward
0 new messages