Open hxliu33 opened 1 year ago
@hxliu33 hi, I have similar needs , and send opentelemetry data to my custom backend . As so far , I always get error as execute code , such as "ExportLogsServiceRequest.parseFrom(data)", "ExportMetricsServiceRequest.parseFrom(data)", I don't find any more information on google, this is my question detail ( https://github.com/open-telemetry/opentelemetry-proto/issues/521) ,cloud you help me ?
One thing you could change is use io.opentelemetry-proto as the groupId for the dependency instead because that was my issue (it seems they switched from io.opentelemetry to io.opentelemetry-proto at some point a few years ago).
On Sun, Jan 7, 2024 at 11:10 AM Shawn Chan @.***> wrote:
@hxliu33 https://github.com/hxliu33 hi, I have similar needs , and send opentelemetry data to my custom backend . As so far , I always get error as execute code , such as "ExportLogsServiceRequest.parseFrom(data)", "ExportMetricsServiceRequest.parseFrom(data)", I don't find any more information on google, this is my question detail ( open-telemetry/opentelemetry-proto#521 https://github.com/open-telemetry/opentelemetry-proto/issues/521) ,cloud you help me ?
— Reply to this email directly, view it on GitHub https://github.com/open-telemetry/opentelemetry-collector/issues/8710#issuecomment-1880070589, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGIQSW4MOYHPD67L3XLOK63YNKUE3AVCNFSM6AAAAAA6HP2XZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBQGA3TANJYHE . You are receiving this because you were mentioned.Message ID: @.***>
@hxliu33 I try it , but still get error (Error Info is "Protocol message tag had invalid wire type") . Now my io.opentelemetry-proto dependency version is 1.0.0-alpha , my opentelemetry collector switch 0.83.0 version. I watch you issue , I am not sure the versions is different with your versions . I mind you use opentelemetry-operator to deploy opentelemetry collector , but I use Helm Chart to deploy opentelemetry collector (Helm Chart https://artifacthub.io/packages/helm/opentelemetry-helm/opentelemetry-collector) , Could you please provide the complete configuration you used to deploy the OpenTelemetry Collector and the full Java Web code for receiving OTLP data at that time? I'd like to use it as a reference.
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), so please let me know where I could be going wrong. Here is the structure of the parsed request: And here is what I am (correctly) getting through the logging exporter:I am uncertain if this is an issue with the
parseFrom()
method or if there is an issue with how I am configuring the Collector. Here is my configuration (with some information omitted).