Open ptodev opened 4 months ago
Hi, I'm really happy this is proposed! I wanted to add that the same functionality would be applicable to metrics, not only logs. E.g. we have some vendor systems which can natively push prometheus / otel but where we can't specify custom label-sets at the source. I would also advocate for the list approach as it's much more flexible. Even better would be some set theory as e.g. you might want to join the label-sets by hostname [OR/AND] by IP.
Background
If you use a component such as
loki.source.syslog
, you may want to add extra labels to your logs usingdiscovery
components such asdiscovery.http
. This is not possible at the moment.Proposal
One way to do this in the future would be to have a new component which works as follows:
join_label
argument. By default this could be set to__address__
.discovery.http
.loki.source.syslog
, it will:join_label
.A few notes:
join_label
be a string or a list? If it's a list, all labels in the list must be the same in the sets of "log" and "discovery" labels.