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

opentelemetry-ext-jaeger doesn't work with jaeger-all-in-one collector #493

Closed
toumorokoshi opened this issue Mar 16, 2020 · 1 comment · Fixed by #508
Closed

opentelemetry-ext-jaeger doesn't work with jaeger-all-in-one collector #493

toumorokoshi opened this issue Mar 16, 2020 · 1 comment · Fixed by #508
Labels
bug Something isn't working exporters

Comments

@toumorokoshi
Copy link
Member

Describe your environment

python3.8

Steps to reproduce

start the jaeger all in one docker container:

docker run -p 16686:16686 -p 14268:14268 jaegertracing/all-in-one

Run the following script:

    # /tmp/example.py
    from opentelemetry import trace
    from opentelemetry.ext import jaeger
    from opentelemetry.sdk.trace import TracerProvider
    from opentelemetry.sdk.trace.export import SimpleExportSpanProcessor

    trace.set_tracer_provider(TracerProvider())

    # create a JaegerSpanExporter
    jaeger_exporter = jaeger.JaegerSpanExporter(
        service_name='my-helloworld-service',
        collector_host_name='localhost',
        collector_port=14268,
        collector_endpoint='/api/traces?format=jaeger.thrift',
    )

    trace.get_tracer_provider().add_span_processor(
        SimpleExportSpanProcessor(jaeger_exporter)
    )
    tracer = trace.get_tracer(__name__)
    with tracer.start_as_current_span('foo'):
        with tracer.start_as_current_span('bar'):
            with tracer.start_as_current_span('baz'):
                print("Hello world from OpenTelemetry Python!")

I'd expected to see the traces all emitted to jaeger. Instead, I get a thrift exception from the python script:

Exception while exporting Span.
Traceback (most recent call last):
  File "/home/tsutsumi/workspace/opentelemetry-python/opentelemetry-sdk/src/opentelemetry/sdk/trace/export/__init__.py", line 81, in on_end
    self.span_exporter.export((span,))
  File "/home/tsutsumi/workspace/opentelemetry-python/ext/opentelemetry-ext-jaeger/src/opentelemetry/ext/jaeger/__init__.py", line 118, in export
    self.collector.submit(batch)
  File "/home/tsutsumi/workspace/opentelemetry-python/ext/opentelemetry-ext-jaeger/src/opentelemetry/ext/jaeger/__init__.py", line 377, in submit
    self.client.submitBatches([batch])
  File "/home/tsutsumi/workspace/opentelemetry-python/ext/opentelemetry-ext-jaeger/src/opentelemetry/ext/jaeger/gen/jaeger/Collector.py", line 46, in submitBatches
    return self.recv_submitBatches()
  File "/home/tsutsumi/workspace/opentelemetry-python/ext/opentelemetry-ext-jaeger/src/opentelemetry/ext/jaeger/gen/jaeger/Collector.py", line 60, in recv_submitBatches
    (fname, mtype, rseqid) = iprot.readMessageBegin()
  File "/home/tsutsumi/.pyenv/versions/3.8.1/envs/otel/lib/python3.8/site-packages/thrift/protocol/TBinaryProtocol.py", line 148, in readMessageBegin
    name = self.trans.readAll(sz)
  File "/home/tsutsumi/.pyenv/versions/3.8.1/envs/otel/lib/python3.8/site-packages/thrift/transport/TTransport.py", line 68, in readAll
    raise EOFError()
EOFError
@toumorokoshi toumorokoshi added the bug Something isn't working label Mar 16, 2020
@toumorokoshi toumorokoshi changed the title opentelemetry-ext-jaeger doesn't work with jaeger-all-in-one opentelemetry-ext-jaeger doesn't work with jaeger-all-in-one collector Mar 16, 2020
@toumorokoshi
Copy link
Member Author

Thanks to @mauriciovasquezbernal I have this working with the agent exposed in all-in-one. collector looks to be reproducible, so renaming the ticket to qualify for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working exporters
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants