I have this ruby code to test opentelemtry
require 'uri'
require 'net/http'
require 'opentelemetry/sdk'
require 'opentelemetry/instrumentation/all'
require 'opentelemetry/exporter/otlp'
require "opentelemetry-api"
OpenTelemetry::SDK.configure do |c|
c.service_name = 'test'
c.use_all
end
uri = URI('https://google.ch')
res = Net::HTTP.get_response(uri)
puts res.body
Which outputs:
I, [2022-12-15T15:57:44.881172 #5506] INFO -- : Instrumentation: OpenTelemetry::Instrumentation::Net::HTTP was successfully installed with the following options {:untraced_hosts=>[]}
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="https://www.google.ch/">here</A>.
</BODY></HTML>
But there are not traces visible in Jaeger.
ENV ist set:
export OTEL_EXPORTER_OTLP_ENDPOINT=http://0.0.0.0:4318
Jaeger running with
docker run --name jaeger \
-e COLLECTOR_OTLP_ENABLED=true \
-p 16686:16686 \
-p 4317:4317 \
-p 4318:4318 \
--platform=linux/amd64 \
jaegertracing/all-in-one:1.6
What I'm doing wrong?