Skip to content

Conversation

@ivoanjo
Copy link
Member

@ivoanjo ivoanjo commented Jun 12, 2025

What does this PR do?

This PR does a pass on the profiler's logging and:

  • Lowers the severity of a few messages from error to warn
  • Reports a few more messages via telemetry
  • Changes a few of the telemetry reports to also include exception information

Motivation:

Recently I was investigating an issue in our reliability environment and I missed some of the logging I wanted, because it wasn't being reported using telemetry. So I decided to do that cleanup.

Regarding the error to warn changes, since the profiler failing is not in any way expected to impact the application, it seems to me that it's clearer that such failures are warnings ("hey -- something went wrong and you may not get any profiles").

Change log entry

Yes. Review and clean up profiler logging

Additional Notes:

N/A

How to test the change?

I've updated our unit specs where needed, so we should be good to go.

**What does this PR do?**

This PR does a pass on the profiler's logging and:
* Lowers the severity of a few messages from error to warn
* Reports a few more messages via telemetry
* Changes a few of the telemetry reports to also include exception
  information

**Motivation:**

Recently I was investigating an issue in our reliability environment
and I missed some of the logging I wanted, because it wasn't being
reported using telemetry. So I decided to do that cleanup.

Regarding the error to warn changes, since the profiler failing is not
in any way expected to impact the application, it seems to me that it's
clearer that such failures are warnings ("hey -- something went wrong
and you may not get any profiles").

**Additional Notes:**

N/A

**How to test the change?**

I've updated our unit specs where needed, so we should be good to go.
@ivoanjo ivoanjo requested review from a team as code owners June 12, 2025 15:10
@github-actions github-actions bot added the profiling Involves Datadog profiling label Jun 12, 2025
@pr-commenter
Copy link

pr-commenter bot commented Jun 12, 2025

Benchmarks

Benchmark execution time: 2025-06-25 11:24:29

Comparing candidate commit 2ec3903 in PR branch ivoanjo/review-profiler-logging with baseline commit 4e6aa7f in branch master.

Found 1 performance improvements and 0 performance regressions! Performance is the same for 44 metrics, 2 unstable metrics.

scenario:error - without error tracking with http

  • 🟩 throughput [+7.854op/s; +12.392op/s] or [+5.481%; +8.648%]

@codecov-commenter
Copy link

codecov-commenter commented Jun 12, 2025

Codecov Report

Attention: Patch coverage is 97.22222% with 2 lines in your changes missing coverage. Please review.

Project coverage is 97.54%. Comparing base (4e6aa7f) to head (6eef5a5).

Files with missing lines Patch % Lines
...tadog/profiling/collectors/idle_sampling_helper.rb 0.00% 1 Missing ⚠️
lib/datadog/profiling/tasks/setup.rb 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4728      +/-   ##
==========================================
- Coverage   97.54%   97.54%   -0.01%     
==========================================
  Files        1486     1486              
  Lines       88570    88591      +21     
  Branches     4587     4591       +4     
==========================================
+ Hits        86396    86413      +17     
- Misses       2174     2178       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@datadog-datadog-prod-us1
Copy link
Contributor

datadog-datadog-prod-us1 bot commented Jun 12, 2025

Datadog Report

Branch report: ivoanjo/review-profiler-logging
Commit report: 6eef5a5
Test service: dd-trace-rb

✅ 0 Failed, 21771 Passed, 1387 Skipped, 5m 8.43s Total Time

@github-actions github-actions bot added the core Involves Datadog core libraries label Jun 25, 2025
Copy link
Member

@Strech Strech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@ivoanjo ivoanjo merged commit 3cf480d into master Jun 25, 2025
446 checks passed
@ivoanjo ivoanjo deleted the ivoanjo/review-profiler-logging branch June 25, 2025 13:04
@github-actions github-actions bot added this to the 2.18.0 milestone Jun 25, 2025
@y9v y9v mentioned this pull request Jul 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Involves Datadog core libraries profiling Involves Datadog profiling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants