appmap 2.2.0__tar.gz → 3.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {appmap-2.2.0 → appmap-3.0.1}/PKG-INFO +1 -1
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/configuration.py +9 -1
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/env.py +4 -1
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/event.py +5 -4
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/expected.appmap.json +9 -9
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/pytest/expected/pytest-numpy1-no-test-cases.appmap.json +4 -4
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/pytest/expected/pytest-numpy1.appmap.json +4 -4
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/pytest/expected/pytest-numpy2-no-test-cases.appmap.json +4 -4
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/pytest/expected/pytest-numpy2.appmap.json +4 -4
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/unittest/expected/pytest.appmap.json +11 -9
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/unittest/expected/unittest-no-test-cases.appmap.json +5 -5
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/unittest/expected/unittest.appmap.json +11 -9
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/test_events.py +3 -3
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/test_http.py +2 -2
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/test_labels.py +17 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/test_params.py +4 -4
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/test_runner.py +31 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/web_framework.py +8 -8
- {appmap-2.2.0 → appmap-3.0.1}/appmap/command/runner.py +12 -2
- {appmap-2.2.0 → appmap-3.0.1}/pyproject.toml +1 -1
- {appmap-2.2.0 → appmap-3.0.1}/.gitignore +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/LICENSE +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/README.md +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/__init__.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/django.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/fastapi.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/flask.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/generation.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/importer.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/instrument.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/labels.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/metadata.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/noappmap.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/py_version_check.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/recorder.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/recording.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/remote_recording.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/singleton.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/__init__.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/appmap_test_base.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/bin/server_runner +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/conftest.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/appmap-all-paths-malformed.yml +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/appmap-broken.yml +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/appmap-class.yml +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/appmap-empty-path.yml +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/appmap-exclude-fn.yml +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/appmap-func.yml +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/appmap-malformed-path.yml +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/appmap-no-pyyaml.yml +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/appmap.yml +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/appmap_testing/__init__.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/appmap_testing/django_simplelazyobject.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/config/src/package/__init__.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/config/test/__init__.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/config/test/foo.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/config-exclude/.hide/hidden_mod/__init__.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/config-exclude/node_modules/node_mod/__init__.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/config-exclude/src/package/__init__.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/config-exclude/test/__init__.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/config-exclude/venv/venv_mod/__init__.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/config-up/appmap.yml +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/config-up/project/p1/__init__.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/config-up/project/p2/sub1/__init__.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/django/appmap.yml +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/django/djangoapp/__init__.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/django/djangoapp/djangoapp.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/django/djangoapp/hello_world.html +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/django/djangoapp/middleware.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/django/djangoapp/settings.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/django/djangoapp/settings_dev.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/django/djangoapp/urls.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/django/init/sitecustomize.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/django/manage.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/django/pytest.ini +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/django/test/__init__.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/django/test/test_app.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/django/test/test_request.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/django/test/test_unittest_setup.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/example_class.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/fastapi/appmap.yml +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/fastapi/fastapiapp/__init__.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/fastapi/fastapiapp/main.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/fastapi/init/sitecustomize.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/fastapi/test_app.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/flask/appmap.yml +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/flask/flaskapp.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/flask/init/sitecustomize.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/flask/templates/test.html +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/flask/test_app.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/flask-instrumented/appmap.yml +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/flask-instrumented/flaskapp.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/flask-instrumented/init/sitecustomize.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/flask-instrumented/test_app.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/package1/__init__.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/package1/package2/__init__.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/package1/package2/__main__.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/package1/package2/mod1.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/params.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/properties_class.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/pytest/appmap-no-test-cases.yml +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/pytest/appmap.yml +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/pytest/expected/status_errored.metadata.json +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/pytest/expected/status_failed.metadata.json +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/pytest/expected/status_xfailed.metadata.json +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/pytest/expected/status_xsucceeded.metadata.json +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/pytest/simple.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/pytest/tests/__init__.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/pytest/tests/test_noappmap.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/pytest/tests/test_simple.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/pytest-instrumented/appmap.yml +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/pytest-instrumented/init/sitecustomize.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/pytest-instrumented/test_instrumented.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/remote.appmap.json +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/trial/.gitignore +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/trial/appmap-no-test-cases.yml +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/trial/appmap.yml +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/trial/expected/pytest-no-test-cases.appmap.json +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/trial/expected/pytest.appmap.json +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/trial/init/sitecustomize.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/trial/test/__init__.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/trial/test/test_deferred.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/unittest/appmap-no-test-cases.yml +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/unittest/appmap.yml +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/unittest/expected/status_errored.metadata.json +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/unittest/expected/status_failed.metadata.json +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/unittest/expected/status_xfailed.metadata.json +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/unittest/expected/status_xsucceeded.metadata.json +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/unittest/init/sitecustomize.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/unittest/simple/__init__.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/unittest/simple/test_noappmap.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/unittest/simple/test_simple.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/helpers.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/normalize.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/test_command.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/test_configuration.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/test_describe_value.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/test_django.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/test_django_simplelazyobject.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/test_env.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/test_fastapi.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/test_flask.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/test_generation.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/test_importer.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/test_metadata.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/test_properties.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/test_recording.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/test_sqlalchemy.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/test_test_frameworks.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/test/test_util.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/testing_framework.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/trace_logger.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/unittest.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/utils.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/web_framework.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/wrapt/LICENSE +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/wrapt/__init__.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/wrapt/arguments.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/wrapt/decorators.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/wrapt/importer.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/_appmap/wrapt/wrappers.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/appmap/__init__.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/appmap/command/__init__.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/appmap/command/appmap_agent_init.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/appmap/command/appmap_agent_status.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/appmap/command/appmap_agent_validate.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/appmap/django.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/appmap/fastapi.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/appmap/flask.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/appmap/http.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/appmap/labeling/__init__.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/appmap/labeling/crypto.yml +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/appmap/labeling/django.yml +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/appmap/labeling/flask.yml +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/appmap/labeling/formats.yml +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/appmap/labeling/http.yml +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/appmap/labeling/jobs.yml +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/appmap/labeling/jwt.yml +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/appmap/labeling/logger.yml +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/appmap/labeling/random.yml +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/appmap/pytest.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/appmap/sqlalchemy.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/appmap/unittest.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/appmap/uvicorn.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/appmap.pth +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/vendor/_appmap/wrapt/LICENSE +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/vendor/_appmap/wrapt/__init__.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/vendor/_appmap/wrapt/arguments.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/vendor/_appmap/wrapt/decorators.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/vendor/_appmap/wrapt/importer.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/vendor/_appmap/wrapt/wrappers.py +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/vendor/patches/wrapt.patch +0 -0
- {appmap-2.2.0 → appmap-3.0.1}/vendor/vendor.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: appmap
|
|
3
|
-
Version:
|
|
3
|
+
Version: 3.0.1
|
|
4
4
|
Summary: Create AppMap files by recording a Python application.
|
|
5
5
|
Project-URL: Homepage, https://github.com/applandinc/appmap-python
|
|
6
6
|
Author-email: Alan Potter <alan@app.land>, Viraj Kanwade <viraj.kanwade@forgeahead.io>, Rafał Rzepecki <rafal@app.land>
|
|
@@ -508,5 +508,13 @@ if _startup_messages_shown is None:
|
|
|
508
508
|
logger.info("file: %s", c._file if c.file_present else "[no appmap.yml]")
|
|
509
509
|
logger.info("config: %r", c)
|
|
510
510
|
logger.debug("package_functions: %s", c.package_functions)
|
|
511
|
-
|
|
511
|
+
# Only log AppMap's own settings, never the full environment: arbitrary
|
|
512
|
+
# environment variables (API keys, credentials, tokens, etc.) must never
|
|
513
|
+
# end up in application logs.
|
|
514
|
+
appmap_env = {
|
|
515
|
+
k: v
|
|
516
|
+
for k, v in os.environ.items()
|
|
517
|
+
if k in ("APPMAP", "_APPMAP") or k.startswith(("APPMAP_", "_APPMAP_"))
|
|
518
|
+
}
|
|
519
|
+
logger.info("env: %r", appmap_env)
|
|
512
520
|
os.environ["_APPMAP_MESSAGES_SHOWN"] = "true"
|
|
@@ -168,7 +168,10 @@ class Env(metaclass=SingletonMeta):
|
|
|
168
168
|
trace_logger.install()
|
|
169
169
|
|
|
170
170
|
log_level = self.get("APPMAP_LOG_LEVEL", "warn").upper()
|
|
171
|
-
|
|
171
|
+
# No log file unless the user opts in: it can contain data (e.g.
|
|
172
|
+
# rendered parameter values) that shouldn't be written to disk or
|
|
173
|
+
# committed to source control by default.
|
|
174
|
+
disable_log = os.environ.get("APPMAP_DISABLE_LOG_FILE", "true").upper() != "FALSE"
|
|
172
175
|
log_config = self.get("APPMAP_LOG_CONFIG")
|
|
173
176
|
config_dict = {
|
|
174
177
|
"version": 1,
|
|
@@ -47,13 +47,14 @@ class _EventIds:
|
|
|
47
47
|
|
|
48
48
|
def display_string(val, display_value=False):
|
|
49
49
|
# If we're asked to display parameters, make a best-effort attempt
|
|
50
|
-
# to get a string value for the parameter
|
|
51
|
-
# display is disabled, or repr() has
|
|
52
|
-
# from the class and id.
|
|
50
|
+
# to get a string value for the parameter. str types are returned as-is;
|
|
51
|
+
# other types use repr(). If parameter display is disabled, or repr() has
|
|
52
|
+
# raised, just formulate a value from the class and id.
|
|
53
53
|
value = None
|
|
54
54
|
if display_value:
|
|
55
55
|
try:
|
|
56
|
-
|
|
56
|
+
# Use issubclass(type()) instead of isinstance() to avoid side effects on lazy objects
|
|
57
|
+
value = val if issubclass(type(val), str) else repr(val)
|
|
57
58
|
except Exception: # pylint: disable=broad-except
|
|
58
59
|
pass
|
|
59
60
|
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
{
|
|
24
24
|
"return_value": {
|
|
25
25
|
"class": "builtins.str",
|
|
26
|
-
"value": "
|
|
26
|
+
"value": "ExampleClass.static_method\n...\n"
|
|
27
27
|
},
|
|
28
28
|
"parent_id": 1,
|
|
29
29
|
"id": 2,
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
{
|
|
50
50
|
"return_value": {
|
|
51
51
|
"class": "builtins.str",
|
|
52
|
-
"value": "
|
|
52
|
+
"value": "ClassMethodMixin#class_method, cls ExampleClass"
|
|
53
53
|
},
|
|
54
54
|
"parent_id": 3,
|
|
55
55
|
"id": 4,
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
{
|
|
76
76
|
"return_value": {
|
|
77
77
|
"class": "builtins.str",
|
|
78
|
-
"value": "
|
|
78
|
+
"value": "Super#instance_method"
|
|
79
79
|
},
|
|
80
80
|
"parent_id": 5,
|
|
81
81
|
"id": 6,
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
"name": "data",
|
|
128
128
|
"kind": "req",
|
|
129
129
|
"class": "builtins.str",
|
|
130
|
-
"value": "
|
|
130
|
+
"value": "ExampleClass.call_yaml"
|
|
131
131
|
}
|
|
132
132
|
],
|
|
133
133
|
"id": 10,
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
"name": "data",
|
|
145
145
|
"kind": "req",
|
|
146
146
|
"class": "builtins.str",
|
|
147
|
-
"value": "
|
|
147
|
+
"value": "ExampleClass.call_yaml"
|
|
148
148
|
},
|
|
149
149
|
{
|
|
150
150
|
"name": "stream",
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
{
|
|
177
177
|
"return_value": {
|
|
178
178
|
"class": "builtins.str",
|
|
179
|
-
"value": "
|
|
179
|
+
"value": "ExampleClass.call_yaml\n...\n"
|
|
180
180
|
},
|
|
181
181
|
"parent_id": 11,
|
|
182
182
|
"id": 12,
|
|
@@ -190,7 +190,7 @@
|
|
|
190
190
|
"name": "data",
|
|
191
191
|
"kind": "req",
|
|
192
192
|
"class": "builtins.str",
|
|
193
|
-
"value": "
|
|
193
|
+
"value": "ExampleClass.call_yaml"
|
|
194
194
|
},
|
|
195
195
|
{
|
|
196
196
|
"name": "stream",
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
{
|
|
223
223
|
"return_value": {
|
|
224
224
|
"class": "builtins.str",
|
|
225
|
-
"value": "
|
|
225
|
+
"value": "ExampleClass.call_yaml\n...\n"
|
|
226
226
|
},
|
|
227
227
|
"parent_id": 13,
|
|
228
228
|
"id": 14,
|
|
@@ -334,4 +334,4 @@
|
|
|
334
334
|
]
|
|
335
335
|
}
|
|
336
336
|
]
|
|
337
|
-
}
|
|
337
|
+
}
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
{
|
|
57
57
|
"return_value": {
|
|
58
58
|
"class": "builtins.str",
|
|
59
|
-
"value": "
|
|
59
|
+
"value": "Hello"
|
|
60
60
|
},
|
|
61
61
|
"parent_id": 2,
|
|
62
62
|
"id": 3,
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
{
|
|
84
84
|
"return_value": {
|
|
85
85
|
"class": "builtins.str",
|
|
86
|
-
"value": "
|
|
86
|
+
"value": "world!"
|
|
87
87
|
},
|
|
88
88
|
"parent_id": 4,
|
|
89
89
|
"id": 5,
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
{
|
|
94
94
|
"return_value": {
|
|
95
95
|
"class": "builtins.str",
|
|
96
|
-
"value": "
|
|
96
|
+
"value": "Hello world!"
|
|
97
97
|
},
|
|
98
98
|
"parent_id": 1,
|
|
99
99
|
"id": 6,
|
|
@@ -239,4 +239,4 @@
|
|
|
239
239
|
]
|
|
240
240
|
}
|
|
241
241
|
]
|
|
242
|
-
}
|
|
242
|
+
}
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
68
|
"return_value": {
|
|
69
|
-
"value": "
|
|
69
|
+
"value": "Hello",
|
|
70
70
|
"class": "builtins.str"
|
|
71
71
|
},
|
|
72
72
|
"parent_id": 3,
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
},
|
|
94
94
|
{
|
|
95
95
|
"return_value": {
|
|
96
|
-
"value": "
|
|
96
|
+
"value": "world!",
|
|
97
97
|
"class": "builtins.str"
|
|
98
98
|
},
|
|
99
99
|
"parent_id": 5,
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
},
|
|
104
104
|
{
|
|
105
105
|
"return_value": {
|
|
106
|
-
"value": "
|
|
106
|
+
"value": "Hello world!",
|
|
107
107
|
"class": "builtins.str"
|
|
108
108
|
},
|
|
109
109
|
"parent_id": 2,
|
|
@@ -278,4 +278,4 @@
|
|
|
278
278
|
]
|
|
279
279
|
}
|
|
280
280
|
]
|
|
281
|
-
}
|
|
281
|
+
}
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
{
|
|
57
57
|
"return_value": {
|
|
58
58
|
"class": "builtins.str",
|
|
59
|
-
"value": "
|
|
59
|
+
"value": "Hello"
|
|
60
60
|
},
|
|
61
61
|
"parent_id": 2,
|
|
62
62
|
"id": 3,
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
{
|
|
84
84
|
"return_value": {
|
|
85
85
|
"class": "builtins.str",
|
|
86
|
-
"value": "
|
|
86
|
+
"value": "world!"
|
|
87
87
|
},
|
|
88
88
|
"parent_id": 4,
|
|
89
89
|
"id": 5,
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
{
|
|
94
94
|
"return_value": {
|
|
95
95
|
"class": "builtins.str",
|
|
96
|
-
"value": "
|
|
96
|
+
"value": "Hello world!"
|
|
97
97
|
},
|
|
98
98
|
"parent_id": 1,
|
|
99
99
|
"id": 6,
|
|
@@ -239,4 +239,4 @@
|
|
|
239
239
|
]
|
|
240
240
|
}
|
|
241
241
|
]
|
|
242
|
-
}
|
|
242
|
+
}
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
68
|
"return_value": {
|
|
69
|
-
"value": "
|
|
69
|
+
"value": "Hello",
|
|
70
70
|
"class": "builtins.str"
|
|
71
71
|
},
|
|
72
72
|
"parent_id": 3,
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
},
|
|
94
94
|
{
|
|
95
95
|
"return_value": {
|
|
96
|
-
"value": "
|
|
96
|
+
"value": "world!",
|
|
97
97
|
"class": "builtins.str"
|
|
98
98
|
},
|
|
99
99
|
"parent_id": 5,
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
},
|
|
104
104
|
{
|
|
105
105
|
"return_value": {
|
|
106
|
-
"value": "
|
|
106
|
+
"value": "Hello world!",
|
|
107
107
|
"class": "builtins.str"
|
|
108
108
|
},
|
|
109
109
|
"parent_id": 2,
|
|
@@ -278,4 +278,4 @@
|
|
|
278
278
|
]
|
|
279
279
|
}
|
|
280
280
|
]
|
|
281
|
-
}
|
|
281
|
+
}
|
|
@@ -53,12 +53,14 @@
|
|
|
53
53
|
"class": "simple.Simple",
|
|
54
54
|
"value": "<simple.Simple object at 0xabcdef>"
|
|
55
55
|
},
|
|
56
|
-
"parameters": [
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
56
|
+
"parameters": [
|
|
57
|
+
{
|
|
58
|
+
"class": "builtins.str",
|
|
59
|
+
"kind": "req",
|
|
60
|
+
"name": "bang",
|
|
61
|
+
"value": "!"
|
|
62
|
+
}
|
|
63
|
+
],
|
|
62
64
|
"id": 2,
|
|
63
65
|
"event": "call",
|
|
64
66
|
"thread_id": 1
|
|
@@ -83,7 +85,7 @@
|
|
|
83
85
|
{
|
|
84
86
|
"return_value": {
|
|
85
87
|
"class": "builtins.str",
|
|
86
|
-
"value": "
|
|
88
|
+
"value": "Hello"
|
|
87
89
|
},
|
|
88
90
|
"parent_id": 3,
|
|
89
91
|
"id": 4,
|
|
@@ -110,7 +112,7 @@
|
|
|
110
112
|
{
|
|
111
113
|
"return_value": {
|
|
112
114
|
"class": "builtins.str",
|
|
113
|
-
"value": "
|
|
115
|
+
"value": "world"
|
|
114
116
|
},
|
|
115
117
|
"parent_id": 5,
|
|
116
118
|
"id": 6,
|
|
@@ -120,7 +122,7 @@
|
|
|
120
122
|
{
|
|
121
123
|
"return_value": {
|
|
122
124
|
"class": "builtins.str",
|
|
123
|
-
"value": "
|
|
125
|
+
"value": "Hello world!"
|
|
124
126
|
},
|
|
125
127
|
"parent_id": 2,
|
|
126
128
|
"id": 7,
|
{appmap-2.2.0 → appmap-3.0.1}/_appmap/test/data/unittest/expected/unittest-no-test-cases.appmap.json
RENAMED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"parameters": [
|
|
36
36
|
{
|
|
37
37
|
"kind": "req",
|
|
38
|
-
"value": "
|
|
38
|
+
"value": "!",
|
|
39
39
|
"name": "bang",
|
|
40
40
|
"class": "builtins.str"
|
|
41
41
|
}
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
69
|
"return_value": {
|
|
70
|
-
"value": "
|
|
70
|
+
"value": "Hello",
|
|
71
71
|
"class": "builtins.str"
|
|
72
72
|
},
|
|
73
73
|
"parent_id": 2,
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
},
|
|
95
95
|
{
|
|
96
96
|
"return_value": {
|
|
97
|
-
"value": "
|
|
97
|
+
"value": "world",
|
|
98
98
|
"class": "builtins.str"
|
|
99
99
|
},
|
|
100
100
|
"parent_id": 4,
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
},
|
|
105
105
|
{
|
|
106
106
|
"return_value": {
|
|
107
|
-
"value": "
|
|
107
|
+
"value": "Hello world!",
|
|
108
108
|
"class": "builtins.str"
|
|
109
109
|
},
|
|
110
110
|
"parent_id": 1,
|
|
@@ -145,4 +145,4 @@
|
|
|
145
145
|
]
|
|
146
146
|
}
|
|
147
147
|
]
|
|
148
|
-
}
|
|
148
|
+
}
|
|
@@ -53,12 +53,14 @@
|
|
|
53
53
|
"class": "simple.Simple",
|
|
54
54
|
"value": "<simple.Simple object at 0xabcdef>"
|
|
55
55
|
},
|
|
56
|
-
"parameters": [
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
56
|
+
"parameters": [
|
|
57
|
+
{
|
|
58
|
+
"class": "builtins.str",
|
|
59
|
+
"kind": "req",
|
|
60
|
+
"name": "bang",
|
|
61
|
+
"value": "!"
|
|
62
|
+
}
|
|
63
|
+
],
|
|
62
64
|
"id": 2,
|
|
63
65
|
"event": "call",
|
|
64
66
|
"thread_id": 1
|
|
@@ -83,7 +85,7 @@
|
|
|
83
85
|
{
|
|
84
86
|
"return_value": {
|
|
85
87
|
"class": "builtins.str",
|
|
86
|
-
"value": "
|
|
88
|
+
"value": "Hello"
|
|
87
89
|
},
|
|
88
90
|
"parent_id": 3,
|
|
89
91
|
"id": 4,
|
|
@@ -110,7 +112,7 @@
|
|
|
110
112
|
{
|
|
111
113
|
"return_value": {
|
|
112
114
|
"class": "builtins.str",
|
|
113
|
-
"value": "
|
|
115
|
+
"value": "world"
|
|
114
116
|
},
|
|
115
117
|
"parent_id": 5,
|
|
116
118
|
"id": 6,
|
|
@@ -120,7 +122,7 @@
|
|
|
120
122
|
{
|
|
121
123
|
"return_value": {
|
|
122
124
|
"class": "builtins.str",
|
|
123
|
-
"value": "
|
|
125
|
+
"value": "Hello world!"
|
|
124
126
|
},
|
|
125
127
|
"parent_id": 2,
|
|
126
128
|
"id": 7,
|
|
@@ -132,11 +132,11 @@ class TestEvents:
|
|
|
132
132
|
|
|
133
133
|
assert result == "hello"
|
|
134
134
|
call_event = r.events[0]
|
|
135
|
-
# Parameter value should be the
|
|
136
|
-
assert call_event.parameters[0]["value"] == "
|
|
135
|
+
# Parameter value should be the raw string, not repr-quoted
|
|
136
|
+
assert call_event.parameters[0]["value"] == "hello"
|
|
137
137
|
# Return value should also be displayed
|
|
138
138
|
return_event = r.events[1]
|
|
139
|
-
assert return_event.return_value["value"] == "
|
|
139
|
+
assert return_event.return_value["value"] == "hello"
|
|
140
140
|
|
|
141
141
|
# Unlabeled method should not have its params displayed, even in the same recording
|
|
142
142
|
call_event_unlabeled = r.events[2]
|
|
@@ -29,8 +29,8 @@ def test_http_client_capture(mock_requests, events):
|
|
|
29
29
|
}
|
|
30
30
|
message = request.message
|
|
31
31
|
assert message[0] == DictIncluding({"name": "q", "value": "['one', 'two']"})
|
|
32
|
-
assert (message[1] == DictIncluding({"name": "q2", "value": "
|
|
33
|
-
message[1] == DictIncluding({"name": "q2", "value": "
|
|
32
|
+
assert (message[1] == DictIncluding({"name": "q2", "value": "🦠"})) or (
|
|
33
|
+
message[1] == DictIncluding({"name": "q2", "value": "\\U0001f9a0"})
|
|
34
34
|
)
|
|
35
35
|
|
|
36
36
|
assert events[3].http_client_response == DictIncluding(
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import pytest
|
|
2
2
|
|
|
3
|
+
import appmap
|
|
3
4
|
from _appmap.wrapt import BoundFunctionWrapper, FunctionWrapper
|
|
4
5
|
|
|
5
6
|
|
|
@@ -55,6 +56,22 @@ class TestLabels:
|
|
|
55
56
|
|
|
56
57
|
verify_example_appmap(check_labels, "instance_method")
|
|
57
58
|
|
|
59
|
+
@pytest.mark.appmap_enabled(config="appmap-no-pyyaml.yml")
|
|
60
|
+
def test_labeled_function_recorded_without_package(self):
|
|
61
|
+
"""A labeled function is recorded even when its package is not in the config."""
|
|
62
|
+
import yaml # pylint: disable=import-outside-toplevel
|
|
63
|
+
|
|
64
|
+
rec = appmap.Recording()
|
|
65
|
+
with rec:
|
|
66
|
+
yaml.dump({"key": "value"})
|
|
67
|
+
|
|
68
|
+
# yaml.dump should appear in the recording events because it's labeled
|
|
69
|
+
# by the formats preset, even though PyYAML is not in the packages list.
|
|
70
|
+
call_events = [e for e in rec.events if e.event == "call"]
|
|
71
|
+
assert any(
|
|
72
|
+
e.method_id == "dump" and "yaml" in e.defined_class for e in call_events
|
|
73
|
+
), f"Expected yaml.dump in recorded events, got: {[e.method_id for e in call_events]}"
|
|
74
|
+
|
|
58
75
|
def test_function_only_in_mod(self, verify_example_appmap):
|
|
59
76
|
def check_labels(*_):
|
|
60
77
|
# pylint: disable=import-outside-toplevel
|
|
@@ -108,7 +108,7 @@ class TestStaticMethods(TestMethodBase):
|
|
|
108
108
|
"name": "p",
|
|
109
109
|
"class": "builtins.str",
|
|
110
110
|
"kind": "req",
|
|
111
|
-
"value": "
|
|
111
|
+
"value": "static",
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
|
|
@@ -131,7 +131,7 @@ class TestClassMethods(TestMethodBase):
|
|
|
131
131
|
self.assert_parameter(
|
|
132
132
|
evt,
|
|
133
133
|
0,
|
|
134
|
-
{"name": "p", "class": "builtins.str", "kind": "req", "value": "
|
|
134
|
+
{"name": "p", "class": "builtins.str", "kind": "req", "value": "cls"},
|
|
135
135
|
)
|
|
136
136
|
|
|
137
137
|
|
|
@@ -145,7 +145,7 @@ class TestInstanceMethods(TestMethodBase):
|
|
|
145
145
|
@pytest.mark.parametrize(
|
|
146
146
|
"params,arg,expected",
|
|
147
147
|
[
|
|
148
|
-
("one", "world", ("builtins.str", "
|
|
148
|
+
("one", "world", ("builtins.str", "world")),
|
|
149
149
|
("one", None, ("builtins.NoneType", "None")),
|
|
150
150
|
],
|
|
151
151
|
indirect=["params"],
|
|
@@ -192,7 +192,7 @@ class TestInstanceMethods(TestMethodBase):
|
|
|
192
192
|
@pytest.mark.parametrize(
|
|
193
193
|
"params,arg,expected",
|
|
194
194
|
[
|
|
195
|
-
("one", "world", ("builtins.str", "
|
|
195
|
+
("one", "world", ("builtins.str", "world")),
|
|
196
196
|
("one", None, ("builtins.NoneType", "None")),
|
|
197
197
|
],
|
|
198
198
|
indirect=["params"],
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import os
|
|
1
2
|
import re
|
|
2
3
|
|
|
3
4
|
import pytest
|
|
@@ -37,6 +38,20 @@ def test_runner_multi_recording_type(script_runner, flag, expected):
|
|
|
37
38
|
assert len(re.findall("(?m)^APPMAP_RECORD_PYTEST=true$", result.stdout)) == expected
|
|
38
39
|
|
|
39
40
|
|
|
41
|
+
@pytest.mark.parametrize(
|
|
42
|
+
"flags,expected",
|
|
43
|
+
[
|
|
44
|
+
([], "true"),
|
|
45
|
+
(["--no-enable-log"], "true"),
|
|
46
|
+
(["--enable-log"], "false"),
|
|
47
|
+
],
|
|
48
|
+
)
|
|
49
|
+
def test_runner_log_file_disabled_by_default(script_runner, flags, expected):
|
|
50
|
+
result = script_runner.run(["appmap-python", *flags, "--record", "process"])
|
|
51
|
+
assert result.returncode == 0
|
|
52
|
+
assert re.search(f"(?m)^APPMAP_DISABLE_LOG_FILE={expected}$", result.stdout) is not None
|
|
53
|
+
|
|
54
|
+
|
|
40
55
|
@pytest.mark.script_launch_mode("subprocess")
|
|
41
56
|
class TestEnv:
|
|
42
57
|
def test_appmap_present(self, script_runner):
|
|
@@ -50,3 +65,19 @@ class TestEnv:
|
|
|
50
65
|
)
|
|
51
66
|
assert result.returncode == 0
|
|
52
67
|
assert re.match(r"true", result.stdout) is not None
|
|
68
|
+
|
|
69
|
+
def test_internal_state_not_leaked_to_child(self, script_runner):
|
|
70
|
+
# appmap-python is itself instrumented at interpreter startup (via
|
|
71
|
+
# appmap.pth), which can set internal, process-scoped _APPMAP*
|
|
72
|
+
# markers using whatever it inherited, before this script has
|
|
73
|
+
# computed the environment the child command should actually run
|
|
74
|
+
# with. Simulate that by pre-setting one such marker (the
|
|
75
|
+
# once-per-process "startup messages already shown" guard) and
|
|
76
|
+
# confirm it doesn't leak into the child's environment, which would
|
|
77
|
+
# otherwise silently suppress the child's own startup logging.
|
|
78
|
+
env = {**os.environ, "_APPMAP_MESSAGES_SHOWN": "true"}
|
|
79
|
+
result = script_runner.run(
|
|
80
|
+
["appmap-python", "printenv", "_APPMAP_MESSAGES_SHOWN"], env=env
|
|
81
|
+
)
|
|
82
|
+
assert result.returncode != 0
|
|
83
|
+
assert result.stdout == ""
|
|
@@ -45,7 +45,7 @@ class _TestFormData:
|
|
|
45
45
|
)
|
|
46
46
|
|
|
47
47
|
assert events[0].message == [
|
|
48
|
-
DictIncluding({"name": "my_param", "class": "builtins.str", "value": "
|
|
48
|
+
DictIncluding({"name": "my_param", "class": "builtins.str", "value": "example"})
|
|
49
49
|
]
|
|
50
50
|
|
|
51
51
|
@staticmethod
|
|
@@ -53,7 +53,7 @@ class _TestFormData:
|
|
|
53
53
|
client.post("/test", data={"my_param": "example"}, content_type="multipart/form-data")
|
|
54
54
|
|
|
55
55
|
assert events[0].message == [
|
|
56
|
-
DictIncluding({"name": "my_param", "class": "builtins.str", "value": "
|
|
56
|
+
DictIncluding({"name": "my_param", "class": "builtins.str", "value": "example"})
|
|
57
57
|
]
|
|
58
58
|
|
|
59
59
|
|
|
@@ -119,7 +119,7 @@ class _TestRequestCapture:
|
|
|
119
119
|
|
|
120
120
|
assert events[0].message == [
|
|
121
121
|
DictIncluding(
|
|
122
|
-
{"name": "my_param", "class": "builtins.str", "value": "
|
|
122
|
+
{"name": "my_param", "class": "builtins.str", "value": "example"}
|
|
123
123
|
)
|
|
124
124
|
]
|
|
125
125
|
assert events[0].http_server_request == DictIncluding(
|
|
@@ -142,7 +142,7 @@ class _TestRequestCapture:
|
|
|
142
142
|
|
|
143
143
|
assert events[0].message == [
|
|
144
144
|
DictIncluding(
|
|
145
|
-
{"name": "my_param", "class": "builtins.str", "value": "
|
|
145
|
+
{"name": "my_param", "class": "builtins.str", "value": "example"}
|
|
146
146
|
)
|
|
147
147
|
]
|
|
148
148
|
|
|
@@ -166,7 +166,7 @@ class _TestRequestCapture:
|
|
|
166
166
|
|
|
167
167
|
assert events[0].message == [
|
|
168
168
|
DictIncluding(
|
|
169
|
-
{"name": "my_param", "class": "builtins.str", "value": "
|
|
169
|
+
{"name": "my_param", "class": "builtins.str", "value": "example"}
|
|
170
170
|
)
|
|
171
171
|
]
|
|
172
172
|
|
|
@@ -205,7 +205,7 @@ class _TestRequestCapture:
|
|
|
205
205
|
|
|
206
206
|
assert events[0].message == [
|
|
207
207
|
DictIncluding(
|
|
208
|
-
{"name": "username", "class": "builtins.str", "value": "
|
|
208
|
+
{"name": "username", "class": "builtins.str", "value": "alice"}
|
|
209
209
|
),
|
|
210
210
|
DictIncluding({"name": "post_id", "class": "builtins.int", "value": "42"}),
|
|
211
211
|
]
|
|
@@ -222,7 +222,7 @@ class _TestFormCapture:
|
|
|
222
222
|
)
|
|
223
223
|
|
|
224
224
|
assert events[0].message == [
|
|
225
|
-
DictIncluding({"name": "my_param", "class": "builtins.str", "value": "
|
|
225
|
+
DictIncluding({"name": "my_param", "class": "builtins.str", "value": "example"})
|
|
226
226
|
]
|
|
227
227
|
|
|
228
228
|
@staticmethod
|
|
@@ -230,7 +230,7 @@ class _TestFormCapture:
|
|
|
230
230
|
client.post("/test", data={"my_param": "example"}, content_type="multipart/form-data")
|
|
231
231
|
|
|
232
232
|
assert events[0].message == [
|
|
233
|
-
DictIncluding({"name": "my_param", "class": "builtins.str", "value": "
|
|
233
|
+
DictIncluding({"name": "my_param", "class": "builtins.str", "value": "example"})
|
|
234
234
|
]
|
|
235
235
|
|
|
236
236
|
|
|
@@ -122,7 +122,7 @@ def run():
|
|
|
122
122
|
envvars[f"APPMAP_RECORD_{disabled.upper()}"] = "false"
|
|
123
123
|
|
|
124
124
|
envvars["APPMAP_DISABLE_LOG_FILE"] = (
|
|
125
|
-
"
|
|
125
|
+
"false" if parsed_args.get("enable_log", False) else "true"
|
|
126
126
|
)
|
|
127
127
|
|
|
128
128
|
if len(cmd) == 0:
|
|
@@ -130,7 +130,17 @@ def run():
|
|
|
130
130
|
print(f"{k}={v}")
|
|
131
131
|
sys.exit(0)
|
|
132
132
|
|
|
133
|
-
|
|
133
|
+
# appmap-python is itself instrumented on interpreter startup (via
|
|
134
|
+
# appmap.pth), before this point, using whatever environment it inherited
|
|
135
|
+
# rather than the envvars computed above. That incidental self-init can
|
|
136
|
+
# set internal, process-scoped state under _APPMAP*-prefixed names (e.g.
|
|
137
|
+
# the once-per-process "startup messages already shown" guard); left in
|
|
138
|
+
# place, it would carry over into the child's environment and suppress
|
|
139
|
+
# or corrupt the child's own startup behavior. Drop all of it and let
|
|
140
|
+
# envvars below re-set whatever the child actually needs.
|
|
141
|
+
child_env = {k: v for k, v in os.environ.items() if not k.startswith("_APPMAP")}
|
|
142
|
+
child_env.update(envvars)
|
|
143
|
+
os.execvpe(cmd[0], cmd, child_env)
|
|
134
144
|
|
|
135
145
|
|
|
136
146
|
if __name__ == "__main__":
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|