Skip to content

Metric pattern validation in simpleclient_dropwizard is overly strict #518

Open
@LiamClarkeNZ

Description

@LiamClarkeNZ

I am exposing metrics to Prometheus in an existing app that uses Dropwizard, and they have a wide variety of names. From app_metric_some_count to appMetric.someCount. For legacy monitoring reasons I am unable to rename these metrics.

When attempting to use a CustomMappingSampleBuilder to map these existing names to metric names that align with Prometheus best practices, I am unable to do so because both MappingConfig and GraphiteNamePattern (used within the CustomMappingSampleBuilder) expect via regex a very particular form of metric naming - app_example will not survive validation, but app.example will.

Given that Dropwizard itself does not enforce these metric naming conventions, I'm unsure as to why simpleclient_dropwizard does.

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