Skip to content
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

Unable to export spans to Zipkin #23875

Closed
jonatan-ivanov opened this issue Jun 30, 2023 · 8 comments
Closed

Unable to export spans to Zipkin #23875

jonatan-ivanov opened this issue Jun 30, 2023 · 8 comments
Labels
bug Something isn't working exporter/zipkin needs triage New item requiring triage

Comments

@jonatan-ivanov
Copy link
Member

Component(s)

exporter/zipkin

What happened?

Description

I'm trying to receive spans in OTLP format and export them to Zipkin (was able to do it in the past) but it seems something is broken now.

Steps to Reproduce

  1. Start a collector (see version and config below)
  2. Send spans in OTLP (I'm using HTPP but should not matter)
  3. Check the logs and see the error

Expected Result

Spans in Zipkin

Actual Result

No Spans in Zipkin

Collector version

0.80.0, Docker image Id: 58eb1aeb91db

Environment information

Environment

OS: MacOS 13.4.1 with Docker (Desktop: 4.21.0 (113844), Engine: 24.0.2, Compose: v2.19.0)
Compiler(if manually compiled): N/A

OpenTelemetry Collector configuration

receivers:
    otlp:
        protocols:
            grpc:
            http:

processors:
    batch:
        timeout: 10s

exporters:
    # https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/zipkinexporter
    zipkin:
        endpoint: 'http://host.docker.internal:9411/api/v2/spans'
    logging:

extensions:
    health_check:
    pprof:
    zpages:

service:
    extensions: [pprof, zpages, health_check]
    pipelines:
        traces:
            receivers: [otlp]
            processors: [batch]
            exporters: [logging, zipkin]

Log output

otel-collector  | 2023-06-30T19:45:14.371Z	info	exporterhelper/queued_retry.go:423	Exporting failed. Will retry the request after interval.	{"kind": "exporter", "data_type": "traces", "name": "zipkin", "error": "failed to push trace data via Zipkin exporter: Post \"http://host.docker.internal:9411/api/v2/spans\": EOF", "interval": "5.166770931s"}

Additional context

Please notice that seemingly the collector appends an extra character to the URL.
This is what's in my config: http://host.docker.internal:9411/api/v2/spans
And this is what's in the collector logs: http://host.docker.internal:9411/api/v2/spans\

@jonatan-ivanov jonatan-ivanov added bug Something isn't working needs triage New item requiring triage labels Jun 30, 2023
@github-actions
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@crobert-1
Copy link
Member

Hello @jonatan-ivanov, sorry for the delayed response. Are you running the collector in a docker container?

I think the extra \ character at the end of your exporter endpoint URL may be just escaping the double-quotes in the log message, just like Post \" in the same error message. I don't think that's necessarily anything to worry about here.

@jonatan-ivanov
Copy link
Member Author

@crobert-1

Are you running the collector in a docker container?

Yes, see the details above (search for docker in the description for the versions).

I think the extra \ character at the end of your exporter endpoint URL may be just escaping the double-quotes in the log message, just like Post " in the same error message. I don't think that's necessarily anything to worry about here.

You are right about the escaped " but that's just a wrong guess I made, the issue is rather this is being broken, see: Exporting failed. Will retry the request after interval.

@crobert-1
Copy link
Member

Would you be able to post more information about your setup? I ran a very basic demo using your configuration file and it worked as expected. Here's what worked for me.

Zipkin docker command:

docker run -d -p 9411:9411 openzipkin/zipkin

Collector command:

docker run -v $(pwd)/zipkin-config.yaml:/etc/otelcol-contrib/config.yaml -p 4317:4317 -p 4318:4318 otel/opentelemetry-collector-contrib:0.80.0

I also modified your config file in the following way, to make it more clear what traces the collector was receiving:

exporters:
  # https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/zipkinexporter
  zipkin:
    endpoint: 'http://host.docker.internal:9411/api/v2/spans'
  logging:
    verbosity: detailed # This will provide more logging to see what the collector actually receives

After running these commands I just used CURL to post some sample trace data to localhost:4318/v1/traces, the HTTP endpoint for collector's OTLP receiver. The collector's output showed them coming in, and then going to localhost:9411 and searching for the trace showed that everything worked.

@jonatan-ivanov
Copy link
Member Author

I tried it again with latest and it worked for me. Though the image ID for me locally (also in the description: 58eb1aeb91db) is not the same what I see on DockerHub. The Docker image tag should not be moved on DockerHub, right?

@crobert-1
Copy link
Member

I just pulled the image and see my local image as well as digest does not match the dockerhub's value for digest either. I believe this is to be expected though. Here are a couple references.

Stack overflow question
GitHub issue discussion

Let us know if there's any other information that would be helpful! Otherwise, feel free to close the issue.

@jonatan-ivanov
Copy link
Member Author

Ouch. :( Thanks for the help and sorry for the confusion!

@jonatan-ivanov jonatan-ivanov closed this as not planned Won't fix, can't repro, duplicate, stale Jul 19, 2023
@crobert-1
Copy link
Member

You're welcome, happy to help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working exporter/zipkin needs triage New item requiring triage
Projects
None yet
Development

No branches or pull requests

2 participants