You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
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.
Describe your environment
python3.8
Steps to reproduce
start the jaeger all in one docker container:
Run the following script:
I'd expected to see the traces all emitted to jaeger. Instead, I get a thrift exception from the python script:
The text was updated successfully, but these errors were encountered: