Skip to content

Invalid labels will create invalid Metrics page #91

@AlexanderWells-diamond

Description

@AlexanderWells-diamond

If you attempt to add a label to a metric that is invalid, that label is emitted in the Metrics page.

For example, passing in a labels object of 'pv' : 'CALC\{(A%2)}(BL05J-VA-IOC-02:HEARTBEAT)', will result in an output of:
coniql_dropped_updates{pv="CALC\{(A%2)}(BL05J-VA-IOC-02:HEARTBEAT)",type="value"} 0

This sort of thing seems to violate the Escaping section of the OpenMetrics spec. I've observed the same when my Prometheus instance fails to parse the output.

I believe there just needs to be a check added to this function that performs additional validation of the label's contents.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions