Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Uninitialized constant OpenTelemetry::Context::Propagation::DefaultSetter #12

Open
sj26 opened this issue Jul 23, 2021 · 0 comments · May be fixed by #13
Open

Uninitialized constant OpenTelemetry::Context::Propagation::DefaultSetter #12

sj26 opened this issue Jul 23, 2021 · 0 comments · May be fixed by #13

Comments

@sj26
Copy link

sj26 commented Jul 23, 2021

The datadog exporter cannot be used with current opentelemetry gems. It raises an error during load:

.../opentelemetry-exporters-datadog-0.1.0/lib/opentelemetry/exporters/datadog/propagator.rb:17:in `<class:Propagator>':
uninitialized constant OpenTelemetry::Context::Propagation::DefaultSetter (NameError)
bundle show | egrep "opentelemetry|ddtrace"
  * ddtrace (0.49.0)
  * opentelemetry-api (0.17.0)
  * opentelemetry-common (0.17.0)
  * opentelemetry-exporters-datadog (0.1.0)
  * opentelemetry-sdk (0.17.0)

To Reproduce

Within a rails app, add the gems:

bundle add opentelemetry-sdk opentelemetry-exporters-datadog

Then boot the rails application.

bin/rails runner true

The exception is raised while loading:

/opt/rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/opentelemetry-exporters-datadog-0.1.0/lib/opentelemetry/exporters/datadog/propagator.rb:17:in `<class:Propagator>': uninitialized constant OpenTelemetry::Context::Propagation::DefaultSetter (NameError)
	from /opt/rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/opentelemetry-exporters-datadog-0.1.0/lib/opentelemetry/exporters/datadog/propagator.rb:16:in `<module:Datadog>'
	from /opt/rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/opentelemetry-exporters-datadog-0.1.0/lib/opentelemetry/exporters/datadog/propagator.rb:14:in `<module:Exporters>'
	from /opt/rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/opentelemetry-exporters-datadog-0.1.0/lib/opentelemetry/exporters/datadog/propagator.rb:13:in `<module:OpenTelemetry>'
	from /opt/rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/opentelemetry-exporters-datadog-0.1.0/lib/opentelemetry/exporters/datadog/propagator.rb:12:in `<top (required)>'
	from /opt/rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/opentelemetry-exporters-datadog-0.1.0/lib/opentelemetry/exporters/datadog.rb:16:in `<top (required)>'
	from /opt/rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/opentelemetry-exporters-datadog-0.1.0/lib/opentelemetry-exporters-datadog.rb:8:in `<top (required)>'
	from /opt/rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/runtime.rb:66:in `require'
	from /opt/rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/runtime.rb:66:in `block (2 levels) in require'
	from /opt/rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/runtime.rb:61:in `each'
	from /opt/rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/runtime.rb:61:in `block in require'
	from /opt/rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/runtime.rb:50:in `each'
	from /opt/rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/runtime.rb:50:in `require'
	from /opt/rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler.rb:174:in `require'
	from /Users/sj26/Developer/Buildkite/buildkite/config/application.rb:16:in `<top (required)>'
	from /opt/rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/spring-2.1.0/lib/spring/application.rb:92:in `require'
	from /opt/rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/spring-2.1.0/lib/spring/application.rb:92:in `preload'
	from /opt/rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/spring-2.1.0/lib/spring/application.rb:157:in `serve'
	from /opt/rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/spring-2.1.0/lib/spring/application.rb:145:in `block in run'
	from /opt/rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/spring-2.1.0/lib/spring/application.rb:139:in `loop'
	from /opt/rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/spring-2.1.0/lib/spring/application.rb:139:in `run'
	from /opt/rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/spring-2.1.0/lib/spring/application/boot.rb:19:in `<top (required)>'
	from /opt/rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
	from /opt/rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
	from -e:1:in `<main>'

Expected behavior
The rails app should boot.

@sj26 sj26 linked a pull request Jul 24, 2021 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant