DataDog / libdatadog

Datadog shared rust-based library. For now only used in other products (e.g. Ruby or PHP libraries).
Apache License 2.0
46 stars 8 forks source link

[BUG] Libdatadog error messages repeat the error message multiple times #283

Open ivoanjo opened 10 months ago

ivoanjo commented 10 months ago

Describe the bug

Libdatadog error messages repeat the error message multiple times. For instance, I've started the Ruby profiler without a Datadog agent, and this is the libdatadog error message I see:

failed ddog_prof_Exporter_send: error trying to connect: tcp connect error: Connection refused (os error 111): tcp connect error: Connection refused (os error 111): Connection refused (os error 111)

Since these are user-visible error messages, it's not great to have them be somewhat confusing.

To Reproduce Steps to reproduce the behavior:

  1. Try to report a profile with the exporter, and do not start the agent
  2. Observe the error message from the exporter

Expected behavior

An error message that's not repeated.

mantrala commented 10 months ago

I've been seeing this issue since I upgraded to Rails 7 couple weeks ago on heroku. I have the datadog agent and it still throws this errors multiple times in a day.

This is the complete error

/app/vendor/bundle/ruby/3.2.0/gems/ddtrace-1.11.1/lib/datadog/profiling/http_transport.rb:54:in `export') Failed to report profiling data: failed ddog_prof_Exporter_send: error trying to connect: tcp connect error: Connection refused (os error 111): tcp connect error: Connection refused (os error 111): Connection refused (os error 111)
ivoanjo commented 10 months ago

Hey @mantrala, sorry that you're running into the issue! It looks like something may be misconfigured with the heroku integration, could you reach out to support via https://docs.datadoghq.com/help/ so we can investigate the issue further?