Comments (5)
More specifically, this seems to be the problem:
Line 48 in 10e4534
Because redis is patched and starts writing spans well before anything in config/initializers/*
is loaded there are already recorded spans attempting to be sent to the datadog agent before the tracer is disabled in development.
from dd-trace-rb.
The only way to prevent this seems to be preventing ddtrace
from being required at all outside production by using gem "ddtrace", group: "production"
in the Gemfile. We'd prefer to keep it loaded in all environments for parity with production and so we can add application instrumentation.
from dd-trace-rb.
Thank you for reporting that @sj26 ! we'll be sure that the next release doesn't have such kind of issues.
from dd-trace-rb.
#86 should remove the root cause about Redis sending traces despite defined settings. A configuration like:
Rails.configuration.datadog_trace =
{
# may depend by your conditional env
enabled: false,
# these may be 'true' to keep parity with your production
auto_instrument: true,
auto_instrument_redis: true
}
ensures that:
- Rails is auto-instrumented after bundler requires
ddtrace
- Redis is auto-instrumented after bundler requires
ddtrace
- if
redis-rails
is used and Redis is auto-instrumented,redis-rails
will use the traced Redis client - disabling the tracer means that traces will not be reported but the code will still be instrumented like in your production environment.
from dd-trace-rb.
Fixed with #86 . Redis auto-instrumentation (available after any kind of require 'ddtrace'
) honors the Rails initializer. So if the tracer is disabled, Redis is instrumented after so that no traces are sent from the transport layer (but traces are still generated and Redis is still instrumented). This plays well with Rake scripts and Sidekiq (in environments where the tracer is not enabled).
If you spot another problem, feel free to re-open the issue or to create a new one! The next release will be available by the end of the week and it includes a better Sidekiq support!
from dd-trace-rb.
Related Issues (20)
- ddtrace - throws error when deploying a rails 6.1 instance HOT 1
- Sinatra - missing trace_id when trying to correlate logs with traces HOT 2
- Qless support is missing from 2.0 HOT 1
- Capture tracing when a specific header is passed in an HTTP request HOT 3
- Instrumenting both Redis and Sidekiq leads to "stack level too deep (SystemStackError)" HOT 1
- GraphQL queries will error out after datadog upgrade ("Found two visible definitions") HOT 2
- With `datadog` 2.x, how can I mimic the 1.x test adapter that prints traces to `$stdout`? HOT 2
- Failed to report profiling data, connection closed before message completed HOT 3
- Anyway to make the faraday instrumentation split by domain but allow an override to not split by domain in some cases? HOT 5
- "Incompatible version of the passenger gem" even when Passenger has the right version HOT 7
- GRPC integration logging error even when tracing is disabled HOT 1
- We had a use case for Datadog::Tracing::Contrib::HTTP::Instrumentation.after_request HOT 3
- Wrong MIME/Content-Type for code provenance multipart data HOT 2
- Support tracing of Mysql2 gem prepared statements HOT 2
- Datadog::Tracing.correlation without trace information HOT 1
- AppSec crashes when parsing integer HTTP headers (undefined method `tr' for nil:NilClass (NoMethodError)) HOT 3
- Rails tracing produces duplicate mysql2 spans
- GraphQL unified tracer not autoloaded HOT 2
- suppress logs by default when running minitest tests HOT 2
- ActiveSupport::Cache instrumentation missing namespace
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dd-trace-rb.