Skip to content
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

[PROF-8037] Profiling system info support #3357

Merged
merged 10 commits into from
Feb 16, 2024
Merged

Conversation

AlexJF
Copy link
Contributor

@AlexJF AlexJF commented Jan 2, 2024

What does this PR do?

  • Introduce a new profiling collector responsible for gathering system info data and refreshing it before each upload.
  • The system info gets added to the profile through a new field added by [PROF-8037] System info support for pprof profiles libdatadog#289
  • Backend and frontend support enables showing this info along with derived uptime from info.application.start_time:
image

Motivation:

  • Feature parity with Java in terms of observability into system/runtime/application/profiler settings.

Additional Notes:
This requires using a new release of libdatadog with DataDog/libdatadog#289 merged

How to test the change?

For Datadog employees:

  • If this PR touches code that signs or publishes builds or packages, or handles
    credentials of any kind, I've requested a review from @DataDog/security-design-and-guidance.
  • This PR doesn't touch any of that.

Unsure? Have a question? Request a review!

@github-actions github-actions bot added core Involves Datadog core libraries profiling Involves Datadog profiling labels Jan 2, 2024
@AlexJF AlexJF force-pushed the alexjf/system-info-collector branch from d09cc4c to 230da3c Compare January 2, 2024 16:58
@AlexJF AlexJF marked this pull request as ready for review January 2, 2024 18:38
@AlexJF AlexJF requested review from a team as code owners January 2, 2024 18:38
Copy link
Member

@ivoanjo ivoanjo left a comment

Choose a reason for hiding this comment

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

Left a few notes! I'm excited to finally have this for Ruby! ❤️

spec/datadog/profiling/http_transport_spec.rb Outdated Show resolved Hide resolved
lib/datadog/profiling/flush.rb Outdated Show resolved Hide resolved
lib/datadog/profiling/collectors/system_info.rb Outdated Show resolved Hide resolved
lib/datadog/profiling/collectors/system_info.rb Outdated Show resolved Hide resolved
lib/datadog/core/configuration/settings.rb Show resolved Hide resolved
lib/datadog/profiling/collectors/system_info.rb Outdated Show resolved Hide resolved
lib/datadog/profiling/collectors/system_info.rb Outdated Show resolved Hide resolved
@AlexJF
Copy link
Contributor Author

AlexJF commented Jan 25, 2024

image

Profile sent with latest version of this PR

Copy link
Member

@ivoanjo ivoanjo left a comment

Choose a reason for hiding this comment

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

👍 LGTM

spec/datadog/core/configuration/option_spec.rb Outdated Show resolved Hide resolved
lib/datadog/profiling/exporter.rb Outdated Show resolved Hide resolved
lib/datadog/profiling/exporter.rb Outdated Show resolved Hide resolved
spec/datadog/profiling/exporter_spec.rb Show resolved Hide resolved
ivoanjo added a commit that referenced this pull request Feb 12, 2024
**What does this PR do?**

This PR upgrades dd-trace-rb to use libdatadog 6. The highlight of
this release are memory footprint improvements when using the
profiling timeline feature.

There was a small breaking API change -- the addition of the
`info` parameter in `ddog_prof_Exporter_Request_build`, which will
be used in #3357 but for this PR I only passed in a `NULL`.

**Motivation:**

Pick up the timeline memory improvements.

**Additional Notes:**

N/A

**How to test the change?**

Our existing test coverage includes libdatadog testing, so a green
CI is good here :)
@ivoanjo ivoanjo mentioned this pull request Feb 12, 2024
2 tasks
ivoanjo added a commit that referenced this pull request Feb 12, 2024
**What does this PR do?**

This PR upgrades dd-trace-rb to use libdatadog 6. The highlight of
this release are memory footprint improvements when using the
profiling timeline feature.

There was a small breaking API change -- the addition of the
`info` parameter in `ddog_prof_Exporter_Request_build`, which will
be used in #3357 but for this PR I only passed in a `NULL`.

**Motivation:**

Pick up the timeline memory improvements.

**Additional Notes:**

N/A

**How to test the change?**

Our existing test coverage includes libdatadog testing, so a green
CI is good here :)
@codecov-commenter
Copy link

codecov-commenter commented Feb 12, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (65f12dd) 98.23% compared to head (b37ebb1) 98.23%.
Report is 2 commits behind head on master.

Files Patch % Lines
lib/datadog/profiling/collectors/info.rb 98.30% 1 Missing ⚠️
spec/datadog/profiling/collectors/info_spec.rb 98.48% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           master    #3357    +/-   ##
========================================
  Coverage   98.23%   98.23%            
========================================
  Files        1270     1272     +2     
  Lines       74802    74970   +168     
  Branches     3510     3531    +21     
========================================
+ Hits        73479    73647   +168     
  Misses       1323     1323            

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

Copy link
Member

@ivoanjo ivoanjo left a comment

Choose a reason for hiding this comment

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

👍 LGTM

lib/datadog/profiling/exporter.rb Outdated Show resolved Hide resolved
Co-authored-by: Ivo Anjo <ivo.anjo@datadoghq.com>
@AlexJF AlexJF merged commit 0da1ae3 into master Feb 16, 2024
219 checks passed
@AlexJF AlexJF deleted the alexjf/system-info-collector branch February 16, 2024 14:27
@github-actions github-actions bot added this to the 1.21.0 milestone Feb 16, 2024
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.

3 participants