Open giuseka opened 9 hours ago
Looks like it's fixed by https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2784 ? If you can pick up that code, add a test and a changelog entry we can review and merge it
I tested locally the solution proposed in https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2784, and it works for me. The code is more simple than proposed by me.
Describe your environment
OS: Ubuntu: 22.04 Python version: Python 3.12.3 Package version:
What happened?
I write a simple code to create a gauge metric on thanos receiver, but the operation return the error:
Export POST request failed with reason: 409 Client Error: Conflict for url:
In the log of the receiver I observed thi error:
msg="failed to handle request" err="add 1 series: out of order labels"
Steps to Reproduce
Execute this code with a working thanos receiver https uri:
Expected Result
Metric is created in thanos.
Actual Result
Metric is rejected from thanos.
Additional context
I open the code of the class PrometheusRemoteWriteMetricsExporter and make a little modification in method _convert_to_timeseries ordering the label before create the timeseries.
This is my working version of the method:
Would you like to implement a fix?
Yes