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-8942] Enable Ruby timeline by default #3428

Merged
merged 3 commits into from
Feb 21, 2024

Conversation

ivoanjo
Copy link
Member

@ivoanjo ivoanjo commented Feb 1, 2024

What does this PR do?

This PR enables the timeline feature for the Continuous Profiler by default.

It introduces a new setting, timeline_enabled, which can also be controlled by setting the DD_PROFILING_TIMELINE_ENABLED environment variable.

It also deprecates the old experimental_timeline_enabled + it's environment variable counterpart.

Motivation:

With the latest round of improvements to libdatadog, we're confident about enabling this feature by default.

Additional Notes:

I'm opening this PR as a draft as it still depends on DataDog/libdatadog#293 being released + a few more rounds of internal validation. ✅ Fixed

This PR also will need to be updated with the changes from #3357 OR the reverse will need to happen -- whichever one is merged first. ✅ Fixed

How to test the change?

Try to profile any application, validate that you get timeline data without further configuration.

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.

@github-actions github-actions bot added core Involves Datadog core libraries profiling Involves Datadog profiling labels Feb 1, 2024
**What does this PR do?**

This PR enables the timeline feature for the Continuous Profiler by
default.

It introduces a new setting, `timeline_enabled`, which can also be
controlled by setting the `DD_PROFILING_TIMELINE_ENABLED` environment
variable.

It also deprecates the old `experimental_timeline_enabled` + it's
environment variable counterpart.

**Motivation:**

With the latest round of improvements to libdatadog, we're confident
about enabling this feature by default.

**Additional Notes:**

I'm opening this PR as a draft as it still depends on
DataDog/libdatadog#293 being released +
a few more rounds of internal validation.

**How to test the change?**

Try to profile any application, validate that you get timeline
data without further configuration.
@ivoanjo ivoanjo force-pushed the ivoanjo/prof-8942-enable-ruby-timeline-default branch from 6d2de9a to e3210c5 Compare February 21, 2024 09:15
@ivoanjo
Copy link
Member Author

ivoanjo commented Feb 21, 2024

Marking this as good to go. For Datadog folks, search google drive for "Review of Ruby profiler timeline feature before enabling by default (2024-02)" for a review of benchmarks with the timeline feature.

Note to self: after this gets merged, we need to do a pass on our benchmarking configurations, due to the new default/new environment variable.

@ivoanjo ivoanjo marked this pull request as ready for review February 21, 2024 14:36
@ivoanjo ivoanjo requested review from a team as code owners February 21, 2024 14:36
@@ -424,9 +424,29 @@ def initialize(*_)
#
# @default `DD_PROFILING_EXPERIMENTAL_TIMELINE_ENABLED` environment variable as a boolean, otherwise `false`
option :experimental_timeline_enabled do |o|
o.after_set do |_, _, precedence|
Copy link
Contributor

Choose a reason for hiding this comment

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

Slightly off-topic: I've noticed we don't do this in the other deprecated settings but wonder if we should:

Keep the o.env setting so that we warn if deprecated env variables are left lying around?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's an interesting idea...

Although at this point, I was thinking that for 2.0 we'd remove all these settings 🤔. Do you think we should keep them around, potentially with the o.env as well?

Copy link
Contributor

@AlexJF AlexJF Feb 21, 2024

Choose a reason for hiding this comment

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

Nah good time to clean up house but I think it'd make sense to take this into account during the lifetime of 2.x and the deprecations that happen therein

# If you needed to disable this, please tell us why on <https://github.com/DataDog/dd-trace-rb/issues/new>,
# so we can fix it!
#
# TODO: In the future this setting may be deprecated and the timeline may no longer be optional.
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor: Is this TODO useful? It's a given that in the future anything may happen 😂

Copy link
Member Author

Choose a reason for hiding this comment

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

You're right, it's a bit too much futurology. Removed in c862874 .

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (8212e9f) 98.23% compared to head (c862874) 98.23%.
Report is 9 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3428      +/-   ##
==========================================
- Coverage   98.23%   98.23%   -0.01%     
==========================================
  Files        1277     1277              
  Lines       75141    75149       +8     
  Branches     3544     3546       +2     
==========================================
+ Hits        73817    73824       +7     
- Misses       1324     1325       +1     

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

ivoanjo added a commit that referenced this pull request Feb 21, 2024
… timeline

**What does this PR do?**

As soon as we merge #3428 the
profiler will default to timeline being enabled.

This means that the "profiler" configurations will all have timeline,
so having separate configurations for timeline does not make any sense.

**Motivation:**

Remove timeline testing configurations that no longer make sense.

**Additional Notes:**

For the configuration with GC profiling, I've removed the
`DD_PROFILING_EXPERIMENTAL_TIMELINE_ENABLED` environment variable,
since, again, timeline is on by default.

We could potentially keep a configuration without timeline around,
but we already have a lot of configurations, so for now I've chosen
not to do so.

**How to test the change?**

This can be tested by manually triggering a deploy to the
benchmarking platform.
@ivoanjo ivoanjo merged commit bf8852c into master Feb 21, 2024
219 checks passed
@ivoanjo ivoanjo deleted the ivoanjo/prof-8942-enable-ruby-timeline-default branch February 21, 2024 16:11
@github-actions github-actions bot added this to the 2.0 milestone Feb 21, 2024
@ivoanjo ivoanjo modified the milestones: 2.0, 1.21.0 Mar 14, 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