Skip to content

expfmt: Consider filter the illegal metrics rather than drop all the metrics #105

@i19

Description

@i19

common/expfmt/decode.go

Lines 104 to 108 in 2f17f4a

if !model.LabelValue(l.GetValue()).IsValid() {
return fmt.Errorf("invalid label value %q", l.GetValue())
}
if !model.LabelName(l.GetName()).IsValid() {
return fmt.Errorf("invalid label name %q", l.GetName())

Rather than return error cause losing the whole metrics, it would be reasonable to just filter them and log it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions