Skip to content

Prometheus remote write does not respect integer exemplar values #36657

Closed
@ajbt200128

Description

@ajbt200128

Component(s)

exporter/prometheusremotewrite

What happened?

Description

It looks like the prometheus remote write exporter does not export exemplars correctly when the value of the exemplar is an int. Looking at the code, it seems to only extract the double value, regardless of whether or not it, or the int value was set.

Steps to Reproduce

Send metrics with exemplars that have int values, and then some that have double values, where the values != 0.

Expected Result

Either int value exemplars or double value exemplars are written to the prometheus remote write backend

Actual Result

Both kinds of exemplars are written, but the "Value" attribute of int exemplars is always 0.

Collector version

v0.114.0

Environment information

Environment

latest otel contrib docker image

OpenTelemetry Collector configuration

No response

Log output

No response

Additional context

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions