Skip to content

Remove surplus sort of labels in Ingester #1911

Closed
@bboreham

Description

@bboreham

This is not a documented feature of the remote write protocol; it happens to be the way Prometheus 2 works but Prometheus 1 didn't send labels sorted.

if strings.Compare(lastLabelName, label.Name) >= 0 {
return 0, fmt.Errorf("Labels not sorted")

If we decide Cortex has this requirement we should document it and remove the surplus Sort() here:

sort.Sort(internedLabels)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions