Skip to content

Commit

Permalink
Merge branch 'main' into bm1549/adaptive-sampling-feature
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeauchesne authored Dec 10, 2024
2 parents 070874f + c0a6d73 commit 1445142
Show file tree
Hide file tree
Showing 98 changed files with 3,192 additions and 18,595 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/run-end-to-end.yml
Original file line number Diff line number Diff line change
Expand Up @@ -276,15 +276,9 @@ jobs:
- name: Run DEBUGGER_PROBES_STATUS scenario
if: always() && steps.build.outcome == 'success' && contains(inputs.scenarios, '"DEBUGGER_PROBES_STATUS"')
run: ./run.sh DEBUGGER_PROBES_STATUS
- name: Run DEBUGGER_METHOD_PROBES_SNAPSHOT scenario
if: always() && steps.build.outcome == 'success' && contains(inputs.scenarios, '"DEBUGGER_METHOD_PROBES_SNAPSHOT"')
run: ./run.sh DEBUGGER_METHOD_PROBES_SNAPSHOT
- name: Run DEBUGGER_LINE_PROBES_SNAPSHOT scenario
if: always() && steps.build.outcome == 'success' && contains(inputs.scenarios, '"DEBUGGER_LINE_PROBES_SNAPSHOT"')
run: ./run.sh DEBUGGER_LINE_PROBES_SNAPSHOT
- name: Run DEBUGGER_MIX_LOG_PROBE scenario
if: always() && steps.build.outcome == 'success' && contains(inputs.scenarios, '"DEBUGGER_MIX_LOG_PROBE"')
run: ./run.sh DEBUGGER_MIX_LOG_PROBE
- name: Run DEBUGGER_PROBES_SNAPSHOT scenario
if: always() && steps.build.outcome == 'success' && contains(inputs.scenarios, '"DEBUGGER_PROBES_SNAPSHOT"')
run: ./run.sh DEBUGGER_PROBES_SNAPSHOT
- name: Run DEBUGGER_PII_REDACTION scenario
if: always() && steps.build.outcome == 'success' && contains(inputs.scenarios, '"DEBUGGER_PII_REDACTION"')
run: ./run.sh DEBUGGER_PII_REDACTION
Expand Down
10 changes: 3 additions & 7 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def pytest_configure(config):
def pytest_sessionstart(session):

# get the terminal to allow logging directly in stdout
setattr(logger, "terminal", session.config.pluginmanager.get_plugin("terminalreporter"))
logger.terminal = session.config.pluginmanager.get_plugin("terminalreporter")

# if only collect tests, do not start the scenario
if not session.config.option.collectonly:
Expand Down Expand Up @@ -162,11 +162,7 @@ def _collect_item_metadata(item):

if skip_reason is not None:
# if any irrelevant declaration exists, it is the one we need to expose
if skip_reason.startswith("irrelevant"):
result["details"] = skip_reason

# otherwise, we keep the first one we found
elif result["details"] is None:
if skip_reason.startswith("irrelevant") or result["details"] is None:
result["details"] = skip_reason

if result["details"]:
Expand Down Expand Up @@ -257,7 +253,7 @@ def pytest_pycollect_makeitem(collector, name, obj):


def pytest_collection_modifyitems(session, config, items: list[pytest.Item]):
"""unselect items that are not included in the current scenario"""
"""Unselect items that are not included in the current scenario"""

logger.debug("pytest_collection_modifyitems")

Expand Down
4 changes: 1 addition & 3 deletions manifests/cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,7 @@ tests/:
test_debugger_pii.py:
Test_Debugger_PII_Redaction: irrelevant
test_debugger_probe_snapshot.py:
Test_Debugger_Line_Probe_Snaphots: irrelevant
Test_Debugger_Method_Probe_Snaphots: irrelevant
Test_Debugger_Mix_Log_Probe: irrelevant
Test_Debugger_Probe_Snaphots: irrelevant
test_debugger_probe_status.py:
Test_Debugger_Probe_Statuses: irrelevant
integrations/:
Expand Down
4 changes: 1 addition & 3 deletions manifests/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,7 @@ tests/:
test_debugger_pii.py:
Test_Debugger_PII_Redaction: v2.50.0
test_debugger_probe_snapshot.py:
Test_Debugger_Line_Probe_Snaphots: v2.53.0
Test_Debugger_Method_Probe_Snaphots: v2.53.0
Test_Debugger_Mix_Log_Probe: v2.53.0
Test_Debugger_Probe_Snaphots: v2.53.0
test_debugger_probe_status.py:
Test_Debugger_Probe_Statuses: v2.53.0
integrations/:
Expand Down
4 changes: 1 addition & 3 deletions manifests/golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -423,9 +423,7 @@ tests/:
test_debugger_pii.py:
Test_Debugger_PII_Redaction: missing_feature (feature not implented)
test_debugger_probe_snapshot.py:
Test_Debugger_Line_Probe_Snaphots: missing_feature (feature not implented)
Test_Debugger_Method_Probe_Snaphots: missing_feature (feature not implented)
Test_Debugger_Mix_Log_Probe: missing_feature (feature not implented)
Test_Debugger_Probe_Snaphots: missing_feature (feature not implented)
test_debugger_probe_status.py:
Test_Debugger_Probe_Statuses: missing_feature (feature not implented)
integrations/:
Expand Down
12 changes: 1 addition & 11 deletions manifests/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1320,7 +1320,7 @@ tests/:
spring-boot-wildfly: v1.38.0
uds-spring-boot: v1.33.0
test_debugger_probe_snapshot.py:
Test_Debugger_Line_Probe_Snaphots:
Test_Debugger_Probe_Snaphots:
'*': missing_feature
spring-boot: v1.33.0
spring-boot-jetty: v1.38.0
Expand All @@ -1329,16 +1329,6 @@ tests/:
spring-boot-undertow: v1.38.0
spring-boot-wildfly: v1.38.0
uds-spring-boot: v1.33.0
Test_Debugger_Method_Probe_Snaphots:
'*': missing_feature
spring-boot: v1.33.0
spring-boot-jetty: v1.38.0
spring-boot-openliberty: v1.38.0
spring-boot-payara: v1.38.0
spring-boot-undertow: v1.38.0
spring-boot-wildfly: v1.38.0
uds-spring-boot: v0.1
Test_Debugger_Mix_Log_Probe:
'*': missing_feature
spring-boot: v1.38.0
spring-boot-jetty: v1.38.0
Expand Down
4 changes: 1 addition & 3 deletions manifests/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -563,9 +563,7 @@ tests/:
test_debugger_pii.py:
Test_Debugger_PII_Redaction: missing_feature (feature not implented)
test_debugger_probe_snapshot.py:
Test_Debugger_Line_Probe_Snaphots: missing_feature (feature not implented)
Test_Debugger_Method_Probe_Snaphots: missing_feature (feature not implented)
Test_Debugger_Mix_Log_Probe: missing_feature (feature not implented)
Test_Debugger_Probe_Snaphots: missing_feature (feature not implented)
test_debugger_probe_status.py:
Test_Debugger_Probe_Statuses: missing_feature (feature not implented)
integrations/:
Expand Down
4 changes: 1 addition & 3 deletions manifests/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,7 @@ tests/:
test_debugger_pii.py:
Test_Debugger_PII_Redaction: irrelevant
test_debugger_probe_snapshot.py:
Test_Debugger_Line_Probe_Snaphots: irrelevant
Test_Debugger_Method_Probe_Snaphots: irrelevant
Test_Debugger_Mix_Log_Probe: irrelevant
Test_Debugger_Probe_Snaphots: irrelevant
test_debugger_probe_status.py:
Test_Debugger_Probe_Statuses: irrelevant
integrations/:
Expand Down
12 changes: 1 addition & 11 deletions manifests/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -598,17 +598,7 @@ tests/:
uds-flask: v2.11.0
uwsgi-poc: v2.11.0
test_debugger_probe_snapshot.py:
Test_Debugger_Line_Probe_Snaphots:
'*': missing_feature
flask-poc: v2.11.0
uds-flask: v2.11.0
uwsgi-poc: v2.11.0
Test_Debugger_Method_Probe_Snaphots:
'*': missing_feature
flask-poc: v2.11.0
uds-flask: v2.11.0
uwsgi-poc: v2.11.0
Test_Debugger_Mix_Log_Probe:
Test_Debugger_Probe_Snaphots:
'*': missing_feature
flask-poc: v2.11.0
uds-flask: v2.11.0
Expand Down
4 changes: 1 addition & 3 deletions manifests/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,7 @@ tests/:
test_debugger_pii.py:
Test_Debugger_PII_Redaction: missing_feature (feature not implented)
test_debugger_probe_snapshot.py:
Test_Debugger_Line_Probe_Snaphots: missing_feature (feature not implented)
Test_Debugger_Method_Probe_Snaphots: missing_feature (feature not implented)
Test_Debugger_Mix_Log_Probe: missing_feature (feature not implented)
Test_Debugger_Probe_Snaphots: missing_feature (feature not implented)
test_debugger_probe_status.py:
Test_Debugger_Probe_Statuses: missing_feature (feature not implented)
integrations/:
Expand Down
18 changes: 3 additions & 15 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,24 +77,15 @@ ignore = [
"ARG001", # unused function argument
"ARG002", # unused method argument
"ARG005", # unused lambda argument
"B010", # wat is zat?
"BLE001", # TBD
"C901", # code complexity, TBD
"COM819",
"COM819", # no extra comma, TBD
"D200",
"D210", # docstring format
"D202", # docstring format
"D208", # docstring format
"D205", # docstring format
"D209", # docstring format
"D401", # docstring format
"D403", # docstring format
"D404", # docstring format
"D410", # docstring format
"D411", # docstring format
"D413", # docstring format
"D212", # docstring format
"D417", # docstring format
"D417",
"E501", # line too long
"E722", # TBD
"E741",
Expand All @@ -110,7 +101,6 @@ ignore = [
"PLR0915", # too many statements, may be replaced by a higher default value
"PLR1714",
"PLR2004",
"PLR5501",
"PTH100",
"PTH102",
"PTH110",
Expand All @@ -131,16 +121,13 @@ ignore = [
"SIM102",
"SIM108",
"SIM110", # TBD
"SIM114",
"SIM401", # code quality, TBD
"SLF001",
"TRY002",
"TRY003", # this is a full project to enable this
"TRY201",
"TRY300",
"UP007",
"UP015",
"UP024",
"UP038", # we really want this? TBD


Expand All @@ -154,6 +141,7 @@ ignore = [
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"D107", # Missing docstring in `__init__`
"D202", # blank line after docstring
"D203", # cause a warning
"D211", # no-blank-line-before-class
"D213", # multi-line-summary-second-line
Expand Down
15 changes: 15 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,21 @@ function main() {
fi

for scenario in "${scenarios[@]}"; do
#TODO SCENARIO WAS REMOVED, TEMPORARY FIX TILL CI IS FIXED
if [[ "${scenario}" == DEBUGGER_METHOD_PROBES_SNAPSHOT ]]; then
echo "${scenario} was removed, skipping."
continue
fi
if [[ "${scenario}" == DEBUGGER_LINE_PROBES_SNAPSHOT ]]; then
echo "${scenario} was removed, skipping."
continue
fi
if [[ "${scenario}" == DEBUGGER_MIX_LOG_PROBE ]]; then
echo "${scenario} was removed, skipping."
continue
fi
####

run_scenario "${dry}" "${run_mode}" "${scenario}" "${pytest_args[@]}"
done
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"snapshot_0": {
"duration": "<scrubbed>",
"error": 1,
"meta": {
"_dd.appsec.event_rules.version": "<scrubbed>",
"_dd.debug.error.0.frame_data.class_name": "DebuggerController",
"_dd.debug.error.0.frame_data.function": "ExceptionReplayInner",
"_dd.debug.error.0.snapshot_id": "<scrubbed>",
"_dd.debug.error.exception_hash": "<scrubbed>",
"_dd.debug.error.exception_id": "<scrubbed>",
"_dd.di._eh": "-1498658543",
"_dd.di._er": "Eligible",
"_dd.iast.enabled": "1",
"_dd.runtime_family": "dotnet",
"aspnet_core.endpoint": "weblog.DebuggerController.ExceptionReplayInner (app)",
"aspnet_core.route": "debugger/exceptionreplay/inner",
"component": "aspnet_core",
"env": "system-tests",
"error.debug_info_captured": "true",
"error.msg": "Outer exception",
"error.stack": "System.Exception: Outer exception\n ---> System.Exception: Inner exception\n at weblog.DebuggerController.ExceptionReplayInner()<scrubbed>",
"error.type": "System.Exception",
"http.client_ip": "<scrubbed>",
"http.method": "GET",
"http.request.headers.host": "localhost:7777",
"http.request.headers.user-agent": "<scrubbed>",
"http.route": "debugger/exceptionreplay/inner",
"http.status_code": "500",
"http.url": "http://localhost:7777/debugger/exceptionreplay/inner",
"http.useragent": "<scrubbed>",
"key1": "val1",
"key2": "val2",
"language": "dotnet",
"network.client.ip": "<scrubbed>",
"runtime-id": "<scrubbed>",
"span.kind": "server",
"version": "<scrubbed>"
},
"metrics": "<scrubbed>",
"name": "aspnet_core.request",
"resource": "GET /debugger/exceptionreplay/inner",
"service": "weblog",
"spanID": "<scrubbed>",
"start": "<scrubbed>",
"traceID": "<scrubbed>",
"type": "web"
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"snapshot_0": {
"duration": "<scrubbed>",
"error": 1,
"meta": {
"_dd.debug.error.94.snapshot_id": "<scrubbed>",
"_dd.debug.error.exception_hash": "<scrubbed>",
"_dd.debug.error.exception_id": "<scrubbed>",
"_dd.p.tid": "<scrubbed>",
"component": "spring-web-controller",
"env": "system-tests",
"error.debug_info_captured": "true",
"error.message": "500 INTERNAL_SERVER_ERROR \"Outer exception\"; nested exception is org.springframework.web.server.ResponseStatusException: 500 INTERNAL_SERVER_ERROR \"Inner exception\"",
"error.stack": "org.springframework.web.server.ResponseStatusException: 500 INTERNAL_SERVER_ERROR \"Outer exception\"; nested exception is org.spr<scrubbed>",
"error.type": "org.springframework.web.server.ResponseStatusException",
"key1": "val1",
"key2": "val2",
"language": "jvm",
"span.kind": "server",
"thread.name": "<scrubbed>",
"version": "<scrubbed>"
},
"metrics": "<scrubbed>",
"name": "spring.handler",
"parentID": "<scrubbed>",
"resource": "DebuggerController.exceptionReplayInner",
"service": "weblog",
"spanID": "<scrubbed>",
"start": "<scrubbed>",
"traceID": "<scrubbed>",
"type": "web"
}
}

This file was deleted.

Loading

0 comments on commit 1445142

Please sign in to comment.