fix(observability): target process PID datapoints

Use the Collector datapoint context so process_pid is removed only from process metric datapoints. Keep the shared resource process.pid intact for sibling and lock metrics.

Co-Authored-By: heihutu <heihutu@gmail.com>

Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
This commit is contained in:
Hauser Zhi
2026-11-06 00:56:48 +08:00
parent 4e063554ec
commit 72ef78ef27
@@ -34,9 +34,9 @@ processors:
# RustFS process metrics already expose process_pid as a metric label.
# Remove only the duplicate datapoint label and keep the shared resource
# process.pid available to sibling metrics and lock histograms.
- context: metric
- context: datapoint
statements:
- delete_key(attributes, "process_pid") where IsMatch(name, "^rustfs_system_process_")
- delete_key(attributes, "process_pid") where IsMatch(metric.name, "^rustfs_system_process_")
transform/logs:
error_mode: ignore
log_statements: