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

feat: debug metrics #700

Merged
merged 4 commits into from
Mar 21, 2023
Merged

feat: debug metrics #700

merged 4 commits into from
Mar 21, 2023

Conversation

seemk
Copy link
Contributor

@seemk seemk commented Mar 20, 2023

  • New environment variable SPLUNK_DEBUG_METRICS_ENABLED, defaults to false.
  • If debug metrics are enabled, the following duration (ns) metrics will be collected from the profiler steps and reported as histograms:
    • splunk.profiler.cpu.start.duration
    • splunk.profiler.cpu.stop.duration
    • splunk.profiler.cpu.process.duration
    • splunk.profiler.heap.collect.duration
    • splunk.profiler.heap.process.duration

Additional changes:

  • Removed text based profiling data collection and export as the code path was completely unused.
  • As mocha runs tests in a process pool, we need a way to run tests in fresh processes due to global nature of instrumentation. For now I just added a separate testing step.

@seemk seemk requested review from a team as code owners March 20, 2023 22:53
@codecov-commenter
Copy link

codecov-commenter commented Mar 20, 2023

Codecov Report

Patch coverage: 98.07% and project coverage change: +0.50 🎉

Comparison is base (c2c2c75) 85.49% compared to head (cd5cab8) 85.99%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #700      +/-   ##
==========================================
+ Coverage   85.49%   85.99%   +0.50%     
==========================================
  Files          27       28       +1     
  Lines        1220     1264      +44     
  Branches      277      285       +8     
==========================================
+ Hits         1043     1087      +44     
  Misses        177      177              
Impacted Files Coverage Δ
src/profiling/OTLPProfilingExporter.ts 36.06% <0.00%> (ø)
src/profiling/types.ts 100.00% <ø> (ø)
src/metrics/debug_metrics.ts 100.00% <100.00%> (ø)
src/metrics/index.ts 94.73% <100.00%> (+0.33%) ⬆️
src/profiling/index.ts 92.45% <100.00%> (+0.21%) ⬆️
src/profiling/utils.ts 90.90% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@seemk seemk requested a review from a team as a code owner March 21, 2023 14:58
@seemk seemk merged commit b10f7a5 into main Mar 21, 2023
@seemk seemk deleted the debug-metrics branch March 21, 2023 15:33
@seemk seemk mentioned this pull request Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants