Skip to content

Commit 212cdea

Browse files
committed
refactor(di): rename upload_flush_interval to upload_interval_seconds
- Rename upload_flush_interval config to upload_interval_seconds - Add deprecation support for old upload.flush_interval config key - Update uploader to use new config attribute name - Deprecated config will be removed in version 4.0 - Add a release note documenting the change Refs: DEBUG-3997
1 parent 1b249e1 commit 212cdea

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

ddtrace/debugging/_uploader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class LogsIntakeUploaderV1(ForksafeAwakeablePeriodicService):
4545
RETRY_ATTEMPTS = 3
4646

4747
def __init__(self, interval: Optional[float] = None) -> None:
48-
super().__init__(interval if interval is not None else di_config.upload_flush_interval)
48+
super().__init__(interval if interval is not None else di_config.upload_interval_seconds)
4949

5050
self._queue = self.__queue__(encoder=LogSignalJsonEncoder(di_config.service_name), on_full=self._on_buffer_full)
5151
self._collector = self.__collector__(self._queue)

ddtrace/settings/dynamic_instrumentation.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,13 @@ class DynamicInstrumentationConfig(DDConfig):
8686
help="Timeout in seconds for uploading Dynamic Instrumentation payloads",
8787
)
8888

89-
upload_flush_interval = DDConfig.v(
89+
upload_interval_seconds = DDConfig.v(
9090
float,
91-
"upload.flush_interval",
91+
"upload.interval_seconds",
9292
default=1.0, # seconds
9393
help_type="Float",
9494
help="Interval in seconds for flushing the dynamic logs upload queue",
95+
deprecations=[("upload.flush_interval", None, "4.0")],
9596
)
9697

9798
diagnostics_interval = DDConfig.v(
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
deprecations:
3+
- |
4+
dynamic instrumentation: The ``DD_DYNAMIC_INSTRUMENTATION_UPLOAD_FLUSH_INTERVAL`` environment variable has been
5+
deprecated in favor of ``DD_DYNAMIC_INSTRUMENTATION_UPLOAD_INTERVAL_SECONDS``. The old environment variable will be
6+
removed in a future major release.

0 commit comments

Comments
 (0)