Skip to content

Make continuous profiling the default, rename inferred spans config option#1084

Merged
felixbarny merged 4 commits intomasterfrom
continous-profiling
Mar 16, 2020
Merged

Make continuous profiling the default, rename inferred spans config option#1084
felixbarny merged 4 commits intomasterfrom
continous-profiling

Conversation

@felixbarny
Copy link
Member

Profiling should run continuously in the background, rather than run profiling sessions which run for 10 seconds each minute for the following reasons:

  • Transactions that take longer than a profiling session will get inferred spans too
  • It's more intuitive: only whether a transaction is sampled or not should decide whether it should have inferred spans
  • Consistency in relation to distributed tracing: we don't want to be in a situation where some services within a trace create inferred spans while others do not.

The profiling_interval and profiling_duration options are removed and are hard-coded to 5s (down from 10s). This has the following advantages:

  • It takes less time for the inferred spans to appear in the UI
  • Processing is faster and more efficient as the file sizes are smaller

Also renames configuration options for consistency (everything is prefixed with profiling_inferred_spans_)

The default for the profiling_inferred_spans_sampling_interval is increased from 20ms to 50ms, which matches the default value for the wall clock mode of async-profiler.

As the inferred spans feature is marked experimental, there's no backwards compatibility with the previous configuration options. When migrating to the new options, it's best to just set both, the old and the new ones.

@felixbarny felixbarny requested a review from eyalkoren March 12, 2020 16:43
@codecov-io
Copy link

codecov-io commented Mar 12, 2020

Codecov Report

Merging #1084 into master will decrease coverage by 0.19%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1084      +/-   ##
============================================
- Coverage     60.74%   60.54%   -0.20%     
  Complexity       87       87              
============================================
  Files           320      320              
  Lines         14446    14357      -89     
  Branches       1988     1976      -12     
============================================
- Hits           8775     8693      -82     
+ Misses         5091     5082       -9     
- Partials        580      582       +2     
Impacted Files Coverage Δ Complexity Δ
...tic/apm/agent/configuration/CoreConfiguration.java 97.05% <ø> (ø) 0.00 <0.00> (ø)
...tic/apm/agent/profiler/ProfilingConfiguration.java 98.71% <100.00%> (-0.02%) 0.00 <0.00> (ø)
...a/co/elastic/apm/agent/report/ApmServerClient.java 83.00% <0.00%> (-4.33%) 0.00% <0.00%> (ø%)
...o/elastic/apm/agent/profiler/SamplingProfiler.java 77.93% <0.00%> (-0.28%) 0.00% <0.00%> (ø%)
...lastic/apm/agent/report/ReporterConfiguration.java 100.00% <0.00%> (ø) 0.00% <0.00%> (ø%)
...co/elastic/apm/agent/report/ApmServerReporter.java 59.81% <0.00%> (+3.73%) 0.00% <0.00%> (ø%)
...va/co/elastic/apm/agent/report/ReportingEvent.java 96.66% <0.00%> (+10.00%) 0.00% <0.00%> (ø%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2870994...8c44101. Read the comment docs.

@felixbarny felixbarny merged commit 5d12fd1 into master Mar 16, 2020
@SylvainJuge SylvainJuge deleted the continous-profiling branch June 15, 2020 13:31
@zube zube bot removed the [zube]: Done label Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants