-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to report profiling data, connection closed before message completed #3716
Comments
Hey @ganey, thanks for getting in touch. The error message you shared is actually related to profiling, not sending of traces...
...so it's possible your traces are not getting affected at all. One thing that's a bit confusing is that your configuration block and environment variables do not mention enabling profiling at all. Can you doublecheck if there's missing environment variables and/or configuration that's enabling profiling? |
Hey @ivoanjo thanks for the quick response. So i dug further into the code and one of the gems we're using is turning on profiling, here's the configure we're using from that gem: Datadog.configure do |c|
container_name = ENV.fetch('CONTAINER_NAME') { '' }
pod_name = ENV.fetch('POD_NAME') { '' }
global_tags = [
"railsenv:#{Rails.env}",
"service:workers",
"container_name:#{container_name}",
"pod_name:#{pod_name}",
]
c.runtime_metrics.enabled = true
datadog_singleton = DatadogSingleton.instance
datadog_statsd_socket_path = ENV.fetch('DD_STATSD_SOCKET_PATH') { '' }
datadog_singleton.statsd = if datadog_statsd_socket_path.to_s.strip.empty?
Datadog::Statsd.new(ENV['DD_AGENT_HOST'], 8125, tags: global_tags)
else
Datadog::Statsd.new(socket_path: datadog_statsd_socket_path, tags: global_tags)
end
c.runtime_metrics.statsd = datadog_singleton.statsd
# Trace tags API is Hash<String,String>, see https://www.rubydoc.info/gems/ddtrace/Datadog/Tracing
# Should match the global tags, but as a Hash.
c.tags = {
railsenv: Rails.env,
service: 'workers',
container_name: container_name,
pod_name: pod_name,
}
c.tracing.enabled = true
c.profiling.enabled = true
c.tracing.instrument(:rails, service_name: 'workers')
c.logger.level = Logger::WARN
end |
Ahh, thanks, this is definitely a more through configuration. Can I ask you to open a support ticket so we can look at your account and investigate this? Could you include in the ticket:
Thank you! |
Current behaviour
Intermittent errors sending traces, unsure how to debug further
Expected behaviour
no error sending trace
Steps to reproduce
Unsure, happens randomly across cluster and different pods
How does
datadog
help you?Environment
Datadog.configure ...
):ruby:3.2.4-slim-bullseye
ddtrace 1.22.0 (also tried 1.23.1)
Using volume mounted socket, most traces are getting through
ddagent image: gcr.io/datadoghq/agent:7.48.1
env vars:
DD_STATSD_SOCKET_PATH : /var/run/datadog/dsd.socket
DD_TRACE_AGENT_URL : unix:///var/run/datadog/apm.socket
DD_VERSION :1.7.45
The text was updated successfully, but these errors were encountered: