VictoriaMetrics/VictoriaMetrics · error
missing metric name
Error message
missing metric name
What it means
Field 1 is entirely absent from the Metric message: OTEL requires every metric to carry a name, so the decoder rejects the message outright instead of guessing.
Source
Thrown at lib/protoparser/opentelemetry/pb/pb.go:671
// string unit = 3;
// oneof data {
// Gauge gauge = 5;
// Sum sum = 7;
// Histogram histogram = 9;
// ExponentialHistogram exponential_histogram = 10;
// Summary summary = 11;
// }
// repeated opentelemetry.proto.common.v1.KeyValue metadata = 12;
// }
dctx.mm.reset()
metricName, ok, err := easyproto.GetString(src, 1)
if err != nil {
return fmt.Errorf("cannot read metric name: %w", err)
}
if !ok {
return fmt.Errorf("missing metric name")
}
dctx.mm.Name = metricName
unit, ok, err := easyproto.GetString(src, 3)
if err != nil {
return fmt.Errorf("cannot read metric unit: %w", err)
}
if ok {
dctx.mm.Unit = unit
}
dctx.mm.Type = prompb.MetricTypeUnknown
lsMetadata := promutil.GetLabels()
defer promutil.PutLabels(lsMetadata)
var fc easyproto.FieldContext
for len(src) > 0 {View on GitHub (pinned to 5079fb58f1)
Solutions
- Set a non-empty instrument name on every metric in the exporter/SDK
- Check instrumentation code for metrics created without a name
- Reject or fix unnamed metrics before export
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at lib/protoparser/opentelemetry/pb/pb.go:671 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of VictoriaMetrics/VictoriaMetrics@5079fb58f1 (2026-09-03).
Data as JSON: /api/errors/6e4ecc046c684164.
Report an issue: GitHub.