Skip to content

Handle NPE when "HELP" option is not provided #457

@dlazerka

Description

@dlazerka

Hello, I'm trying to create a metric without any HELP set (it is allowed per exposition format spec).
However, client_java prevents me of doing that, see https://github.com/prometheus/client_java/blob/master/simpleclient/src/main/java/io/prometheus/client/SimpleCollector.java#L165

If not calling .help() it will fail with NPE, if provided with empty string, it will throw IllegalStateException.

I think it shouldn't throw anything if .help() wasn't called.

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