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(runtime_metrics): enable by default #12507

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ddtrace/settings/_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ def __init__(self):
self._telemetry_dependency_collection = _get_config("DD_TELEMETRY_DEPENDENCY_COLLECTION_ENABLED", True, asbool)

self._runtime_metrics_enabled = _get_config(
"DD_RUNTIME_METRICS_ENABLED", False, asbool, "OTEL_METRICS_EXPORTER"
"DD_RUNTIME_METRICS_ENABLED", True, asbool, "OTEL_METRICS_EXPORTER"
)

self._128_bit_trace_id_enabled = _get_config("DD_TRACE_128_BIT_TRACEID_GENERATION_ENABLED", True, asbool)
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ Other

DD_RUNTIME_METRICS_ENABLED:
type: Boolean
default: False
default: True

description: |
When used with ``ddtrace-run`` this configuration enables sending runtime metrics to Datadog.
Expand Down
5 changes: 5 additions & 0 deletions releasenotes/notes/ga-runtime-metrics-4fba9b4dbe63ce0f.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
features:
- |
runtime_metrics: Enable python runtime metrics collection (ex: gc counts, thread counts, memory usage, etc) by default.
To disable this feature, set the environment variable ``DD_RUNTIME_METRICS_ENABLED`` to `false`.
2 changes: 1 addition & 1 deletion tests/integration/test_debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def test_runtime_metrics_enabled_via_manual_start():
assert f.get("runtime_metrics_enabled") is False


@pytest.mark.subprocess(ddtrace_run=True, parametrize={"DD_RUNTIME_METRICS_ENABLED": ["0", "true"]}, err=None)
@pytest.mark.subprocess(ddtrace_run=True, parametrize={"DD_RUNTIME_METRICS_ENABLED": ["0", "true", "false", "1"]}, err=None)
def test_runtime_metrics_enabled_via_env_var_start():
import os

Expand Down
2 changes: 1 addition & 1 deletion tests/telemetry/test_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def test_app_started_event(telemetry_writer, test_agent_session, mock_time):
{"name": "DD_PROFILING_MAX_FRAMES", "origin": "unknown", "value": 64},
{"name": "DD_REMOTE_CONFIGURATION_ENABLED", "origin": "unknown", "value": False},
{"name": "DD_REMOTE_CONFIG_POLL_INTERVAL_SECONDS", "origin": "unknown", "value": 5.0},
{"name": "DD_RUNTIME_METRICS_ENABLED", "origin": "unknown", "value": False},
{"name": "DD_RUNTIME_METRICS_ENABLED", "origin": "unknown", "value": True},
{"name": "DD_SERVICE_MAPPING", "origin": "unknown", "value": ""},
{"name": "DD_SPAN_SAMPLING_RULES", "origin": "unknown", "value": None},
{"name": "DD_SPAN_SAMPLING_RULES_FILE", "origin": "unknown", "value": None},
Expand Down
Loading