grafana / alloy-modules

Apache License 2.0
21 stars 11 forks source link

feat: Custom job label #51

Open adamhackl opened 1 week ago

adamhackl commented 1 week ago

In modules/kubernetes/annotations/metrics.alloy and modules/kubernetes/annotations/logs/logs.alloy add an attribute job_format which defaults to $1/$2. This equals namespace/pod_controller_name. But since its set by that attribute, it can be overridden to something different. An example is that I am setting it to $2 so the job name doesn't have the namespace in it and matches the log job names. The default behavior is the same as before this change.