Yes, you can use the Grouping() method to add other labels to the grouping key: https://pkg.go.dev/github.com/prometheus/client_golang/prometheus/push#Pusher.Grouping - it returns a new Pusher with the new label added.
Note that instance-level usage of the Pushgateway is not usually encouraged (see https://prometheus.io/docs/practices/pushing/#when-to-use-the-pushgateway for why). On Tue, Apr 18, 2023 at 3:36 PM Aaron Reisman <[email protected]> wrote: > The Pushgateway's documentation includes the ability to delete all metrics > for a given job and instance label. > > curl -X DELETE > http://pushgateway.example.org:9091/metrics/job/some_job/instance/some_instance > > The Prometheus go client has support for making a pusher for a specific > job label, but doesn't appear to have anywhere to specify the instance > label. Does anyone know if there is a way, using the go library, to delete > metrics for a specific job and instance label pair? > > Thanks, > Aaron > > -- > You received this message because you are subscribed to the Google Groups > "Prometheus Users" 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-users/6e8eadf6-cba1-4838-afce-1f0546805674n%40googlegroups.com > <https://groups.google.com/d/msgid/prometheus-users/6e8eadf6-cba1-4838-afce-1f0546805674n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Julius Volz PromLabs - promlabs.com -- You received this message because you are subscribed to the Google Groups "Prometheus Users" 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-users/CAObpH5zOijeF8w0%2BHjpjEfrvPomizmM%2BjkvpEkRcTMA%2BviSZNw%40mail.gmail.com.

