-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Closed
Description
Bug Description
In storage/remote/otlptranslator/prometheusremotewrite/number_data_points.go, the addSumNumberDataPoints function silently swallows errors from createAttributes:
lbls, err := c.createAttributes(
pt.Attributes(),
settings,
nil,
true,
meta,
model.MetricNameLabel,
meta.MetricFamilyName,
)
if err != nil {
return nil // BUG: should be "return err"
}Compare with addGaugeNumberDataPoints in the same file which correctly returns the error:
if err != nil {
return err
}Impact
When createAttributes fails for sum metrics, the error is silently discarded and processing continues. This could lead to:
- Silent data loss (sum metrics not being written)
- Difficult-to-debug issues in OTLP ingestion pipelines
Root Cause
The bug was introduced in #16951 during a refactor. The original code had return err, but it was accidentally changed to return nil.
Suggested Fix
if err != nil {
- return nil
+ return err
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels