Skip to content

implementations of encode_family on text & protobuf are not symmetric #272

@codefever

Description

@codefever

For text (https://github.com/prometheus/client_rust/blob/master/src/encoding/text.rs#L387), family inheritance is prohibited by debug_assert.
But for protobuf (https://github.com/prometheus/client_rust/blob/master/src/encoding/protobuf.rs#L236), the iniheritantce is allowed.

Is there any special consideration? I found these when i was implementing a custom metric which would extend its own families under another prometheus_client::metrics::family::Family context.

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