Skip to content

Suspected Issue: OpenTelemetry hook does not work with Prometheus Metrics exporter #597

Open
@benjaminclauss

Description

@benjaminclauss

I have a basic OpenTelemetry setup for my application.
This includes a metrics provider with a Prometheus exporter.

Adding the metrics hook yields the following error.

An error has occurred while serving metrics:

error collecting metric Desc{fqName: "feature_flag_evaluation_active_count", help: "active flag evaluations counter", constLabels: {}, variableLabels: {feature_flag_key,otel_scope_name,otel_scope_version}}: cannot inject exemplar into Gauge, Summary or Untyped

I can investigate further with a simpler example but I was surprised to see this not immediately work.

Perhaps Prometheus and OpenFeature metrics do not get along?
https://github.com/prometheus/client_golang/blob/a934c3595116c0a1d5b21318718d8a0ab9d7c009/prometheus/metric.go#L207-L208

I can provide additional context if needed.

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