[Feature] Add separate controls for Target tags and heartbeat host_tags
Author: devops-fjCreated Aug 28, 2026Updated Aug 28, 2026
Problem
Nightingale currently appends both Target.tags and Target.host_tags to
remote_write time series.
LabelRewrite = false only prevents overwriting labels with the same key. It
does not prevent missing labels from being appended.
This may mix stale heartbeat labels with current metric labels.
For example:
Current metric:
label_type=current_value
state=current_state
role=current_role
Cached Target host_tags:
service=old_service
cluster=old_cluster
label_type=old_value
The final metric may become:
label_type=current_value
state=current_state
role=current_role
service=old_service
cluster=old_cluster
This is an incorrect combination of labels from different versions of the
target metadata.
## Proposal
Please add two independent configuration options:
[Pushgw]
EnableTargetTagAppend = true
EnableTargetHostTagAppend = false
Expected behavior:
- EnableTargetTagAppend controls whether user-defined Target.tags are
appended to remote_write series;
- EnableTargetHostTagAppend controls whether heartbeat-reported
Target.host_tags are appended to remote_write series;
- LabelRewrite continues to control replacement of same-name labels;
- heartbeat processing, Target management and business group binding remain
unchanged;
- both options should default to true for backward compatibility.
This allows deployments that already enrich metrics upstream to disable stale
heartbeat labels while continuing to use custom Target tags.Source: ccfos/nightingale