dd-trace-py
dd-trace-py copied to clipboard
chore(telemetry): hardcode telemetry heartbeat interval
Telemetry logs and metrics must be queued every 10 seconds. Telemetry heartbeat events must be queued and sent every 60 seconds. Currently these intervals can be modified by setting DD_TELEMETRY_HEARTBEAT_INTERVAL. We should NOT provide user's with the ability to modify these intervals. This will break aggregations and monitors in internal services.
Checklist
- [ ] The PR description includes an overview of the change
- [ ] The PR description articulates the motivation for the change
- [ ] The change includes tests OR the PR description describes a testing strategy
- [ ] The PR description notes risks associated with the change, if any
- [ ] Newly-added code is easy to change
- [ ] The change follows the library release note guidelines
- [ ] The change includes or references documentation updates if necessary
- [ ] Backport labels are set (if applicable)
Reviewer Checklist
- [ ] Title is accurate
- [ ] All changes are related to the pull request's stated goal
- [ ] Avoids breaking API changes
- [ ] Testing strategy adequately addresses listed risks
- [ ] Newly-added code is easy to change
- [ ] Release note makes sense to a user of the library
- [ ] If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment
- [ ] Backport labels are set in a manner that is consistent with the release branch maintenance policy
Datadog Report
Branch report: munir/remove-telemetry-heartbeat-interval
Commit report: 5c94765
Test service: dd-trace-py
:white_check_mark: 0 Failed, 172992 Passed, 1208 Skipped, 9h 55m 18.38s Total duration (6m 2s time saved) :snowflake: 1 New Flaky :hourglass: 1 Performance Regression
New Flaky Tests (1)
-
test_global_locks-test_threading.py- Last FailureExpand for error
ssert 4 == 2 + where 4 = len(deque([ThreadingLockAcquireEvent(timestamp=1721048381873060115, sampling_period=None, thread_id=140331748161280, thread_name='ddtrace.internal.writer.writer:AgentWriter', thread_native_id=None, task_id=None, task_name=None, frames=[DDFrame(file_name='/root/.pyenv/versions/3.7.16/lib/python3.7/threading.py', lineno=241, function_name='__enter__', class_name='Condition'), DDFrame(file_name='/root/.pyenv/versions/3.7.16/lib/python3.7/threading.py', lineno=520, function_name='set', class_name='Event'), DDFrame(file_name='/root/.pyenv/versions/3.7.16/lib/python3.7/threading.py', lineno=1207, function_name='__init__', class_name='_DummyThread'), DDFrame(file_name='/root/.pyenv/versions/3.7.16/lib/python3.7/threading.py', lineno=1235, function_name='current_thread', class_name=''), DDFrame(file_name='/root/.pyenv/versions/3.7.16/lib/python3.7/logging/__init__.py', lineno=331, function_name='__init__', class_name='LogRecord'), DDFrame(file_name='/root/.pyenv/versions/3.7.16/lib/python3.7/logging/__init__.py', lineno=1483, function_name='makeRecord', class_name='DDLogger'), DDFrame(file_name='/root/.pyenv/versions/3.7.16/lib/python3.7/logging/__init__.py', lineno=1513, function_name='_log...fig/__init__.py', lineno=192, function_name='console_main', class_name=''), DDFrame(file_name='/root/project/.riot/venv_py3716_mock_pytest_pytest-mock_coverage_pytest-cov_opentracing_hypothesis6451_gunicorn_pytest-benchmark_py-cpuinfo~800_pytest-asyncio0211_pytest-randomly_uwsgi_protobuf/lib/python3.7/site-packages/pytest/__main__.py', lineno=5, function_name='<module>', class_name=''), DDFrame(file_name='/root/.pyenv/versions/3.7.16/lib/python3.7/runpy.py', lineno=85, function_name='_run_code', class_name=''), DDFrame(file_name='/root/.pyenv/versions/3.7.16/lib/python3.7/runpy.py', lineno=208, function_name='run_module', class_name=''), DDFrame(file_name='/root/project/tests/profiling/run.py', lineno=7, function_name='<module>', class_name=''), DDFrame(file_name='/root/.pyenv/versions/3.7.16/lib/python3.7/runpy.py', lineno=85, function_name='_run_code', class_name=''), DDFrame(file_name='/root/.pyenv/versions/3.7.16/lib/python3.7/runpy.py', lineno=193, function_name='_run_module_as_main', class_name='')], nframes=38, local_root_span_id=None, span_id=None, trace_type=None, trace_resource_container=None, lock_name='global_locks.py:15:bar_lock', sampling_pct=100, wait_time_ns=707)]))
:hourglass: Performance Regressions vs Default Branch (1)
test_tracer_usage_multiprocess-test_rand.py2m 2.11s (+2m 0.21s, +6318%) - Details
Benchmarks
Benchmark execution time: 2024-07-15 13:23:08
Comparing candidate commit 5c9476591bfdbed902a45393d72ac881722028e7 in PR branch munir/remove-telemetry-heartbeat-interval with baseline commit df57a62cbcf499e2c9ecdd3771efba10b9113c2a in branch main.
Found 0 performance improvements and 0 performance regressions! Performance is the same for 214 metrics, 2 unstable metrics.
Codecov Report
Attention: Patch coverage is 0% with 28 lines in your changes missing coverage. Please review.
Project coverage is 10.42%. Comparing base (
8823cac) to head (8cb9837). Report is 4 commits behind head on main.
| Files | Patch % | Lines |
|---|---|---|
| tests/telemetry/test_writer.py | 0.00% | 16 Missing :warning: |
| ddtrace/internal/telemetry/writer.py | 0.00% | 7 Missing :warning: |
| tests/conftest.py | 0.00% | 5 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #9711 +/- ##
===========================================
- Coverage 74.48% 10.42% -64.06%
===========================================
Files 1390 1357 -33
Lines 128765 126537 -2228
===========================================
- Hits 95908 13194 -82714
- Misses 32857 113343 +80486
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Should this be backported? 🤔
Should this be backported? 🤔
Nahhh, it's not that big deal. I am making this change for maintainability. I doubt any users are using this undocumented configuration