Skip to content

Issue when using @Timed annotation with prometheus-metrics-instrumentation-dropwizard #1321

Description

@kpur-sbab

@timed annotation, which can be annotated on the methods generates dropwizard metrics with .total as a suffix.

This is not compatible with prometheus-metrics-instrumentation-dropwizard to export dropwizard metrics.

Since the io.prometheus.metrics.instrumentation.dropwizard.DropwizardExports class has a method fromSnapshotAndCount which sanitizes the metric name withPrometheusNaming.sanitizeMetricName(dropwizardName).

As a result it causes duplicate metric name exception when prometheus endpoint is invoked.

Original reference here:
dropwizard/dropwizard#10030 #

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