|
1 | 1 | import itertools
|
2 | 2 | import math
|
3 | 3 | import os
|
| 4 | +import sys |
4 | 5 | import typing as t
|
5 | 6 |
|
6 | 7 | from ddtrace.ext.git import COMMIT_SHA
|
@@ -64,6 +65,9 @@ def _check_for_stack_v2_available():
|
64 | 65 |
|
65 | 66 |
|
66 | 67 | def _parse_profiling_enabled(raw: str) -> bool:
|
| 68 | + if sys.version_info >= (3, 14): |
| 69 | + return False |
| 70 | + |
67 | 71 | # Try to derive whether we're enabled via DD_INJECTION_ENABLED
|
68 | 72 | # - Are we injected (DD_INJECTION_ENABLED set)
|
69 | 73 | # - Is profiling enabled ("profiler" in the list)
|
@@ -257,7 +261,8 @@ class ProfilingConfigStack(DDConfig):
|
257 | 261 | _v2_enabled = DDConfig.v(
|
258 | 262 | bool,
|
259 | 263 | "v2_enabled",
|
260 |
| - default=True, |
| 264 | + # Not yet supported on 3.14 |
| 265 | + default=sys.version_info < (3, 14), |
261 | 266 | help_type="Boolean",
|
262 | 267 | help="Whether to enable the v2 stack profiler. Also enables the libdatadog collector.",
|
263 | 268 | )
|
@@ -370,12 +375,14 @@ class ProfilingConfigPytorch(DDConfig):
|
370 | 375 |
|
371 | 376 | # We need to check if ddup is available, and turn off profiling if it is not.
|
372 | 377 | if not ddup_is_available:
|
373 |
| - msg = ddup_failure_msg or "libdd not available" |
374 |
| - logger.warning("Failed to load ddup module (%s), disabling profiling", msg) |
375 |
| - telemetry_writer.add_log( |
376 |
| - TELEMETRY_LOG_LEVEL.ERROR, |
377 |
| - "Failed to load ddup module (%s), disabling profiling" % ddup_failure_msg, |
378 |
| - ) |
| 378 | + # We know it is not supported on 3.14, so don't report the error, but still disable |
| 379 | + if sys.version_info < (3, 14): |
| 380 | + msg = ddup_failure_msg or "libdd not available" |
| 381 | + logger.warning("Failed to load ddup module (%s), disabling profiling", msg) |
| 382 | + telemetry_writer.add_log( |
| 383 | + TELEMETRY_LOG_LEVEL.ERROR, |
| 384 | + "Failed to load ddup module (%s), disabling profiling" % ddup_failure_msg, |
| 385 | + ) |
379 | 386 | config.enabled = False
|
380 | 387 |
|
381 | 388 | # We also need to check if stack_v2 module is available, and turn if off
|
|
0 commit comments