Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions manifests/cpp_httpd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ manifest:
tests/stats/test_stats.py::Test_Time_Bucketing::test_client_side_stats: missing_feature # Created by easy win activation script
tests/stats/test_stats.py::Test_Time_Bucketing::test_client_side_stats_bucket_alignment: missing_feature # Created by easy win activation script
tests/stats/test_stats.py::Test_Transport_Headers: missing_feature # Created by easy win activation script
tests/test_agentless.py: missing_feature (C++ is not in scope for agentless mode (DD_AGENTLESS_ENABLED); python-only for now)
tests/test_baggage.py::Test_Baggage_Headers_Api_Datadog: incomplete_test_app (/otel_drop_in_baggage_api_datadog endpoint is not implemented)
tests/test_baggage.py::Test_Baggage_Headers_Api_OTel: incomplete_test_app (/otel_drop_in_baggage_api_otel endpoint is not implemented)
tests/test_baggage.py::Test_Baggage_Headers_Basic: incomplete_test_app (/make_distant_call endpoint is not implemented)
Expand Down
1 change: 1 addition & 0 deletions manifests/cpp_nginx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ manifest:
tests/stats/test_stats.py::Test_Time_Bucketing::test_client_side_stats: missing_feature # Created by easy win activation script
tests/stats/test_stats.py::Test_Time_Bucketing::test_client_side_stats_bucket_alignment: missing_feature # Created by easy win activation script
tests/stats/test_stats.py::Test_Transport_Headers: missing_feature # Created by easy win activation script
tests/test_agentless.py: missing_feature (C++ is not in scope for agentless mode (DD_AGENTLESS_ENABLED); python-only for now)
tests/test_baggage.py::Test_Baggage_Headers_Api_Datadog: incomplete_test_app (/otel_drop_in_baggage_api_datadog endpoint is not implemented)
tests/test_baggage.py::Test_Baggage_Headers_Api_OTel: incomplete_test_app (/otel_drop_in_baggage_api_otel endpoint is not implemented)
tests/test_baggage.py::Test_Baggage_Headers_Basic: incomplete_test_app (/make_distant_call endpoint is not implemented)
Expand Down
2 changes: 2 additions & 0 deletions manifests/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,7 @@ manifest:
tests/auto_inject/test_auto_inject_install.py::TestSimpleInstallerAutoInjectManualAppsec: v3.36.0
tests/auto_inject/test_auto_inject_install.py::TestSimpleInstallerAutoInjectManualProfiling: bug (PROF-12209)
tests/cws/test_thread_context_sharing.py::Test_ThreadContextSharing: missing_feature (missing /security/thread_context_sharing endpoint on weblog)
tests/debugger/test_debugger_agentless.py: missing_feature (Agentless mode (DD_AGENTLESS_ENABLED) is not implemented for .NET; python-only for now)
tests/debugger/test_debugger_capture_expressions.py::Test_Debugger_Line_Capture_Expressions: missing_feature (Not yet implemented)
tests/debugger/test_debugger_capture_expressions.py::Test_Debugger_Method_Capture_Expressions: missing_feature (Not yet implemented)
tests/debugger/test_debugger_capture_expressions.py::Test_Debugger_Method_Capture_Expressions::test_complex_capture_expressions: missing_feature (Not yet implemented)
Expand Down Expand Up @@ -1212,6 +1213,7 @@ manifest:
- weblog_declaration:
uds: '>=3.43.0'
poc: '>=3.43.0'
tests/test_agentless.py: missing_feature (Agentless mode (DD_AGENTLESS_ENABLED) is not implemented for .NET; python-only for now)
tests/test_baggage.py::Test_Baggage_Headers_Api_Datadog: v3.6.0
tests/test_baggage.py::Test_Baggage_Headers_Api_OTel: bug (APMAPI-1849)
tests/test_baggage.py::Test_Baggage_Headers_Basic: v3.6.0
Expand Down
2 changes: 2 additions & 0 deletions manifests/golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1080,6 +1080,7 @@ manifest:
tests/auto_inject/test_auto_inject_install.py::TestHostAutoInjectInstallScriptAppsec: v2.0.0
tests/auto_inject/test_auto_inject_install.py::TestSimpleInstallerAutoInjectManualAppsec: v2.0.0
tests/cws/test_thread_context_sharing.py::Test_ThreadContextSharing: missing_feature (missing /security/thread_context_sharing endpoint on weblog)
tests/debugger/test_debugger_agentless.py: missing_feature (Agentless mode (DD_AGENTLESS_ENABLED) is not implemented for Go; python-only for now)
tests/debugger/test_debugger_capture_expressions.py::Test_Debugger_Line_Capture_Expressions: v2.2.3
tests/debugger/test_debugger_capture_expressions.py::Test_Debugger_Method_Capture_Expressions: v2.2.3
tests/debugger/test_debugger_capture_expressions.py::Test_Debugger_Method_Capture_Expressions::test_complex_capture_expressions: missing_feature (index expression not yet supported in Go system-probe)
Expand Down Expand Up @@ -1629,6 +1630,7 @@ manifest:
tests/stats/test_stats.py::Test_Client_Stats_With_Client_Obfuscation: v2.9.1
tests/stats/test_stats.py::Test_Client_Stats_With_Client_Obfuscation_Disabled: missing_feature
tests/stats/test_stats.py::Test_Stats_Service_Source: irrelevant (Only implemented for Java)
tests/test_agentless.py: missing_feature (Agentless mode (DD_AGENTLESS_ENABLED) is not implemented for Go; python-only for now)
tests/test_baggage.py::Test_Baggage_Headers_Api_Datadog: incomplete_test_app (/otel_drop_in_baggage_api_datadog endpoint is not implemented)
tests/test_baggage.py::Test_Baggage_Headers_Api_OTel: incomplete_test_app (/otel_drop_in_baggage_api_otel endpoint is not implemented)
tests/test_baggage.py::Test_Baggage_Headers_Basic: incomplete_test_app (/make_distant_call endpoint is not correctly implemented)
Expand Down
2 changes: 2 additions & 0 deletions manifests/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2942,6 +2942,7 @@ manifest:
- declaration: bug (SCP-962)
component_version: '>=1.5.0'
tests/cws/test_thread_context_sharing.py::Test_ThreadContextSharing: missing_feature (missing /security/thread_context_sharing endpoint on weblog)
tests/debugger/test_debugger_agentless.py: missing_feature (Agentless mode (DD_AGENTLESS_ENABLED) is not implemented for Java; python-only for now)
tests/debugger/test_debugger_capture_expressions.py::Test_Debugger_Line_Capture_Expressions:
- weblog_declaration:
"*": missing_feature
Expand Down Expand Up @@ -4270,6 +4271,7 @@ manifest:
"*": v0.0.0
spring-boot-3-native: irrelevant (/rasp/sqli endpoint is not available)
tests/stats/test_stats.py::Test_Time_Bucketing::test_client_side_stats_bucket_alignment: missing_feature
tests/test_agentless.py: missing_feature (Agentless mode (DD_AGENTLESS_ENABLED) is not implemented for Java; python-only for now)
tests/test_baggage.py::Test_Baggage_Headers_Api_Datadog: irrelevant (no Datadog API for W3C Baggage)
tests/test_baggage.py::Test_Baggage_Headers_Api_OTel:
- weblog_declaration:
Expand Down
2 changes: 2 additions & 0 deletions manifests/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1650,6 +1650,7 @@ manifest:
tests/auto_inject/test_auto_inject_install.py::TestHostAutoInjectInstallScriptAppsec: *ref_5_43_0
tests/auto_inject/test_auto_inject_install.py::TestSimpleInstallerAutoInjectManualAppsec: *ref_5_43_0
tests/cws/test_thread_context_sharing.py::Test_ThreadContextSharing: missing_feature (missing /security/thread_context_sharing endpoint on weblog)
tests/debugger/test_debugger_agentless.py: missing_feature (Agentless mode (DD_AGENTLESS_ENABLED) is not implemented for Node.js; python-only for now)
tests/debugger/test_debugger_capture_expressions.py::Test_Debugger_Line_Capture_Expressions:
- weblog_declaration:
"*": irrelevant
Expand Down Expand Up @@ -2732,6 +2733,7 @@ manifest:
tests/stats/test_stats.py::Test_Time_Bucketing::test_client_side_stats_bucket_alignment:
- component_version: ">=6.10.0" # may be before
declaration: flaky (APMLP-1755)
tests/test_agentless.py: missing_feature (Agentless mode (DD_AGENTLESS_ENABLED) is not implemented for Node.js; python-only for now)
tests/test_baggage.py::Test_Baggage_Headers_Api_Datadog:
- weblog_declaration:
"*": incomplete_test_app (endpoint not implemented)
Expand Down
2 changes: 2 additions & 0 deletions manifests/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1055,6 +1055,7 @@ manifest:
tests/auto_inject/test_auto_inject_install.py::TestSimpleInstallerAutoInjectManualAppsec: v1.9.0
tests/auto_inject/test_auto_inject_install.py::TestSimpleInstallerAutoInjectManualProfiling: v1.9.0
tests/cws/test_thread_context_sharing.py::Test_ThreadContextSharing: missing_feature (missing /security/thread_context_sharing endpoint on weblog)
tests/debugger/test_debugger_agentless.py: missing_feature (Agentless mode (DD_AGENTLESS_ENABLED) is not implemented for PHP; python-only for now)
tests/debugger/test_debugger_capture_expressions.py::Test_Debugger_Line_Capture_Expressions: missing_feature (Not yet implemented)
tests/debugger/test_debugger_capture_expressions.py::Test_Debugger_Method_Capture_Expressions:
- weblog_declaration:
Expand Down Expand Up @@ -1761,6 +1762,7 @@ manifest:
tests/stats/test_stats.py::Test_Client_Stats_With_Client_Obfuscation_Disabled: missing_feature
tests/stats/test_stats.py::Test_Error_Sampler: missing_feature (error traces dropped client-side under sampling; errors counted in stats but traces not sent)
tests/stats/test_stats.py::Test_Stats_Service_Source: irrelevant (Only implemented for Java)
tests/test_agentless.py: missing_feature (Agentless mode (DD_AGENTLESS_ENABLED) is not implemented for PHP; python-only for now)
tests/test_baggage.py::Test_Baggage_Headers_Api_Datadog:
- weblog_declaration:
laravel11x: incomplete_test_app
Expand Down
1 change: 1 addition & 0 deletions manifests/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2304,6 +2304,7 @@ manifest:
python3.12: '>=4.3.1'
uds-flask: '>=4.3.1'
uwsgi-poc: '>=4.3.1'
tests/test_agentless.py: v4.15.0
tests/test_baggage.py::Test_Baggage_Headers_Api_Datadog:
- weblog_declaration:
"*": incomplete_test_app (endpoint not implemented)
Expand Down
2 changes: 2 additions & 0 deletions manifests/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1787,6 +1787,7 @@ manifest:
tests/auto_inject/test_auto_inject_install.py::TestHostAutoInjectInstallScriptAppsec: v2.19.0
tests/auto_inject/test_auto_inject_install.py::TestSimpleInstallerAutoInjectManualAppsec: v2.19.0
tests/cws/test_thread_context_sharing.py::Test_ThreadContextSharing: missing_feature (missing /security/thread_context_sharing endpoint on weblog)
tests/debugger/test_debugger_agentless.py: missing_feature (Agentless mode (DD_AGENTLESS_ENABLED) is not implemented for Ruby; python-only for now)
tests/debugger/test_debugger_capture_expressions.py::Test_Debugger_Line_Capture_Expressions:
- weblog_declaration:
"*": irrelevant
Expand Down Expand Up @@ -2779,6 +2780,7 @@ manifest:
sinatra14: missing_feature
rails52: missing_feature
sinatra22: missing_feature
tests/test_agentless.py: missing_feature (Agentless mode (DD_AGENTLESS_ENABLED) is not implemented for Ruby; python-only for now)
tests/test_baggage.py::Test_Baggage_Headers_Api_Datadog:
- weblog_declaration:
"*": incomplete_test_app (endpoint not implemented)
Expand Down
1 change: 1 addition & 0 deletions manifests/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ manifest:
tests/stats/test_stats.py: '>=0.4.0'
tests/stats/test_stats.py::Test_Client_Stats::test_grpc_status_code: missing_feature (weblog does not implement grpc endpoint)
tests/stats/test_stats.py::Test_Stats_Service_Source::test_srv_src: irrelevant (Only implemented for Java)
tests/test_agentless.py: missing_feature (Agentless mode (DD_AGENTLESS_ENABLED) is not implemented in dd-trace-rs; python-only for now)
tests/test_baggage.py::Test_Baggage_Headers_Api_Datadog: incomplete_test_app (/otel_drop_in_baggage_api_datadog endpoint not implemented)
tests/test_baggage.py::Test_Baggage_Headers_Api_OTel: incomplete_test_app (/otel_drop_in_baggage_api_otel endpoint not implemented)
tests/test_baggage.py::Test_Baggage_Headers_Max_Bytes: missing_feature (baggage maximum size is not configurable)
Expand Down
104 changes: 104 additions & 0 deletions tests/debugger/test_debugger_agentless.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Unless explicitly stated otherwise all files in this repository are licensed under the the Apache License Version 2.0.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2021 Datadog, Inc.

"""Dynamic Instrumentation (probe upload/logs/snapshots) and Symbol DB, without a Datadog Agent.

Endpoints and header shapes below were confirmed against a live weblog build of the
(unmerged) `bob/agentless-setting` branch of dd-trace-py: logs/snapshots, diagnostics, and
Symbol DB all share the same agentless debugger intake path and `dd-evp-origin: agent-debugger`
header - the native client doesn't distinguish sub-features via evp-origin the way agent-mode
does. See tests/debugger/utils.py::AgentlessBaseDebuggerTest and
utils/_context/_scenarios/debugger_agentless.py for the scenario/interface wiring.
"""

import tests.debugger.utils as debugger
from utils import features, scenarios
from utils._context._scenarios.agentless_endtoend import AGENTLESS_MOCK_API_KEY


@features.debugger
@scenarios.debugger_agentless
class Test_Agentless_Debugger_Probe_Snapshot(debugger.AgentlessBaseDebuggerTest):
"""A log probe installed via the agentless native RC client emits a snapshot directly to
the agentless debugger intake, with no Datadog Agent involved.
"""

def setup_log_method_snapshot(self):
self.initialize_weblog_remote_config()

probes = debugger.read_probes("probe_snapshot_log_method")
for probe in probes:
probe["id"] = debugger.generate_probe_id("log")
self.set_probes(probes)

self.send_rc_probes()
if not self.wait_for_all_probes(statuses=["INSTALLED"], timeout=60):
self.setup_failures.append("Probes did not reach INSTALLED status")
return

self.send_weblog_request("/debugger/log")
self.wait_for_all_probes(statuses=["EMITTING"])
if not self.wait_for_all_snapshots(timeout=60):
self.setup_failures.append("Snapshot was not received")

def test_log_method_snapshot(self):
self.collect()

self.assert_setup_ok()
self.assert_rc_state_not_error()
self.assert_all_probes_are_emitting()

for probe_id in self.probe_ids:
assert probe_id in self.probe_snapshots, f"No snapshot was captured for probe {probe_id}"
assert len(self.probe_snapshots[probe_id]) > 0, f"No snapshot was captured for probe {probe_id}"

path = self._snapshot_paths[0]
requests = list(self._backend_interface.get_data(path))
assert len(requests) > 0, f"No request captured on {path}"

request = requests[-1]
assert request["host"] == "debugger-intake.mock-intake.invalid"
headers = {name.lower(): value for name, value in request["request"]["headers"]}
assert headers["dd-api-key"] in {AGENTLESS_MOCK_API_KEY, "--redacted--"}
assert headers["dd-evp-origin"] == "agent-debugger"
assert headers["content-type"].startswith("multipart/form-data")
assert headers["user-agent"].startswith("Tracer/")
assert "datadog-entity-id" in headers


@features.debugger_symdb
@scenarios.debugger_agentless
class Test_Agentless_SymbolDB(debugger.AgentlessBaseDebuggerTest):
"""Symbol DB, forced via _DD_SYMBOL_DATABASE_FORCE_UPLOAD, uploads directly to the agentless
debugger intake (the same unified path as logs/snapshots/diagnostics in agentless mode).
"""

def setup_symdb_upload(self):
self.initialize_weblog_remote_config()

def test_symdb_upload(self):
self.collect()
self.assert_setup_ok()

assert len(self.symbols) > 0, "No symbol files were found"

errors = []
for symbol in self.symbols:
error = symbol.get("system-tests-error")
if error is not None:
errors.append(
f"Error is: {error}, exported to file: {symbol.get('system-tests-file-path', 'No file path')}"
)
assert not errors, "Found system-tests-errors:\n" + "\n".join(f"- {err}" for err in errors)

requests = list(self._symbols_interface.get_data(self._symbols_path))
assert len(requests) > 0, f"No request captured on {self._symbols_path}"
headers = {name.lower(): value for name, value in requests[-1]["request"]["headers"]}
assert headers["dd-api-key"] in {AGENTLESS_MOCK_API_KEY, "--redacted--"}
# Symbol DB shares the same debugger intake path/evp-origin as logs/snapshots/diagnostics -
# the native client doesn't distinguish sub-features via dd-evp-origin.
assert headers["dd-evp-origin"] == "agent-debugger"
assert headers["content-type"].startswith("multipart/form-data")
assert headers["user-agent"].startswith("Tracer/")
assert "datadog-entity-id" in headers
Loading
Loading