-
Notifications
You must be signed in to change notification settings - Fork 858
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exported OTLP data being parsed incorrectly (data point labels being parsed as unknown fields) #5945
Comments
This repository is not the right place to ask for help implementing your own backends. A better place may be Slack channel otel-java |
@tigrannajaryan I did actually ask in that Slack channel a week ago now with no response, but I suspect it could be a bug within the OpenTelemetry Java implementation of OTLP (see my last screenshot) in the IntDataPoint and DoubleDataPoint classes. Is this not the repository for that? I couldn't find another repository containing the implementation, so this seemed like the closest one. |
@open-telemetry/java-maintainers please take a look. |
@hxliu33 it looks like you may be trying to parse the message with classes generated from an older version of the protos. What version of opentelemetry-proto is used to generate the |
@jack-berg The dependency version that I am calling |
I'm seeing indications in your screenshot that you're not using |
@jack-berg Ohh interesting, maybe the package never updated to the version I was declaring. I will try ensuring that I am using 1.0.0-alpha (by making sure I see |
I'm going to close this because there are numerous tests which show this working. Also, parsing OTLP isn't technically part of the scope of this project. 🙂 If you have future issues with |
I am currently using a Collector with an
otlphttp
exporter to send metrics to a custom backend I am writing in Java, but when I process the request body usingExportMetricsServiceRequest.parseFrom()
method, it parses data point attributes into the data point'sunknownFields
instead of itslabels_
. Logging the output to stdout shows everything correctly (in the right places, as attributes under each data point). Here is the structure of the parsed request:And here is what I am (correctly) getting through the logging exporter:
Through attaching a debugger, I have pinpointed the issue to the constructor methods of the
IntDataPoint
andDoubleDataPoint
classes. In theswitch
-case
statements, the labels are associated with tags of58
(putting them in thedefault
case that moves it to theunknownFields
attribute) rather than tags of10
(which would've put them in the correctlabels
attribute).Please let me know if this is not actually a bug, and I am doing something incorrectly.
The text was updated successfully, but these errors were encountered: