opentelemetry-dart icon indicating copy to clipboard operation
opentelemetry-dart copied to clipboard

How to verify that the collector connection was made with zipkin collector

Open sk92129 opened this issue 1 year ago • 1 comments

Describe the bug With zipkin running thru docker, I can POST a span and then GET data back thru the RESTful API. However, if I try to use this flutter plugin, I dont see any of the tracer or span when using the sample from plugin.

Steps to reproduce

  • Install and run docker
  • Run the zipkin image : docker run -d -p 9411:9411 openzipkin/zipkin
  • open a browser to http://localhost:9411 to verify that zipkin is running
  • Another verification test with zipkin is to use their swagger API to create a span and then fetch data from that span.
  • https://zipkin.io/zipkin-api/#/
  • Then I try to use the dart example code to connect and create a span or trace into zipkin
  • I am unable to find evidence inside of zipkin that it connected or sent any data

What did you expect to see?

After running the dart code at https://github.com/sk92129/otlp-cmdline/tree/main, I expected to see some evidence of the data inside of zipkin. Or to find traceID, or some identifiable ID to search for inside of zipkin.

What did you see instead?

I saw that the dart command line code ran without error but there was no evidence that it connected or sent any data to the collector.

What version and what artifacts are you using? Artifacts: opentelemetry-sdk, collector exporter Version: ^0.18.7 is in my pubspec.yaml How did you reference these artifacts? pubspec.yaml

Environment Dart Version: 3.27.0 OS: Windows 10

Additional context Add any other context about the problem here.

sk92129 avatar Dec 16 '24 19:12 sk92129

I changed to the Batch version. //final processor = SimpleSpanProcessor(exporter); final BatchSpanProcessor processor = BatchSpanProcessor(exporter); However, the httpClient.post does not have a check on the response code to see if the send was successful.

A breakpoint in CollectorExporter._send in the catch clauses shows this:

_SimpleUri (http://localhost:4318/v1/traces)

image

I am running the open source collector from docker. https://opentelemetry.io/docs/collector/quick-start/

When I run a similar traces POST from postman, I see a 200 with { "partialSuccess": {} }

Any clues?

sk92129 avatar Dec 18 '24 18:12 sk92129