Hey, I'm working on a project that implements OpenTelemetry metrics on our Jenkins and one problem that we found out is the metrics related to
sh are pushed to Prometheus using just
sh as reference but we want to set the command executed by sh as label to be easier to identify them.
Some options available are:
- Write a wrapper to set the labels dynamically on sh based on the command;
- Set label on each sh call.
They work but I want something that could be implemented without need to change all the sh calls inside of the code.
Is there any way to implement this?