Replies: 6 comments
-
The OTLP exporter currently implemented in OpenTelemetry Ruby supports protobuf over HTTP. The configuration you're using assumes gRPC, which we do not yet support. You'll instead need to configure this as:
|
Beta Was this translation helpful? Give feedback.
-
@fbogsany thank you for your guidance. Based on other implementation, specifically with javascript. I believe the following is more accurate? Though I tried with the above set-up, I am unable to export the traces to our collector. Is there a sample docker configuration that runs the collector on docker to test this code against? I found a docker-compose.yml in the root directory, but that does NOT start up an instance of collector. |
Beta Was this translation helpful? Give feedback.
-
No, |
Beta Was this translation helpful? Give feedback.
-
If you have a collector setup locally, you can run an integration test from the
Note that this test has rotted (it is not part of CI) and the following line exporter = OpenTelemetry::Exporter::OTLP::Exporter.new(endpoint: 'http://localhost:4317/v1/traces', compression: 'gzip') |
Beta Was this translation helpful? Give feedback.
-
@fbogsany @shyam1975 May I move this to a Discussion instead of tracking this as an Issue? |
Beta Was this translation helpful? Give feedback.
-
OK, please go ahead. |
Beta Was this translation helpful? Give feedback.
-
We have an instance of collector running on a server in our intranet listening on port 55680. We need to push our traces to this collector instance.
Based on environment variables used in other languages, I have set up the same in the shell.
$ export OTEL_EXPORTER_OTLP_ENDPOINT=http://10.10.110.93:55680
$ export OTEL_RESOURCE_ATTRIBUTES=service.name=ruby-app
And then we run the example app provided in the instrumentation directory as follows:
osboxes@osboxes:~/elysium/opentelemetry-ruby/instrumentation/http_client/example$ bundle exec ruby ./trace_demonstration.rb
I, [2021-05-31T12:50:24.808277 #529753] INFO -- : Instrumentation: OpenTelemetry::Instrumentation::HttpClient was successfully installed
But the traces do not reach out collector instance. Am I setting up the environment variables correctly? Can someone confirm? Any guidance is appreciated.
Beta Was this translation helpful? Give feedback.
All reactions