-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Minor: Improve Datadog::Profiling::HttpTransport error logging
**What does this PR do?**: This PR tweaks the `HttpTransport` error logging to include the configuration being used. For instance, it will now look like: ``` ERROR (lib/datadog/profiling/http_transport.rb:58:in `export') Failed to report profiling data ({:agent=>"unix:///fake-apm-socket.socket"}): failed ddog_prof_Exporter_send: error trying to connect: No such file or directory (os error 2): No such file or directory (os error 2) ``` ...I did notice the libdatadog error message seems to be repeated and isn't particularly great; that's a separate issue for a future fix (on the libdatadog side). **Motivation**: While investigating #3037 I noticed this information was not being logged when the profiler failed to report, and I thought it would be come in handy when debugging future issues. **Additional Notes**: N/A **How to test the change?**: The change includes test coverage. You can also manually trigger an issue by running dd-trace-rb with an invalid configuration, e.g. the above error message was triggered by running with ```bash $ DD_PROFILING_ENABLED=true DD_TRACE_AGENT_URL=unix:///fake-apm-socket.socket \ bundle exec ddtracerb exec ruby -e "sleep 1" ```
- Loading branch information
Showing
3 changed files
with
64 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters