You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current behaviour
we have a rails app running in ecs. we run in docker container with the dd sidecar.
since we enabled allocation profiling this message has been printing to STDOUT multiple times any time we run any sort of rails command:
# bin/rails console
W, [2024-12-16T21:18:33.543770 #1526] WARN -- datadog: [datadog] In all known versions of Ruby 3.x, using Ractors may result in allocation profiling unexpectedly stopping (https://bugs.ruby-lang.org/issues/19112). Note that this stop has no impact in your application stability or performance. This does not happen if Ractors are not used.
W, [2024-12-16T21:18:33.923679 #1526] WARN -- datadog: [datadog] In all known versions of Ruby 3.x, using Ractors may result in allocation profiling unexpectedly stopping (https://bugs.ruby-lang.org/issues/19112). Note that this stop has no impact in your application stability or performance. This does not happen if Ractors are not used.
W, [2024-12-16T21:18:33.975804 #1526] WARN -- datadog: [datadog] In all known versions of Ruby 3.x, using Ractors may result in allocation profiling unexpectedly stopping (https://bugs.ruby-lang.org/issues/19112). Note that this stop has no impact in your application stability or performance. This does not happen if Ractors are not used.
Loading sandbox environment (Rails 8.0.1)
rails-app(sandbox)>
note that the above log messages are not going to the datadog or rails logger because they're not properly formatted (all of our logs are json formatted, including the datadog logs).
we've tried setting:
DD_TRACE_STARTUP_LOGS=false in the datadog agent container and our application container
DD_LOG_LEVEL=error in the datadog agent container and our application container
c.logger.level = Logger::ERROR in the initializer
but nothing changes.
this is breaking some of our automation. short of disabling this functionality (which is what we're going to do now) is there anything we can do to quiet this?
Expected behaviour
there should be a way to disable these
Steps to reproduce
Environment
datadog version: datadog (2.8.0)
Configuration block (Datadog.configure ...):
# see https://github.com/DataDog/dd-trace-rb/issues/2012Datadog.configuration.tracing.log_injection=falseDatadog.configuredo |c|
c.tracing.enabled=true# c.profiling.enabled = truec.tracing.instrument:action_mailerc.tracing.instrument:action_cablec.tracing.instrument:railsc.tracing.instrument:faraday,split_by_domain: truec.logger.level=Logger::ERRORend
You're absolutely right. We missed it, but due to a few shortcomings with how the gem is set up, it's really really hard to eliminate this message right now.
I'll have a PR out soon to improve this, but until it gets released, here's two suggestions:
Enable profiling via code only, and change configuration in two steps:
This fixes the issue, although it's definitely awkward ;)
(In more detail, the issue is that a) when Datadog.configure runs, new logger/log level only gets picked after that warning gets emitted; thus this workaround solves that; and b) when starting profiling using DD_PROFILING_ENABLED, the profiler will load before the Datadog.configure block runs, and thus it will emit the warning before the config gets updated)
Pass DD_PROFILING_ENABLED=false when running scripts and rails console.
It wasn't clear from the report if you wanted to also have profiling in these situations, so it's always an option to disable it selectively, if you don't plan on looking at profiles for them.
Current behaviour
we have a rails app running in ecs. we run in docker container with the dd sidecar.
since we enabled allocation profiling this message has been printing to
STDOUT
multiple times any time we run any sort ofrails
command:the logging comes from
dd-trace-rb/lib/datadog/profiling/component.rb
Line 192 in 4f1c8bd
note that the above log messages are not going to the datadog or rails
logger
because they're not properly formatted (all of our logs are json formatted, including the datadog logs).we've tried setting:
DD_TRACE_STARTUP_LOGS=false
in the datadog agent container and our application containerDD_LOG_LEVEL=error
in the datadog agent container and our application containerc.logger.level = Logger::ERROR
in the initializerbut nothing changes.
this is breaking some of our automation. short of disabling this functionality (which is what we're going to do now) is there anything we can do to quiet this?
Expected behaviour
there should be a way to disable these
Steps to reproduce
Environment
Datadog.configure ...
):The text was updated successfully, but these errors were encountered: