Open ioquatix opened 2 years ago
I think this is an artifact of package design right now.
In theory you include datadog/tracing
and it loads datadog/core
, which has this configuration & environment logger. Problem is the environment logger has direct knowledge of a method added by datadog/tracing/contrib
, which is likely not loaded. The dependency chain is messed here.
It should probably chain like datadog/tracing/contrib
--> datadog/tracing
--> datadog/core
. Core shouldn't have any references to tracing behavior, but right now it does. It's some refactoring we didn't have time to get to in 1.0, but we hope to continue cleaning up in the midterm.
Two things that might help in the interim: either 1) require 'datadog/tracing/contrib'
or 2) we change the environment logger to have soft dependencies on contrib
stuff like instrumented_integrations
. Either way, environment logger isn't a particularly useful or important feature right now, so I think it's the easiest thing to change short term.
When I run the specs for
traces-backend-datadog
which specifically only pulls indatadog/tracing
it fails without also havingrequire 'ddtrace'
. Withoutrequire 'ddtrace'
I get the error below when runningbundle exec rspec
. This might be by design, or this might be an issue due to a missing dependency within theddtrace
codebase.As discussed, maybe with the datadog gem, maybe it would be possible to write
require 'datadog'
. This also doesn't work right now.