VictoriaMetrics/VictoriaMetrics · error

cannot read IntValue

Error message

cannot read IntValue

What it means

Thrown in decodeAnyValueToJSON when field number 3 (int value, int64) cannot be decoded from the wire by easyproto's fc.Int64(), indicating a malformed AnyValue int payload. This aborts decoding of the enclosing KeyValue/ArrayValue and the entire OTLP request.

Source

Thrown at lib/protoparser/opentelemetry/pb/pb_json.go:87

			stringValue, ok := fc.String()
			if !ok {
				return nil, fmt.Errorf("cannot read StringValue")
			}
			return a.NewString(stringValue), nil
		case 2:
			boolValue, ok := fc.Bool()
			if !ok {
				return nil, fmt.Errorf("cannot read BoolValue")
			}
			if boolValue {
				return a.NewTrue(), nil
			} else {
				return a.NewFalse(), nil
			}
		case 3:
			intValue, ok := fc.Int64()
			if !ok {
				return nil, fmt.Errorf("cannot read IntValue")
			}
			if intValue >= math.MinInt && intValue <= math.MaxInt {
				return a.NewNumberInt(int(intValue)), nil
			}
			return a.NewNumberFloat64(float64(intValue)), nil
		case 4:
			doubleValue, ok := fc.Double()
			if !ok {
				return nil, fmt.Errorf("cannot read DoubleValue")
			}
			return a.NewNumberFloat64(doubleValue), nil
		case 5:
			data, ok := fc.MessageData()
			if !ok {
				return nil, fmt.Errorf("cannot read ArrayValue")
			}
			arr, err := decodeArrayValueToJSON(data, a, fb)
			if err != nil {

View on GitHub (pinned to 5079fb58f1)

Solutions

  1. Verify the exporter client encodes int64 AnyValue fields as proper varints
  2. Upgrade the client's protobuf runtime if it emits corrupt wire data
  3. Inspect raw payload bytes to locate the malformed field
  4. Return InvalidArgument to the sender so it can fix its serialization
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at lib/protoparser/opentelemetry/pb/pb_json.go:87 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/395c5f801772bedd. Report an issue: GitHub.