Trying to read data from Collector in NodeJs #3675
Unanswered
atadigitup
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I have a sample instrumented app which sends data to a running Collector with this config:
receivers:
otlp:
protocols:
grpc:
endpoint: "0.0.0.0:4317"
http:
endpoint: "0.0.0.0:4318"
processors:
batch:
exporters:
otlphttp:
endpoint: http://localhost:8080
compression: none
logging:
loglevel: debug
service:
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [otlphttp, logging]
It is pretty simple, and the logging exporter shows the data correctly. I am interested in the otlphttp exporter. I built a simple NodeJs server that is listening to localhost:8080/v1/traces and indeed, post requests are incoming. However I don't know how to access the data. req.body seems to be empty. I know there is some protobuf stuff that needs decoding but I have no idea where to start from. There is also apparently this otlp-transformer package which might be helpful? But again I do not have an idea where to start or if this is feasible at all in NodeJs.
Beta Was this translation helpful? Give feedback.
All reactions