├── .ci ├── .matrix_exclude.yml ├── .matrix_framework.yml ├── .matrix_framework_fips.yml ├── .matrix_framework_full.yml ├── .matrix_python.yml ├── .matrix_python_fips.yml ├── .matrix_python_full.yml ├── .matrix_windows.yml ├── bench.sh ├── create-arn-table.sh ├── docker │ ├── README.md │ └── util.sh ├── publish-aws.sh └── updatecli │ └── values.d │ ├── apm-data-spec.yml │ ├── apm-gherkin.yml │ ├── apm-json-specs.yml │ ├── scm.yml │ └── update-compose.yml ├── .editorconfig ├── .flake8 ├── .github ├── CODEOWNERS.yml ├── ISSUE_TEMPLATE │ ├── Bug_report.md │ └── Feature_request.md ├── PULL_REQUEST_TEMPLATE.md ├── actions │ ├── build-distribution │ │ └── action.yml │ └── packages │ │ └── action.yml ├── dependabot.yml └── workflows │ ├── README.md │ ├── build-images.yml │ ├── docs-build.yml │ ├── docs-cleanup.yml │ ├── github-commands-comment.yml │ ├── labeler.yml │ ├── matrix-command.yml │ ├── microbenchmark.yml │ ├── packages.yml │ ├── pre-commit.yml │ ├── release.yml │ ├── run-matrix.yml │ ├── test-docs.yml │ ├── test-fips.yml │ ├── test-release.yml │ ├── test-reporter.yml │ ├── test.yml │ └── updatecli.yml ├── .gitignore ├── .pre-commit-config.yaml ├── .tool-versions ├── AUTHORS ├── CHANGELOG.asciidoc ├── CONTRIBUTING.md ├── Dockerfile ├── Dockerfile.wolfi ├── LICENSE ├── MANIFEST.in ├── Makefile ├── NOTICE.md ├── README.rst ├── SECURITY.md ├── conftest.py ├── dev-utils ├── make-distribution.sh ├── make-packages.sh └── requirements.txt ├── docs ├── docset.yml ├── reference │ ├── advanced-topics.md │ ├── aiohttp-server-support.md │ ├── api-reference.md │ ├── asgi-middleware.md │ ├── azure-functions-support.md │ ├── configuration.md │ ├── django-support.md │ ├── flask-support.md │ ├── how-agent-works.md │ ├── images │ │ ├── choose-a-layer.png │ │ ├── config-layer.png │ │ ├── dynamic-config.svg │ │ └── python-lambda-env-vars.png │ ├── index.md │ ├── instrumenting-custom-code.md │ ├── lambda-support.md │ ├── logs.md │ ├── metrics.md │ ├── opentelemetry-api-bridge.md │ ├── performance-tuning.md │ ├── run-tests-locally.md │ ├── sanic-support.md │ ├── sanitizing-data.md │ ├── set-up-apm-python-agent.md │ ├── starlette-support.md │ ├── supported-technologies.md │ ├── toc.yml │ ├── tornado-support.md │ ├── upgrading-4-x.md │ ├── upgrading-5-x.md │ ├── upgrading-6-x.md │ ├── upgrading.md │ └── wrapper-support.md └── release-notes │ ├── breaking-changes.md │ ├── deprecations.md │ ├── index.md │ ├── known-issues.md │ └── toc.yml ├── elasticapm ├── __init__.py ├── base.py ├── conf │ ├── __init__.py │ └── constants.py ├── context │ ├── __init__.py │ ├── base.py │ ├── contextvars.py │ └── threadlocal.py ├── contrib │ ├── __init__.py │ ├── aiohttp │ │ ├── __init__.py │ │ ├── middleware.py │ │ └── utils.py │ ├── asgi.py │ ├── asyncio │ │ ├── __init__.py │ │ └── traces.py │ ├── celery │ │ └── __init__.py │ ├── django │ │ ├── __init__.py │ │ ├── apps.py │ │ ├── celery │ │ │ ├── __init__.py │ │ │ └── models.py │ │ ├── client.py │ │ ├── context_processors.py │ │ ├── handlers.py │ │ ├── management │ │ │ ├── __init__.py │ │ │ └── commands │ │ │ │ ├── __init__.py │ │ │ │ └── elasticapm.py │ │ ├── middleware │ │ │ ├── __init__.py │ │ │ └── wsgi.py │ │ └── utils.py │ ├── flask │ │ ├── __init__.py │ │ └── utils.py │ ├── grpc │ │ ├── __init__.py │ │ ├── async_server_interceptor.py │ │ ├── client_interceptor.py │ │ ├── server_interceptor.py │ │ └── utils.py │ ├── opentelemetry │ │ ├── __init__.py │ │ ├── context.py │ │ ├── span.py │ │ ├── trace.py │ │ └── utils.py │ ├── opentracing │ │ ├── __init__.py │ │ ├── span.py │ │ └── tracer.py │ ├── paste.py │ ├── pylons │ │ └── __init__.py │ ├── rq │ │ └── __init__.py │ ├── sanic │ │ ├── __init__.py │ │ ├── patch.py │ │ ├── sanic_types.py │ │ └── utils.py │ ├── serverless │ │ ├── __init__.py │ │ ├── aws.py │ │ ├── aws_wrapper │ │ │ ├── NOTICE.md │ │ │ ├── __init__.py │ │ │ ├── elasticapm-lambda.py │ │ │ └── elasticapm_handler.py │ │ └── azure.py │ ├── starlette │ │ ├── __init__.py │ │ └── utils.py │ ├── tornado │ │ ├── __init__.py │ │ └── utils.py │ └── twisted │ │ └── __init__.py ├── events.py ├── handlers │ ├── __init__.py │ ├── logbook.py │ ├── logging.py │ └── structlog.py ├── instrumentation │ ├── __init__.py │ ├── control.py │ ├── packages │ │ ├── __init__.py │ │ ├── asyncio │ │ │ ├── __init__.py │ │ │ ├── aiobotocore.py │ │ │ ├── aiohttp_client.py │ │ │ ├── aiomysql.py │ │ │ ├── aiopg.py │ │ │ ├── aioredis.py │ │ │ ├── asyncpg.py │ │ │ ├── base.py │ │ │ ├── dbapi2_asyncio.py │ │ │ ├── elasticsearch.py │ │ │ ├── psycopg_async.py │ │ │ ├── redis_asyncio.py │ │ │ ├── sleep.py │ │ │ └── starlette.py │ │ ├── azure.py │ │ ├── base.py │ │ ├── botocore.py │ │ ├── cassandra.py │ │ ├── dbapi2.py │ │ ├── django │ │ │ ├── __init__.py │ │ │ └── template.py │ │ ├── elasticsearch.py │ │ ├── flask.py │ │ ├── graphql.py │ │ ├── grpc.py │ │ ├── httplib2.py │ │ ├── httpx │ │ │ ├── __init__.py │ │ │ ├── async │ │ │ │ ├── __init__.py │ │ │ │ ├── httpcore.py │ │ │ │ └── httpx.py │ │ │ ├── sync │ │ │ │ ├── __init__.py │ │ │ │ ├── httpcore.py │ │ │ │ └── httpx.py │ │ │ └── utils.py │ │ ├── jinja2.py │ │ ├── kafka.py │ │ ├── mysql.py │ │ ├── mysql_connector.py │ │ ├── psycopg.py │ │ ├── psycopg2.py │ │ ├── pylibmc.py │ │ ├── pymemcache.py │ │ ├── pymongo.py │ │ ├── pymssql.py │ │ ├── pymysql.py │ │ ├── pyodbc.py │ │ ├── python_memcached.py │ │ ├── redis.py │ │ ├── requests.py │ │ ├── sqlite.py │ │ ├── starlette.py │ │ ├── tornado.py │ │ ├── urllib.py │ │ ├── urllib3.py │ │ └── zlib.py │ ├── register.py │ └── wrapper │ │ ├── __init__.py │ │ ├── __main__.py │ │ └── sitecustomize.py ├── metrics │ ├── __init__.py │ ├── base_metrics.py │ └── sets │ │ ├── __init__.py │ │ ├── breakdown.py │ │ ├── cpu.py │ │ ├── cpu_linux.py │ │ ├── cpu_psutil.py │ │ └── prometheus.py ├── middleware.py ├── processors.py ├── py.typed ├── traces.py ├── transport │ ├── __init__.py │ ├── base.py │ ├── exceptions.py │ ├── http.py │ ├── http_base.py │ └── http_urllib3.py ├── utils │ ├── __init__.py │ ├── cgroup.py │ ├── cloud.py │ ├── compat.py │ ├── deprecation.py │ ├── disttracing.py │ ├── encoding.py │ ├── json_encoder.py │ ├── logging.py │ ├── module_import.py │ ├── simplejson_encoder.py │ ├── stacks.py │ ├── threading.py │ ├── time.py │ └── wsgi.py └── version.py ├── pyproject.toml ├── scripts ├── build_docs.sh ├── install-tools.bat ├── run-benchmarks.sh └── run-tests.bat ├── setup.cfg ├── setup.py ├── tests ├── .dockerignore ├── Dockerfile ├── __init__.py ├── bdd │ ├── __init__.py │ ├── api_key_tests.py │ └── features │ │ ├── api_key.feature │ │ ├── azure_app_service_metadata.feature │ │ ├── azure_functions_metadata.feature │ │ ├── otel_bridge.feature │ │ ├── outcome.feature │ │ └── user_agent.feature ├── ca │ ├── ca.crt │ ├── ca.key │ ├── chain.crt │ ├── server.pem │ └── server_expired.pem ├── client │ ├── __init__.py │ ├── client_tests.py │ ├── dropped_spans_tests.py │ ├── exception_tests.py │ ├── py3_exception_tests.py │ ├── span_compression_tests.py │ └── transaction_tests.py ├── config │ ├── __init__.py │ ├── central_config_tests.py │ ├── config_snapshotting_tests.py │ └── tests.py ├── context │ ├── __init__.py │ ├── eventlet_threading_tests.py │ ├── gevent_threading_tests.py │ └── test_context.py ├── contrib │ ├── __init__.py │ ├── asgi │ │ ├── __init__.py │ │ ├── app.py │ │ └── asgi_tests.py │ ├── asyncio │ │ ├── __init__.py │ │ ├── aiohttp_web_tests.py │ │ ├── starlette_tests.py │ │ ├── tests.py │ │ └── tornado │ │ │ ├── __init__.py │ │ │ ├── templates │ │ │ └── test.html │ │ │ └── tornado_tests.py │ ├── celery │ │ ├── __init__.py │ │ ├── django_tests.py │ │ └── flask_tests.py │ ├── django │ │ ├── __init__.py │ │ ├── conftest.py │ │ ├── django_tests.py │ │ ├── fake1 │ │ │ └── __init__.py │ │ ├── fake2 │ │ │ └── __init__.py │ │ ├── fixtures.py │ │ ├── testapp │ │ │ ├── __init__.py │ │ │ ├── celery.py │ │ │ ├── middleware.py │ │ │ ├── models.py │ │ │ ├── nameless_route_urls.py │ │ │ ├── tasks.py │ │ │ ├── templates │ │ │ │ ├── 404.html │ │ │ │ ├── error.html │ │ │ │ ├── jinja2 │ │ │ │ │ └── jinja2_template.html │ │ │ │ └── list_users.html │ │ │ ├── urls.py │ │ │ └── views.py │ │ └── wrapper_tests.py │ ├── flask │ │ ├── __init__.py │ │ ├── fixtures.py │ │ ├── flask_tests.py │ │ ├── templates │ │ │ └── users.html │ │ └── utils.py │ ├── grpc │ │ ├── __init__.py │ │ ├── grpc_app │ │ │ ├── __init__.py │ │ │ ├── proto │ │ │ │ └── test.proto │ │ │ ├── server.py │ │ │ ├── testgrpc_pb2.py │ │ │ └── testgrpc_pb2_grpc.py │ │ └── grpc_client_tests.py │ ├── opentelemetry │ │ ├── __init__.py │ │ └── tests.py │ ├── opentracing │ │ ├── __init__.py │ │ └── tests.py │ ├── pylons │ │ ├── __init__.py │ │ └── tests.py │ ├── sanic │ │ ├── __init__.py │ │ ├── fixtures.py │ │ └── sanic_tests.py │ ├── serverless │ │ ├── __init__.py │ │ ├── aws_api2_test_data.json │ │ ├── aws_api_test_data.json │ │ ├── aws_elb_test_data.json │ │ ├── aws_lurl_test_data.json │ │ ├── aws_s3_batch_test_data.json │ │ ├── aws_s3_test_data.json │ │ ├── aws_sns_test_data.json │ │ ├── aws_sqs_test_data.json │ │ ├── aws_tests.py │ │ └── azurefunctions │ │ │ ├── __init__.py │ │ │ └── azure_functions_tests.py │ ├── test_eventlet.py │ └── twisted │ │ ├── __init__.py │ │ └── tests.py ├── docker-compose.yml ├── entrypoint.sh ├── events │ ├── __init__.py │ └── tests.py ├── fixtures.py ├── handlers │ ├── __init__.py │ ├── logbook │ │ ├── __init__.py │ │ └── logbook_tests.py │ └── logging │ │ ├── __init__.py │ │ └── logging_tests.py ├── instrumentation │ ├── __init__.py │ ├── asyncio_tests │ │ ├── __init__.py │ │ ├── aiobotocore_tests.py │ │ ├── aiohttp_client_tests.py │ │ ├── aiomysql_tests.py │ │ ├── aiopg_tests.py │ │ ├── aioredis_tests.py │ │ ├── async_elasticsearch_client_tests.py │ │ ├── asyncpg_tests.py │ │ ├── base_tests.py │ │ ├── httpx_tests.py │ │ └── redis_asyncio_tests.py │ ├── azure_tests.py │ ├── base_tests.py │ ├── botocore_tests.py │ ├── broken_class.py │ ├── cassandra_tests.py │ ├── dbapi2_tests.py │ ├── django_tests │ │ ├── __init__.py │ │ ├── conftest.py │ │ └── template_tests.py │ ├── elasticsearch_tests.py │ ├── flask_tests.py │ ├── graphql_tests.py │ ├── httplib2_tests.py │ ├── httpx_tests.py │ ├── jinja2_tests │ │ ├── __init__.py │ │ ├── jinja2_tests.py │ │ └── mytemplate.html │ ├── kafka_tests.py │ ├── mysql_connector_tests.py │ ├── mysql_tests.py │ ├── mysqlclient_tests.py │ ├── psycopg2_tests.py │ ├── psycopg_tests.py │ ├── pylibmc_tests.py │ ├── pymemcache_tests.py │ ├── pymongo_tests.py │ ├── pymssql_tests.py │ ├── pymysql_tests.py │ ├── pyodbc_tests.py │ ├── python_memcached_tests.py │ ├── redis_tests.py │ ├── requests_tests.py │ ├── sqlite_tests.py │ ├── starlette_tests.py │ ├── transactions_store_tests.py │ ├── urllib3_tests.py │ ├── urllib_tests.py │ └── wrapper │ │ ├── __init__.py │ │ ├── testapp.py │ │ └── wrapper_tests.py ├── metrics │ ├── __init__.py │ ├── base_tests.py │ ├── breakdown_tests.py │ ├── cpu_linux_tests.py │ ├── cpu_psutil_tests.py │ └── prometheus_tests.py ├── middleware │ ├── __init__.py │ └── tests.py ├── processors │ ├── __init__.py │ └── tests.py ├── requirements │ ├── lint-flake8.txt │ ├── lint-isort.txt │ ├── reqs-aiobotocore-newest.txt │ ├── reqs-aiohttp-3.0.txt │ ├── reqs-aiohttp-newest.txt │ ├── reqs-aiomysql-newest.txt │ ├── reqs-aiopg-newest.txt │ ├── reqs-aioredis-2.txt │ ├── reqs-aioredis-newest.txt │ ├── reqs-asgi-2.txt │ ├── reqs-asgi-newest.txt │ ├── reqs-asyncpg-0.28.txt │ ├── reqs-asyncpg-newest.txt │ ├── reqs-base.txt │ ├── reqs-boto3-1.5.txt │ ├── reqs-boto3-1.6.txt │ ├── reqs-boto3-newest.txt │ ├── reqs-cassandra-3.4.txt │ ├── reqs-cassandra-newest.txt │ ├── reqs-celery-5-django-3.txt │ ├── reqs-celery-5-django-4.txt │ ├── reqs-celery-5-django-5.txt │ ├── reqs-celery-5-flask-2.txt │ ├── reqs-celery-5.txt │ ├── reqs-django-1.11.txt │ ├── reqs-django-2.0.txt │ ├── reqs-django-2.1.txt │ ├── reqs-django-2.2.txt │ ├── reqs-django-3.0.txt │ ├── reqs-django-3.1.txt │ ├── reqs-django-3.2.txt │ ├── reqs-django-4.0.txt │ ├── reqs-django-4.2.txt │ ├── reqs-django-5.0.txt │ ├── reqs-django-master.txt │ ├── reqs-elasticsearch-2.txt │ ├── reqs-elasticsearch-5.txt │ ├── reqs-elasticsearch-6.txt │ ├── reqs-elasticsearch-7.txt │ ├── reqs-elasticsearch-8.txt │ ├── reqs-eventlet-newest.txt │ ├── reqs-flask-0.10.txt │ ├── reqs-flask-0.11.txt │ ├── reqs-flask-0.12.txt │ ├── reqs-flask-1.0.txt │ ├── reqs-flask-1.1.txt │ ├── reqs-flask-2.0.txt │ ├── reqs-flask-2.1.txt │ ├── reqs-flask-2.2.txt │ ├── reqs-flask-2.3.txt │ ├── reqs-flask-3.0.txt │ ├── reqs-flask-master.txt │ ├── reqs-gevent-newest.txt │ ├── reqs-graphene-2.txt │ ├── reqs-grpc-1.24.txt │ ├── reqs-grpc-newest.txt │ ├── reqs-httplib2-newest.txt │ ├── reqs-httpx-0.13.txt │ ├── reqs-httpx-0.14.txt │ ├── reqs-httpx-0.21.txt │ ├── reqs-httpx-newest.txt │ ├── reqs-jinja2-2.txt │ ├── reqs-jinja2-3.txt │ ├── reqs-kafka-python-newest.txt │ ├── reqs-memcached-newest.txt │ ├── reqs-mysql_connector-newest.txt │ ├── reqs-mysqlclient-newest.txt │ ├── reqs-none.txt │ ├── reqs-opentelemetry-newest.txt │ ├── reqs-opentracing-2.0.txt │ ├── reqs-opentracing-newest.txt │ ├── reqs-prometheus_client-newest.txt │ ├── reqs-psutil-4.0.txt │ ├── reqs-psutil-5.0.txt │ ├── reqs-psutil-newest.txt │ ├── reqs-psycopg-newest.txt │ ├── reqs-psycopg2-newest.txt │ ├── reqs-pylibmc-1.4.txt │ ├── reqs-pylibmc-newest.txt │ ├── reqs-pymemcache-3.0.txt │ ├── reqs-pymemcache-newest.txt │ ├── reqs-pymongo-3.1.txt │ ├── reqs-pymongo-3.2.txt │ ├── reqs-pymongo-3.3.txt │ ├── reqs-pymongo-3.4.txt │ ├── reqs-pymongo-3.5.txt │ ├── reqs-pymongo-3.6.txt │ ├── reqs-pymongo-newest.txt │ ├── reqs-pymssql-newest.txt │ ├── reqs-pymysql-newest.txt │ ├── reqs-pyodbc-newest.txt │ ├── reqs-redis-2.txt │ ├── reqs-redis-3.txt │ ├── reqs-redis-newest.txt │ ├── reqs-requests-newest.txt │ ├── reqs-sanic-20.12.txt │ ├── reqs-sanic-newest.txt │ ├── reqs-starlette-0.13.txt │ ├── reqs-starlette-0.14.txt │ ├── reqs-starlette-newest.txt │ ├── reqs-tornado-newest.txt │ ├── reqs-twisted-15.txt │ ├── reqs-twisted-16.txt │ ├── reqs-twisted-17.txt │ ├── reqs-twisted-18.txt │ └── reqs-twisted-newest.txt ├── scripts │ ├── docker │ │ ├── cleanup.sh │ │ ├── docs.sh │ │ └── run_tests.sh │ ├── envs │ │ ├── aiobotocore.sh │ │ ├── aiohttp.sh │ │ ├── aiomysql.sh │ │ ├── aiopg.sh │ │ ├── aioredis.sh │ │ ├── asgi.sh │ │ ├── asyncpg.sh │ │ ├── boto3.sh │ │ ├── cassandra-3.4.sh │ │ ├── cassandra-newest.sh │ │ ├── celery.sh │ │ ├── django.sh │ │ ├── elasticsearch-2.sh │ │ ├── elasticsearch-5.sh │ │ ├── elasticsearch-6.sh │ │ ├── elasticsearch-7.sh │ │ ├── elasticsearch-8.sh │ │ ├── eventlet.sh │ │ ├── flask.sh │ │ ├── gevent.sh │ │ ├── graphene.sh │ │ ├── grpc.sh │ │ ├── httplib2.sh │ │ ├── httpx.sh │ │ ├── jinja2.sh │ │ ├── kafka.sh │ │ ├── memcached.sh │ │ ├── mysql_connector.sh │ │ ├── mysqlclient.sh │ │ ├── opentelemetry.sh │ │ ├── opentracing.sh │ │ ├── prometheus_client.sh │ │ ├── psutil.sh │ │ ├── psycopg.sh │ │ ├── psycopg2.sh │ │ ├── pylibmc.sh │ │ ├── pymemcache.sh │ │ ├── pymongo-2.9.sh │ │ ├── pymongo-3.0.sh │ │ ├── pymongo-3.1.sh │ │ ├── pymongo-3.2.sh │ │ ├── pymongo-3.3.sh │ │ ├── pymongo-3.4.sh │ │ ├── pymongo-3.5.sh │ │ ├── pymongo-3.6.sh │ │ ├── pymongo-newest.sh │ │ ├── pymssql.sh │ │ ├── pymysql.sh │ │ ├── pyodbc.sh │ │ ├── redis.sh │ │ ├── requests.sh │ │ ├── sanic.sh │ │ ├── starlette.sh │ │ ├── tornado.sh │ │ └── twisted.sh │ ├── license_headers_check.sh │ └── run_tests.sh ├── transports │ ├── __init__.py │ ├── test_base.py │ ├── test_urllib3.py │ └── wrong_cert.pem ├── upstream │ └── json-specs │ │ ├── cgroup_parsing.json │ │ ├── container_metadata_discovery.json │ │ ├── error.json │ │ ├── log.json │ │ ├── metadata.json │ │ ├── metricset.json │ │ ├── service_resource_inference.json │ │ ├── span.json │ │ ├── span_types.json │ │ ├── sql_signature_examples.json │ │ ├── sql_token_examples.json │ │ ├── transaction.json │ │ ├── w3c_distributed_tracing.json │ │ └── wildcard_matcher_tests.json └── utils │ ├── __init__.py │ ├── cgroup_tests.py │ ├── cloud_tests.py │ ├── compat.py │ ├── compat_tests.py │ ├── encoding │ ├── __init__.py │ └── tests.py │ ├── json_utils │ ├── __init__.py │ ├── tests.py │ └── tests_simplejson.py │ ├── span_type_subtype_tests.py │ ├── stacks │ ├── __init__.py │ ├── linenos.py │ ├── linenos2.py │ └── tests.py │ ├── test_disttracing_header.py │ ├── test_wildcard_matcher_cases │ ├── __init__.py │ ├── conftest.py │ └── tests.py │ ├── tests.py │ ├── threading_tests.py │ └── wsgi │ ├── __init__.py │ └── tests.py └── updatecli-compose.yaml /.ci/.matrix_framework.yml: -------------------------------------------------------------------------------- 1 | # this is a limited list of matrix builds to be used for PRs 2 | # see .jenkins_framework_full.yml for a full list 3 | FRAMEWORK: 4 | - none 5 | - django-1.11 6 | - django-3.2 7 | - django-4.0 8 | - django-4.2 9 | - django-5.0 10 | - flask-0.12 11 | - flask-2.3 12 | - flask-3.0 13 | - jinja2-3 14 | - opentelemetry-newest 15 | - opentracing-newest 16 | - twisted-newest 17 | - celery-5-flask-2 18 | - celery-5-django-4 19 | - celery-5-django-5 20 | - requests-newest 21 | - boto3-newest 22 | - pymongo-newest 23 | - redis-newest 24 | - aioredis-newest 25 | #- aioredis-2 # not supported yet 26 | - psycopg-newest 27 | - psycopg2-newest 28 | - pymssql-newest 29 | - pyodbc-newest 30 | - memcached-newest 31 | - pylibmc-newest 32 | - elasticsearch-2 33 | - elasticsearch-7 34 | - elasticsearch-8 35 | - cassandra-newest 36 | - psutil-newest 37 | #- eventlet-newest 38 | - gevent-newest 39 | - mysql_connector-newest 40 | - pymysql-newest 41 | - mysqlclient-newest 42 | - aiohttp-newest 43 | - aiopg-newest 44 | - asyncpg-newest 45 | - tornado-newest 46 | # this has a dependency on requests, run it to catch update issues before merging. Drop after baseline > 0.21.0 47 | - starlette-0.14 48 | - starlette-newest 49 | - pymemcache-newest 50 | - graphene-2 51 | - httpx-newest 52 | - httplib2-newest 53 | - prometheus_client-newest 54 | - sanic-newest 55 | - aiomysql-newest 56 | - aiobotocore-newest 57 | - kafka-python-newest 58 | - grpc-newest 59 | -------------------------------------------------------------------------------- /.ci/.matrix_framework_fips.yml: -------------------------------------------------------------------------------- 1 | # this is a limited list of matrix builds to be used for PRs 2 | # see .matrix_framework_full.yml for a full list 3 | FRAMEWORK: 4 | - none 5 | - django-5.0 6 | - flask-3.0 7 | - jinja2-3 8 | - opentelemetry-newest 9 | - opentracing-newest 10 | - twisted-newest 11 | - celery-5-flask-2 12 | - celery-5-django-5 13 | - requests-newest 14 | - psutil-newest 15 | - gevent-newest 16 | - aiohttp-newest 17 | - tornado-newest 18 | - starlette-newest 19 | - graphene-2 20 | - httpx-newest 21 | - httplib2-newest 22 | - prometheus_client-newest 23 | - sanic-newest 24 | -------------------------------------------------------------------------------- /.ci/.matrix_python.yml: -------------------------------------------------------------------------------- 1 | VERSION: 2 | - python-3.6 3 | - python-3.13 4 | -------------------------------------------------------------------------------- /.ci/.matrix_python_fips.yml: -------------------------------------------------------------------------------- 1 | VERSION: 2 | - python-3.12 3 | -------------------------------------------------------------------------------- /.ci/.matrix_python_full.yml: -------------------------------------------------------------------------------- 1 | VERSION: 2 | - python-3.6 3 | - python-3.7 4 | - python-3.8 5 | - python-3.9 6 | - python-3.10 7 | - python-3.11 8 | - python-3.12 9 | - python-3.13 10 | # - pypy-3 # excluded due to build issues with SQLite/Django 11 | -------------------------------------------------------------------------------- /.ci/.matrix_windows.yml: -------------------------------------------------------------------------------- 1 | # This is the limited list of matrix builds in Windows, to be triggered on a PR basis 2 | # The format is: 3 | # VERSION: Major.Minor python version. 4 | # FRAMEWORK: What framework to be tested. String format. 5 | # ASYNCIO: Whether it's enabled or disabled. Boolean format. 6 | # 7 | # TODO: Remove this file when fully migrated to GH Actions 8 | 9 | windows: 10 | # - VERSION: "3.6" 11 | # FRAMEWORK: "none" 12 | # ASYNCIO: "true" 13 | # - VERSION: "3.7" 14 | # FRAMEWORK: "none" 15 | # ASYNCIO: "true" 16 | - VERSION: "3.8" 17 | FRAMEWORK: "none" 18 | ASYNCIO: "true" 19 | - VERSION: "3.9" # waiting for greenlet to have binary wheels for 3.9 20 | FRAMEWORK: "none" 21 | ASYNCIO: "true" 22 | -------------------------------------------------------------------------------- /.ci/bench.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -exo pipefail 3 | 4 | ## Buildkite specific configuration 5 | if [ "$CI" == "true" ] ; then 6 | # If HOME is not set then use the Buildkite workspace 7 | # that's normally happening when running in the CI 8 | # owned by Elastic. 9 | if [ -z "$HOME" ] ; then 10 | HOME=$BUILDKITE_BUILD_CHECKOUT_PATH 11 | export HOME 12 | fi 13 | 14 | # required when running the benchmark 15 | PATH=$PATH:$HOME/.local/bin 16 | export PATH 17 | fi 18 | 19 | ## Bench specific 20 | LANG='C.UTF-8' 21 | LC_ALL="${LANG}" 22 | export LANG 23 | export LC_ALL 24 | 25 | # APM_AGENT_PYTHON* env variables are provided by the Buildkite hooks. 26 | ./scripts/run-benchmarks.sh "$(pwd)" "${APM_AGENT_PYTHON_ES_URL_SECRET}" "${APM_AGENT_PYTHON_ES_USER_SECRET}" "${APM_AGENT_PYTHON_ES_PASS_SECRET}" 27 | -------------------------------------------------------------------------------- /.ci/create-arn-table.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -o pipefail 3 | 4 | # 5 | # Create the AWS ARN table given the below environment variables: 6 | # 7 | # AWS_FOLDER - that's the location of the publish-layer-version output for each region 8 | 9 | AWS_FOLDER=${AWS_FOLDER?:No aws folder provided} 10 | ARN_FILE=".arn-file.md" 11 | 12 | { 13 | echo "
" 14 | echo "Elastic APM Python agent layer ARNs" 15 | echo '' 16 | echo '|Region|ARN|' 17 | echo '|------|---|' 18 | } > "${ARN_FILE}" 19 | 20 | for f in $(ls "${AWS_FOLDER}"); do 21 | LAYER_VERSION_ARN=$(grep '"LayerVersionArn"' "$AWS_FOLDER/${f}" | cut -d":" -f2- | sed 's/ //g' | sed 's/"//g' | cut -d"," -f1) 22 | echo "INFO: create-arn-table ARN(${LAYER_VERSION_ARN}):region(${f})" 23 | echo "|${f}|${LAYER_VERSION_ARN}|" >> "${ARN_FILE}" 24 | done 25 | 26 | { 27 | echo '' 28 | echo '
' 29 | echo '' 30 | } >> "${ARN_FILE}" 31 | -------------------------------------------------------------------------------- /.ci/docker/README.md: -------------------------------------------------------------------------------- 1 | # apm-agent-python docker images for testing 2 | 3 | Utility script for building and pushing the images based on `.ci/.matrix_python_full.yml`. 4 | 5 | > :information_source: This script is mainly used in [publish-docker-images](https://github.com/elastic/apm-agent-python/actions/workflows/build-images.yml) workflow, 6 | which can be triggered safely at any time. 7 | 8 | ## Options 9 | 10 | | Name | Description | 11 | |----------|-----------------------------------------------------------| 12 | | name | Name of the docker image. (`/:`) | 13 | | registry | Registry of the docker image. (`/:`) | 14 | | action | Either `build` or `push`. | 15 | 16 | ## Usage 17 | 18 | ### Build 19 | 20 | To build the images run 21 | 22 | ```bash 23 | ./util.sh --action build 24 | ``` 25 | 26 | You can set your own docker registry with the flag `--registry x.y.z/org`. The default is `elasticobservability`. 27 | 28 | ### Push 29 | 30 | To push the images run 31 | 32 | ```bash 33 | ./util.sh --action push 34 | ``` 35 | -------------------------------------------------------------------------------- /.ci/docker/util.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | project_root=$(dirname "$(dirname "$(dirname "$(realpath "$0" )")")") 6 | 7 | IMAGE_NAME="apm-agent-python-testing" 8 | REGISTRY="elasticobservability" 9 | 10 | while (( "$#" )); do 11 | case "$1" in 12 | -n|--name) 13 | IMAGE_NAME=$2 14 | shift 2 15 | ;; 16 | -r|--registry) 17 | REGISTRY=$2 18 | shift 2 19 | ;; 20 | -a|--action) 21 | ACTION=$2 22 | shift 2 23 | ;; 24 | --) # end argument parsing 25 | shift 26 | break 27 | ;; 28 | -*|--*=) # unsupported flags 29 | echo "Error: Unsupported flag $1" >&2 30 | exit 1 31 | ;; 32 | *) # preserve positional arguments 33 | shift 34 | ;; 35 | esac 36 | done 37 | 38 | versions=$(yq '.VERSION[]' "${project_root}/.ci/.matrix_python_full.yml") 39 | 40 | for version in $versions; do 41 | 42 | full_image_name="${REGISTRY}/${IMAGE_NAME}:${version}" 43 | 44 | case $ACTION in 45 | build) 46 | cache_image="${full_image_name}" 47 | # check that we have an image before using it as a cache 48 | docker manifest inspect "${full_image_name}" || cache_image= 49 | 50 | DOCKER_BUILDKIT=1 docker build \ 51 | --progress=plain \ 52 | --cache-from="${cache_image}" \ 53 | -f "${project_root}/tests/Dockerfile" \ 54 | --build-arg PYTHON_IMAGE="${version/-/:}" \ 55 | -t "${full_image_name}" \ 56 | "${project_root}/tests" 57 | ;; 58 | push) 59 | docker push "${full_image_name}" 60 | ;; 61 | esac 62 | done 63 | -------------------------------------------------------------------------------- /.ci/updatecli/values.d/apm-data-spec.yml: -------------------------------------------------------------------------------- 1 | apm_schema_specs_path: tests/upstream/json-specs 2 | -------------------------------------------------------------------------------- /.ci/updatecli/values.d/apm-gherkin.yml: -------------------------------------------------------------------------------- 1 | apm_gherkin_specs_path: tests/bdd/features -------------------------------------------------------------------------------- /.ci/updatecli/values.d/apm-json-specs.yml: -------------------------------------------------------------------------------- 1 | apm_json_specs_path: tests/upstream/json-specs 2 | -------------------------------------------------------------------------------- /.ci/updatecli/values.d/scm.yml: -------------------------------------------------------------------------------- 1 | scm: 2 | enabled: true 3 | owner: elastic 4 | repository: apm-agent-python 5 | branch: main 6 | commitusingapi: true 7 | # begin update-compose policy values 8 | user: obltmachine 9 | email: obltmachine@users.noreply.github.com 10 | # end update-compose policy values -------------------------------------------------------------------------------- /.ci/updatecli/values.d/update-compose.yml: -------------------------------------------------------------------------------- 1 | spec: 2 | files: 3 | - "updatecli-compose.yaml" -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 4 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.asciidoc] 13 | trim_trailing_whitespace = false 14 | 15 | [Makefile] 16 | indent_style = tab 17 | 18 | [*.feature] 19 | indent_size = 2 20 | 21 | [*.yml] 22 | indent_size = 2 23 | -------------------------------------------------------------------------------- /.flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | exclude= 3 | build/**, 4 | src/**, 5 | tests/**, 6 | dist/**, 7 | conftest.py, 8 | setup.py 9 | max-line-length=120 10 | ignore=E731,W503,E203,BLK100,B301 11 | -------------------------------------------------------------------------------- /.github/CODEOWNERS.yml: -------------------------------------------------------------------------------- 1 | * @elastic/apm-agent-python 2 | /.github/actions/ @elastic/apm-agent-python @elastic/observablt-ci 3 | /.github/workflows/ @elastic/apm-agent-python @elastic/observablt-ci 4 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/Bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | 5 | --- 6 | 7 | **Describe the bug**: ... 8 | 9 | **To Reproduce** 10 | 11 | 1. ... 12 | 2. ... 13 | 3. ... 14 | 4. ... 15 | 16 | **Environment (please complete the following information)** 17 | - OS: [e.g. Linux] 18 | - Python version: 19 | - Framework and version [e.g. Django 2.1]: 20 | - APM Server version: 21 | - Agent version: 22 | 23 | 24 | **Additional context** 25 | 26 | Add any other context about the problem here. 27 | 28 | - Agent config options 29 |
30 | Click to expand 31 | 32 | ``` 33 | replace this line with your agent config options 34 | remember to mask any sensitive fields like tokens 35 | ``` 36 |
37 | - `requirements.txt`: 38 |
39 | Click to expand 40 | 41 | ``` 42 | replace this line with your `requirements.txt` 43 | ``` 44 |
45 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/Feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | 5 | --- 6 | 7 | **Is your feature request related to a problem? Please describe.** 8 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 9 | 10 | **Describe the solution you'd like** 11 | A clear and concise description of what you want to happen. 12 | 13 | **Describe alternatives you've considered** 14 | A clear and concise description of any alternative solutions or features you've considered. 15 | 16 | **Additional context** 17 | Add any other context or screenshots about the feature request here. 18 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## What does this pull request do? 2 | 3 | 6 | 7 | ## Related issues 8 | 9 | Closes #ISSUE 10 | -------------------------------------------------------------------------------- /.github/actions/build-distribution/action.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | name: common build distribution tasks 4 | description: Run the build distribution 5 | 6 | runs: 7 | using: "composite" 8 | steps: 9 | - uses: actions/setup-python@v5 10 | with: 11 | python-version: "3.10" 12 | 13 | - name: Build lambda layer zip 14 | run: ./dev-utils/make-distribution.sh 15 | shell: bash 16 | 17 | - uses: actions/upload-artifact@v4 18 | with: 19 | name: build-distribution 20 | path: ./build/ 21 | if-no-files-found: error 22 | -------------------------------------------------------------------------------- /.github/actions/packages/action.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | name: common package tasks 4 | description: Run the packages 5 | 6 | runs: 7 | using: "composite" 8 | steps: 9 | - uses: actions/setup-python@v5 10 | with: 11 | python-version: "3.10" 12 | - name: Override the version if there is no tag release. 13 | run: | 14 | if [[ "${GITHUB_REF}" != refs/tags/* ]]; then 15 | echo "ELASTIC_CI_POST_VERSION=${{ github.run_id }}" >> "${GITHUB_ENV}" 16 | fi 17 | shell: bash 18 | - name: Build packages 19 | run: ./dev-utils/make-packages.sh 20 | shell: bash 21 | - name: Upload Packages 22 | uses: actions/upload-artifact@v4 23 | with: 24 | name: packages 25 | path: | 26 | dist/*.whl 27 | dist/*tar.gz 28 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | --- 2 | version: 2 3 | registries: 4 | docker-elastic: 5 | type: docker-registry 6 | url: https://docker.elastic.co 7 | username: ${{secrets.ELASTIC_DOCKER_USERNAME}} 8 | password: ${{secrets.ELASTIC_DOCKER_PASSWORD}} 9 | 10 | updates: 11 | # Enable version updates for python 12 | - package-ecosystem: "pip" 13 | # Look for `requirements.txt` file in the `dev-utils` directory 14 | directory: "/dev-utils/" 15 | # Check for updates once a week 16 | schedule: 17 | interval: "weekly" 18 | day: "sunday" 19 | time: "22:00" 20 | ignore: 21 | - dependency-name: "urllib3" # ignore until lambda runtimes use OpenSSL 1.1.1+ 22 | versions: [">=2.0.0"] 23 | 24 | # GitHub actions 25 | - package-ecosystem: "github-actions" 26 | directories: 27 | - '/' 28 | - '/.github/actions/*' 29 | schedule: 30 | interval: "weekly" 31 | day: "sunday" 32 | time: "22:00" 33 | groups: 34 | github-actions: 35 | patterns: 36 | - "*" 37 | 38 | - package-ecosystem: "docker" 39 | directories: 40 | - '/' 41 | registries: "*" 42 | schedule: 43 | interval: "daily" 44 | -------------------------------------------------------------------------------- /.github/workflows/build-images.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: build-images 3 | 4 | on: 5 | workflow_dispatch: ~ 6 | 7 | permissions: 8 | contents: read 9 | 10 | jobs: 11 | 12 | build-push: 13 | runs-on: ubuntu-latest 14 | permissions: 15 | contents: read 16 | packages: write 17 | env: 18 | REGISTRY: ghcr.io 19 | IMAGE_NAME: ${{ github.repository }}/apm-agent-python-testing 20 | steps: 21 | 22 | - uses: actions/checkout@v4 23 | 24 | - name: Login to ghcr.io 25 | uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0 26 | with: 27 | registry: ${{ env.REGISTRY }} 28 | username: ${{ github.actor }} 29 | password: ${{ secrets.GITHUB_TOKEN }} 30 | 31 | - run: ./util.sh --action build --registry ${{ env.REGISTRY }} --name ${{ env.IMAGE_NAME }} 32 | working-directory: .ci/docker 33 | 34 | - run: ./util.sh --action push --registry ${{ env.REGISTRY }} --name ${{ env.IMAGE_NAME }} 35 | working-directory: .ci/docker 36 | -------------------------------------------------------------------------------- /.github/workflows/docs-build.yml: -------------------------------------------------------------------------------- 1 | name: docs-build 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | pull_request_target: ~ 8 | merge_group: ~ 9 | 10 | jobs: 11 | docs-preview: 12 | uses: elastic/docs-builder/.github/workflows/preview-build.yml@main 13 | with: 14 | path-pattern: docs/** 15 | permissions: 16 | deployments: write 17 | id-token: write 18 | contents: read 19 | pull-requests: read 20 | -------------------------------------------------------------------------------- /.github/workflows/docs-cleanup.yml: -------------------------------------------------------------------------------- 1 | name: docs-cleanup 2 | 3 | on: 4 | pull_request_target: 5 | types: 6 | - closed 7 | 8 | jobs: 9 | docs-preview: 10 | uses: elastic/docs-builder/.github/workflows/preview-cleanup.yml@main 11 | permissions: 12 | contents: none 13 | id-token: write 14 | deployments: write 15 | -------------------------------------------------------------------------------- /.github/workflows/github-commands-comment.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: github-commands-comment 3 | 4 | on: 5 | pull_request_target: 6 | types: 7 | - opened 8 | 9 | permissions: 10 | contents: read 11 | 12 | jobs: 13 | comment: 14 | runs-on: ubuntu-latest 15 | permissions: 16 | pull-requests: write 17 | steps: 18 | - uses: elastic/oblt-actions/elastic/github-commands@v1 19 | -------------------------------------------------------------------------------- /.github/workflows/labeler.yml: -------------------------------------------------------------------------------- 1 | name: "Issue Labeler" 2 | on: 3 | issues: 4 | types: [opened] 5 | pull_request_target: 6 | types: [opened] 7 | 8 | # '*: write' permissions for https://docs.github.com/en/rest/issues/labels?apiVersion=2022-11-28#add-labels-to-an-issue 9 | permissions: 10 | contents: read 11 | issues: write 12 | pull-requests: write 13 | 14 | jobs: 15 | triage: 16 | runs-on: ubuntu-latest 17 | env: 18 | NUMBER: ${{ github.event.issue.number || github.event.pull_request.number }} 19 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 20 | steps: 21 | - name: Get token 22 | id: get_token 23 | uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0 24 | with: 25 | app_id: ${{ secrets.OBS_AUTOMATION_APP_ID }} 26 | private_key: ${{ secrets.OBS_AUTOMATION_APP_PEM }} 27 | permissions: >- 28 | { 29 | "members": "read" 30 | } 31 | - name: Add agent-python label 32 | run: gh issue edit "$NUMBER" --add-label "agent-python" --repo "${{ github.repository }}" 33 | - id: is_elastic_member 34 | uses: elastic/oblt-actions/github/is-member-of@v1 35 | with: 36 | github-org: "elastic" 37 | github-user: ${{ github.actor }} 38 | github-token: ${{ steps.get_token.outputs.token }} 39 | - name: Add community and triage labels 40 | if: contains(steps.is_elastic_member.outputs.result, 'false') && github.actor != 'dependabot[bot]' && github.actor != 'elastic-observability-automation[bot]' 41 | run: gh issue edit "$NUMBER" --add-label "community,triage" --repo "${{ github.repository }}" 42 | -------------------------------------------------------------------------------- /.github/workflows/matrix-command.yml: -------------------------------------------------------------------------------- 1 | name: matrix-command 2 | 3 | on: 4 | pull_request_review: 5 | types: 6 | - submitted 7 | 8 | concurrency: 9 | group: ${{ github.workflow }}-${{ github.ref }} 10 | cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} 11 | 12 | permissions: 13 | contents: read 14 | 15 | jobs: 16 | command-validation: 17 | if: startsWith(github.event.review.body, '/test matrix') 18 | runs-on: ubuntu-latest 19 | timeout-minutes: 5 20 | permissions: 21 | pull-requests: write 22 | steps: 23 | - name: Is comment allowed? 24 | uses: actions/github-script@v7 25 | with: 26 | script: | 27 | const actorPermission = (await github.rest.repos.getCollaboratorPermissionLevel({ 28 | ...context.repo, 29 | username: context.actor 30 | })).data.permission 31 | const isPermitted = ['write', 'admin'].includes(actorPermission) 32 | if (!isPermitted) { 33 | const errorMessage = 'Only users with write permission to the repository can run GitHub commands' 34 | await github.rest.issues.createComment({ 35 | ...context.repo, 36 | issue_number: context.issue.number, 37 | body: errorMessage, 38 | }) 39 | core.setFailed(errorMessage) 40 | return 41 | } 42 | 43 | test: 44 | needs: 45 | - command-validation 46 | uses: ./.github/workflows/test.yml 47 | with: 48 | full-matrix: true 49 | ref: ${{ github.event.pull_request.head.sha }} 50 | -------------------------------------------------------------------------------- /.github/workflows/microbenchmark.yml: -------------------------------------------------------------------------------- 1 | name: microbenchmark 2 | 3 | on: 4 | workflow_dispatch: 5 | push: 6 | branches: 7 | - main 8 | paths-ignore: 9 | - '**.md' 10 | - '**.asciidoc' 11 | 12 | # limit the access of the generated GITHUB_TOKEN 13 | permissions: 14 | contents: read 15 | 16 | jobs: 17 | microbenchmark: 18 | runs-on: ubuntu-latest 19 | timeout-minutes: 5 20 | steps: 21 | - name: Run microbenchmark 22 | uses: elastic/oblt-actions/buildkite/run@v1 23 | with: 24 | pipeline: "apm-agent-microbenchmark" 25 | token: ${{ secrets.BUILDKITE_TOKEN }} 26 | wait-for: false 27 | env-vars: | 28 | script=.ci/bench.sh 29 | repo=apm-agent-python 30 | sha=${{ github.sha }} 31 | BRANCH_NAME=${{ github.ref_name }} 32 | -------------------------------------------------------------------------------- /.github/workflows/packages.yml: -------------------------------------------------------------------------------- 1 | name: packages 2 | 3 | on: 4 | workflow_call: ~ 5 | pull_request: 6 | paths-ignore: 7 | - '**/*.md' 8 | - '**/*.asciidoc' 9 | push: 10 | branches: 11 | - main 12 | paths-ignore: 13 | - '**/*.md' 14 | - '**/*.asciidoc' 15 | 16 | permissions: 17 | contents: read 18 | 19 | jobs: 20 | build: 21 | runs-on: ubuntu-latest 22 | steps: 23 | - uses: actions/checkout@v4 24 | - uses: ./.github/actions/packages 25 | -------------------------------------------------------------------------------- /.github/workflows/pre-commit.yml: -------------------------------------------------------------------------------- 1 | name: pre-commit 2 | 3 | on: 4 | pull_request: 5 | push: 6 | branches: [main] 7 | 8 | permissions: 9 | contents: read 10 | 11 | jobs: 12 | pre-commit: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: elastic/oblt-actions/pre-commit@v1 16 | -------------------------------------------------------------------------------- /.github/workflows/run-matrix.yml: -------------------------------------------------------------------------------- 1 | name: run-matrix 2 | 3 | on: 4 | workflow_call: 5 | inputs: 6 | include: 7 | required: true 8 | description: Matrix include JSON string 9 | type: string 10 | 11 | permissions: 12 | contents: read 13 | 14 | jobs: 15 | docker: 16 | name: "docker (version: ${{ matrix.version }}, framework: ${{ matrix.framework }})" 17 | runs-on: ubuntu-latest 18 | strategy: 19 | fail-fast: false 20 | max-parallel: 10 21 | matrix: 22 | include: ${{ fromJSON(inputs.include) }} 23 | env: 24 | # These env variables are used in the docker-compose.yml and the run_tests.sh script. 25 | REGISTRY: ghcr.io 26 | IMAGE_NAME: ${{ github.repository }}/apm-agent-python-testing 27 | steps: 28 | - uses: actions/checkout@v4 29 | - name: Run tests 30 | run: ./tests/scripts/docker/run_tests.sh ${{ matrix.version }} ${{ matrix.framework }} 31 | env: 32 | LOCALSTACK_VOLUME_DIR: localstack_data 33 | - if: success() || failure() 34 | name: Upload JUnit Test Results 35 | uses: actions/upload-artifact@v4 36 | with: 37 | name: test-results-${{ matrix.framework }}-${{ matrix.version }} 38 | path: "**/*-python-agent-junit.xml" 39 | - if: success() || failure() 40 | name: Upload Coverage Reports 41 | uses: actions/upload-artifact@v4 42 | with: 43 | name: coverage-reports-${{ matrix.framework }}-${{ matrix.version }} 44 | path: "**/.coverage*" 45 | include-hidden-files: true 46 | -------------------------------------------------------------------------------- /.github/workflows/test-release.yml: -------------------------------------------------------------------------------- 1 | name: test-release 2 | 3 | on: 4 | workflow_call: 5 | inputs: 6 | full-matrix: 7 | description: "Run the full matrix" 8 | required: true 9 | type: boolean 10 | ref: 11 | description: "The git ref of elastic/apm-agent-python to run test workflow from." 12 | required: false 13 | type: string 14 | enabled: 15 | description: "Whether to run the workfow" 16 | required: true 17 | type: boolean 18 | workflow_dispatch: 19 | inputs: 20 | full-matrix: 21 | description: "Run the full matrix" 22 | required: true 23 | type: boolean 24 | enabled: 25 | description: "Whether to run the workfow" 26 | required: true 27 | type: boolean 28 | 29 | jobs: 30 | test: 31 | if: ${{ inputs.enabled }} 32 | uses: ./.github/workflows/test.yml 33 | with: 34 | full-matrix: ${{ inputs.full-matrix }} 35 | 36 | run-if-disabled: 37 | if: ${{ ! inputs.enabled }} 38 | runs-on: ubuntu-latest 39 | steps: 40 | - run: echo "do something to help with the reusable workflows with needs" 41 | -------------------------------------------------------------------------------- /.github/workflows/test-reporter.yml: -------------------------------------------------------------------------------- 1 | --- 2 | ## Workflow to process the JUnit test results and add a report to the checks. 3 | name: test-reporter 4 | on: 5 | workflow_run: 6 | workflows: 7 | - test 8 | types: 9 | - completed 10 | 11 | permissions: 12 | contents: read 13 | actions: read 14 | checks: write 15 | 16 | jobs: 17 | report: 18 | runs-on: ubuntu-latest 19 | steps: 20 | - uses: elastic/oblt-actions/test-report@v1 21 | with: 22 | artifact: /test-results(.*)/ 23 | name: 'Test Report $1' 24 | path: "**/*-python-agent-junit.xml" 25 | reporter: java-junit 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | *.log 3 | *.egg 4 | *.db 5 | *.pid 6 | *.swp 7 | .coverage* 8 | .DS_Store 9 | .idea 10 | .vscode 11 | .benchmarks 12 | pip-log.txt 13 | /*.egg-info 14 | /build 15 | /cover 16 | /dist 17 | /example_project/local_settings.py 18 | /docs/html 19 | /docs/doctrees 20 | /example_project/*.db 21 | tests/.schemacache 22 | coverage 23 | .tox 24 | .eggs 25 | .cache 26 | /testdb.sql 27 | venv 28 | benchmarks/result* 29 | coverage.xml 30 | tests/*-junit.xml 31 | *.code-workspace 32 | .pytest_cache/ 33 | .python-version 34 | .env 35 | .aws 36 | .arn-file.md 37 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | repos: 2 | - repo: https://github.com/pycqa/isort 3 | rev: 5.12.0 4 | hooks: 5 | - id: isort 6 | exclude: "(tests/utils/stacks/linenos.py|tests/utils/stacks/linenos2.py|tests/contrib/grpc/grpc_app/.*pb2.*.py)" 7 | - repo: https://github.com/ambv/black 8 | rev: 22.8.0 9 | hooks: 10 | - id: black 11 | language_version: python3 12 | exclude: "(tests/utils/stacks/linenos.py|tests/utils/stacks/linenos2.py|tests/contrib/grpc/grpc_app/.*pb2.*.py)" 13 | - repo: https://github.com/PyCQA/flake8 14 | rev: 6.1.0 15 | hooks: 16 | - id: flake8 17 | exclude: "(tests/utils/stacks/linenos.py|tests/utils/stacks/linenos2.py|tests/contrib/grpc/grpc_app/.*pb2.*.py)" 18 | - repo: local 19 | hooks: 20 | - id: license-header-check 21 | name: License header check 22 | description: Checks the existance of license headers in all Python files 23 | entry: ./tests/scripts/license_headers_check.sh 24 | exclude: "(tests/utils/stacks/linenos.py|tests/utils/stacks/linenos2.py|tests/contrib/grpc/grpc_app/.*pb2.*.py)" 25 | language: script 26 | types: [python] 27 | -------------------------------------------------------------------------------- /.tool-versions: -------------------------------------------------------------------------------- 1 | updatecli v0.101.0 -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | See http://github.com/elastic/apm-agent-python/contributors 2 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine@sha256:8a1f59ffb675680d47db6337b49d22281a139e9d709335b492be023728e11715 2 | ARG AGENT_DIR 3 | COPY ${AGENT_DIR} /opt/python -------------------------------------------------------------------------------- /Dockerfile.wolfi: -------------------------------------------------------------------------------- 1 | FROM docker.elastic.co/wolfi/chainguard-base:latest@sha256:fdfd7f357a09f933ab22143273849f8b247360f2f94f4dc2ea473001c59f9f0b 2 | ARG AGENT_DIR 3 | COPY ${AGENT_DIR} /opt/python -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2009-2012, David Cramer and individual contributors 4 | Copyright (c) 2013-2023, Elasticsearch BV 5 | All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are met: 9 | 10 | * Redistributions of source code must retain the above copyright notice, this 11 | list of conditions and the following disclaimer. 12 | 13 | * Redistributions in binary form must reproduce the above copyright notice, 14 | this list of conditions and the following disclaimer in the documentation 15 | and/or other materials provided with the distribution. 16 | 17 | * Neither the name of the copyright holder nor the names of its 18 | contributors may be used to endorse or promote products derived from 19 | this software without specific prior written permission. 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 25 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 27 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include setup.py README.rst MANIFEST.in LICENSE elasticapm/py.typed 2 | global-exclude *~ 3 | recursive-exclude * __pycache__ 4 | prune tests 5 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | BUILD_DIR?=build 2 | SHELL := /bin/bash 3 | 4 | isort: 5 | isort --vb . 6 | 7 | flake8: 8 | flake8 9 | 10 | test: 11 | # delete any __pycache__ folders to avoid hard-to-debug caching issues 12 | find . -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete 13 | # pypy3 should be added to the first `if` once it supports py3.7 14 | if [[ "$$PYTHON_VERSION" =~ ^(3.7|3.8|3.9|3.10|3.11|3.12|3.13|nightly)$$ ]] ; then \ 15 | echo "Python 3.7+, with asyncio"; \ 16 | pytest -v $(PYTEST_ARGS) --showlocals $(PYTEST_MARKER) $(PYTEST_JUNIT); \ 17 | else \ 18 | echo "Python < 3.7, without asyncio"; \ 19 | pytest -v $(PYTEST_ARGS) --showlocals $(PYTEST_MARKER) $(PYTEST_JUNIT) --ignore-glob='*/asyncio*/*'; \ 20 | fi 21 | 22 | coverage: PYTEST_ARGS=--cov --cov-context=test --cov-config=setup.cfg --cov-branch 23 | coverage: export COVERAGE_FILE=.coverage.docker.$(PYTHON_FULL_VERSION).$(FRAMEWORK) 24 | coverage: test 25 | 26 | docs: 27 | bash ./scripts/build_docs.sh apm-agent-python ./docs ${BUILD_DIR} 28 | 29 | .PHONY: isort flake8 test coverage docs 30 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | elastic-apm -- Elastic APM agent for Python 2 | =========================================== 3 | 4 | .. image:: https://github.com/elastic/apm-agent-python/actions/workflows/test.yml/badge.svg?branch=main 5 | :target: https://github.com/elastic/apm-agent-python/actions/workflows/test.yml 6 | :alt: Build Status 7 | 8 | .. image:: https://img.shields.io/pypi/v/elastic-apm.svg?style=flat 9 | :target: https://pypi.python.org/pypi/elastic-apm/ 10 | :alt: Latest Version 11 | 12 | .. image:: https://img.shields.io/pypi/pyversions/elastic-apm.svg?style=flat 13 | :target: https://pypi.python.org/pypi/elastic-apm/ 14 | :alt: Supported Python versions 15 | 16 | 17 | This is the official Python module for Elastic APM. 18 | 19 | It provides full out-of-the-box support for many of the popular frameworks, 20 | including Django, and Flask. Elastic APM is also easy to adapt for most 21 | WSGI-compatible web applications via `custom integrations`_. 22 | 23 | Your application doesn't live on the web? No problem! Elastic APM is easy to use in 24 | any Python application. 25 | 26 | Read the documentation_, including instructions on `running the tests locally`_. 27 | 28 | If you're interested in contributing, `start here!`_ 29 | 30 | .. _documentation: https://www.elastic.co/guide/en/apm/agent/python/current/index.html 31 | .. _`custom integrations`: https://www.elastic.co/blog/creating-custom-framework-integrations-with-the-elastic-apm-python-agent 32 | .. _`running the tests locally`: https://www.elastic.co/guide/en/apm/agent/python/current/run-tests-locally.html 33 | .. _`start here!`: https://github.com/elastic/apm-agent-python/blob/main/CONTRIBUTING.md 34 | 35 | License 36 | ------- 37 | 38 | BSD-3-Clause 39 | 40 | 41 | Made with ♥️ and ☕️ by Elastic and our community. 42 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | Thanks for your interest in the security of our products. 4 | Our security policy can be found at [https://www.elastic.co/community/security](https://www.elastic.co/community/security). 5 | 6 | ## Reporting a Vulnerability 7 | Please send security vulnerability reports to security@elastic.co. 8 | -------------------------------------------------------------------------------- /dev-utils/make-packages.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Make a Python APM agent distribution 4 | # 5 | 6 | echo "::group::Install build" 7 | pip install --user build 8 | echo "::endgroup::" 9 | 10 | echo "::group::Building packages" 11 | python -m build 12 | echo "::endgroup::" 13 | -------------------------------------------------------------------------------- /dev-utils/requirements.txt: -------------------------------------------------------------------------------- 1 | # These are the pinned requirements for the lambda layer/docker image 2 | certifi==2025.4.26 3 | urllib3==1.26.20 4 | wrapt==1.14.1 5 | -------------------------------------------------------------------------------- /docs/docset.yml: -------------------------------------------------------------------------------- 1 | project: 'APM Python agent docs' 2 | products: 3 | - id: apm-agent 4 | cross_links: 5 | - apm-agent-rum-js 6 | - apm-aws-lambda 7 | - beats 8 | - docs-content 9 | - ecs 10 | - ecs-logging 11 | - ecs-logging-python 12 | - elasticsearch 13 | - logstash-docs-md 14 | toc: 15 | - toc: reference 16 | - toc: release-notes 17 | subs: 18 | ecloud: "Elastic Cloud" 19 | apm-lambda-ext: "Elastic APM AWS Lambda extension" 20 | -------------------------------------------------------------------------------- /docs/reference/advanced-topics.md: -------------------------------------------------------------------------------- 1 | --- 2 | mapped_pages: 3 | - https://www.elastic.co/guide/en/apm/agent/python/current/advanced-topics.html 4 | --- 5 | 6 | # Advanced topics [advanced-topics] 7 | 8 | * [Instrumenting custom code](/reference/instrumenting-custom-code.md) 9 | * [Sanitizing data](/reference/sanitizing-data.md) 10 | * [How the Agent works](/reference/how-agent-works.md) 11 | * [Run Tests Locally](/reference/run-tests-locally.md) 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /docs/reference/images/choose-a-layer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elastic/apm-agent-python/331f6867887fc4fb4c344cb470cf643739613183/docs/reference/images/choose-a-layer.png -------------------------------------------------------------------------------- /docs/reference/images/config-layer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elastic/apm-agent-python/331f6867887fc4fb4c344cb470cf643739613183/docs/reference/images/config-layer.png -------------------------------------------------------------------------------- /docs/reference/images/dynamic-config.svg: -------------------------------------------------------------------------------- 1 | DynamicDynamic -------------------------------------------------------------------------------- /docs/reference/images/python-lambda-env-vars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elastic/apm-agent-python/331f6867887fc4fb4c344cb470cf643739613183/docs/reference/images/python-lambda-env-vars.png -------------------------------------------------------------------------------- /docs/reference/set-up-apm-python-agent.md: -------------------------------------------------------------------------------- 1 | --- 2 | mapped_pages: 3 | - https://www.elastic.co/guide/en/apm/agent/python/current/set-up.html 4 | --- 5 | 6 | # Set up the APM Python Agent [set-up] 7 | 8 | To get you off the ground, we’ve prepared guides for setting up the Agent with different frameworks: 9 | 10 | * [Django](/reference/django-support.md) 11 | * [Flask](/reference/flask-support.md) 12 | * [aiohttp](/reference/aiohttp-server-support.md) 13 | * [Tornado](/reference/tornado-support.md) 14 | * [Starlette/FastAPI](/reference/starlette-support.md) 15 | * [Sanic](/reference/sanic-support.md) 16 | * [AWS Lambda](/reference/lambda-support.md) 17 | * [Azure Functions](/reference/azure-functions-support.md) 18 | * [Wrapper (Experimental)](/reference/wrapper-support.md) 19 | * [ASGI Middleware](/reference/asgi-middleware.md) 20 | 21 | For custom instrumentation, see [Instrumenting Custom Code](/reference/instrumenting-custom-code.md). 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /docs/reference/toc.yml: -------------------------------------------------------------------------------- 1 | project: 'APM Python agent reference' 2 | toc: 3 | - file: index.md 4 | - file: set-up-apm-python-agent.md 5 | children: 6 | - file: django-support.md 7 | - file: flask-support.md 8 | - file: aiohttp-server-support.md 9 | - file: tornado-support.md 10 | - file: starlette-support.md 11 | - file: sanic-support.md 12 | - file: lambda-support.md 13 | - file: azure-functions-support.md 14 | - file: wrapper-support.md 15 | - file: asgi-middleware.md 16 | - file: supported-technologies.md 17 | - file: configuration.md 18 | - file: advanced-topics.md 19 | children: 20 | - file: instrumenting-custom-code.md 21 | - file: sanitizing-data.md 22 | - file: how-agent-works.md 23 | - file: run-tests-locally.md 24 | - file: api-reference.md 25 | - file: metrics.md 26 | - file: opentelemetry-api-bridge.md 27 | - file: logs.md 28 | - file: performance-tuning.md 29 | - file: upgrading.md 30 | children: 31 | - file: upgrading-6-x.md 32 | - file: upgrading-5-x.md 33 | - file: upgrading-4-x.md -------------------------------------------------------------------------------- /docs/reference/upgrading-4-x.md: -------------------------------------------------------------------------------- 1 | --- 2 | mapped_pages: 3 | - https://www.elastic.co/guide/en/apm/agent/python/current/upgrading-4.x.html 4 | --- 5 | 6 | # Upgrading to version 4 of the agent [upgrading-4-x] 7 | 8 | 4.0 of the Elastic APM Python Agent comes with several backwards incompatible changes. 9 | 10 | ## APM Server 6.5 required [upgrading-4-x-apm-server] 11 | 12 | This version of the agent is **only compatible with APM Server 6.5+**. To upgrade, we recommend to first upgrade APM Server, and then the agent. APM Server 6.5+ is backwards compatible with versions 2.x and 3.x of the agent. 13 | 14 | 15 | ## Configuration options [upgrading-4-x-configuration] 16 | 17 | Several configuration options have been removed, or renamed 18 | 19 | * `flush_interval` has been removed 20 | * the `flush_interval` and `max_queue_size` settings have been removed. 21 | * new settings introduced: `api_request_time` and `api_request_size`. 22 | * Some settings now require a unit for duration or size. See [size format](configuration.md#config-format-size) and [duration format](configuration.md#config-format-duration). 23 | 24 | 25 | ## Processors [upgrading-4-x-processors] 26 | 27 | The method to write processors for sanitizing events has been changed. It will now be called for every type of event (transactions, spans and errors), unless the event types are limited using a decorator. See [Sanitizing data](sanitizing-data.md) for more information. 28 | 29 | 30 | -------------------------------------------------------------------------------- /docs/reference/upgrading-5-x.md: -------------------------------------------------------------------------------- 1 | --- 2 | mapped_pages: 3 | - https://www.elastic.co/guide/en/apm/agent/python/current/upgrading-5.x.html 4 | --- 5 | 6 | # Upgrading to version 5 of the agent [upgrading-5-x] 7 | 8 | ## APM Server 7.3 required for some features [_apm_server_7_3_required_for_some_features] 9 | 10 | APM Server and Kibana 7.3 introduced support for collecting breakdown metrics, and central configuration of APM agents. To use these features, please update the Python agent to 5.0+ and APM Server / Kibana to 7.3+ 11 | 12 | 13 | ## Tags renamed to Labels [_tags_renamed_to_labels] 14 | 15 | To better align with other parts of the Elastic Stack and the [Elastic Common Schema](ecs://reference/index.md), we renamed "tags" to "labels", and introduced limited support for typed labels. While tag values were only allowed to be strings, label values can be strings, booleans, or numerical. 16 | 17 | To benefit from this change, ensure that you run at least **APM Server 6.7**, and use `elasticapm.label()` instead of `elasticapm.tag()`. The `tag()` API will continue to work as before, but emit a `DeprecationWarning`. It will be removed in 6.0 of the agent. 18 | 19 | 20 | -------------------------------------------------------------------------------- /docs/reference/upgrading-6-x.md: -------------------------------------------------------------------------------- 1 | --- 2 | mapped_pages: 3 | - https://www.elastic.co/guide/en/apm/agent/python/current/upgrading-6.x.html 4 | --- 5 | 6 | # Upgrading to version 6 of the agent [upgrading-6-x] 7 | 8 | ## Python 2 no longer supported [_python_2_no_longer_supported] 9 | 10 | Please upgrade to Python 3.6+ to continue to receive regular updates. 11 | 12 | 13 | ## `SANITIZE_FIELD_NAMES` changes [_sanitize_field_names_changes] 14 | 15 | If you are using a non-default `sanitize_field_names` config, please note that your entries must be surrounded with stars (e.g. `*secret*`) in order to maintain previous behavior. 16 | 17 | 18 | ## Tags removed (in favor of labels) [_tags_removed_in_favor_of_labels] 19 | 20 | Tags were deprecated in the 5.x release (in favor of labels). They have now been removed. 21 | 22 | 23 | -------------------------------------------------------------------------------- /docs/reference/upgrading.md: -------------------------------------------------------------------------------- 1 | --- 2 | mapped_pages: 3 | - https://www.elastic.co/guide/en/apm/agent/python/current/upgrading.html 4 | --- 5 | 6 | # Upgrading [upgrading] 7 | 8 | Upgrades between minor versions of the agent, like from 3.1 to 3.2 are always backwards compatible. Upgrades that involve a major version bump often come with some backwards incompatible changes. 9 | 10 | We highly recommend to always pin the version of `elastic-apm` in your `requirements.txt` or `Pipfile`. This avoids automatic upgrades to potentially incompatible versions. 11 | 12 | 13 | ## End of life dates [end-of-life-dates] 14 | 15 | We love all our products, but sometimes we must say goodbye to a release so that we can continue moving forward on future development and innovation. Our [End of life policy](https://www.elastic.co/support/eol) defines how long a given release is considered supported, as well as how long a release is considered still in active development or maintenance. 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /docs/release-notes/deprecations.md: -------------------------------------------------------------------------------- 1 | --- 2 | navigation_title: "Deprecations" 3 | --- 4 | 5 | # Elastic APM Python Agent deprecations [elastic-apm-python-agent-deprecations] 6 | Review the deprecated functionality for your Elastic APM Python Agent version. While deprecations have no immediate impact, we strongly encourage you update your implementation after you upgrade. 7 | 8 | % To learn how to upgrade, check out . 9 | 10 | % ## Next version 11 | % **Release date:** Month day, year 12 | 13 | % ::::{dropdown} Deprecation title 14 | % Description of the deprecation. 15 | % For more information, check [PR #](PR link). 16 | % **Impact**
Impact of deprecation. 17 | % **Action**
Steps for mitigating deprecation impact. 18 | % :::: 19 | 20 | ## 6.23.0 [elastic-apm-python-agent-6230-deprecations] 21 | **Release date:** July 30, 2024 22 | 23 | * Python 3.6 support will be removed in version 7.0.0 of the agent. 24 | * The log shipping LoggingHandler will be removed in version 7.0.0 of the agent. 25 | * The log shipping feature in the Flask instrumentation will be removed in version 7.0.0 of the agent. 26 | * The log shipping feature in the Django instrumentation will be removed in version 7.0.0 of the agent. 27 | * The OpenTracing bridge will be removed in version 7.0.0 of the agent. 28 | * Celery 4.0 support is deprecated because it’s not installable anymore with a modern pip. 29 | 30 | ## 6.20.0 [elastic-apm-python-agent-6200-deprecations] 31 | **Release date:** January 10, 2024 32 | 33 | The log shipping LoggingHandler will be removed in version 7.0.0 of the agent. 34 | 35 | ## 6.19.0 [elastic-apm-python-agent-6190-deprecations] 36 | **Release date:** October 11, 2023 37 | 38 | The log shipping feature in the Flask instrumentation will be removed in version 7.0.0 of the agent. -------------------------------------------------------------------------------- /docs/release-notes/known-issues.md: -------------------------------------------------------------------------------- 1 | --- 2 | navigation_title: "Known issues" 3 | --- 4 | 5 | # Elastic APM Python Agent known issues [elastic-apm-python-agent-known-issues] 6 | 7 | Known issues are significant defects or limitations that may impact your implementation. These issues are actively being worked on and will be addressed in a future release. Review the Elastic APM Python Agent known issues to help you make informed decisions, such as upgrading to a new version. 8 | 9 | % Use the following template to add entries to this page. 10 | 11 | % :::{dropdown} Title of known issue 12 | % **Details** 13 | % On [Month/Day/Year], a known issue was discovered that [description of known issue]. 14 | 15 | % **Workaround** 16 | % Workaround description. 17 | 18 | % **Resolved** 19 | % On [Month/Day/Year], this issue was resolved. 20 | 21 | ::: 22 | 23 | _No known issues_ -------------------------------------------------------------------------------- /docs/release-notes/toc.yml: -------------------------------------------------------------------------------- 1 | toc: 2 | - file: index.md 3 | - file: known-issues.md 4 | - file: breaking-changes.md 5 | - file: deprecations.md -------------------------------------------------------------------------------- /elasticapm/contrib/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /elasticapm/contrib/asyncio/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /elasticapm/contrib/django/celery/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2012, the Sentry Team, see AUTHORS for more details 4 | # Copyright (c) 2019, Elasticsearch BV 5 | # All rights reserved. 6 | # 7 | # Redistribution and use in source and binary forms, with or without 8 | # modification, are permitted provided that the following conditions are met: 9 | # 10 | # * Redistributions of source code must retain the above copyright notice, this 11 | # list of conditions and the following disclaimer. 12 | # 13 | # * Redistributions in binary form must reproduce the above copyright notice, 14 | # this list of conditions and the following disclaimer in the documentation 15 | # and/or other materials provided with the distribution. 16 | # 17 | # * Neither the name of the copyright holder nor the names of its 18 | # contributors may be used to endorse or promote products derived from 19 | # this software without specific prior written permission. 20 | # 21 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 25 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 27 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | -------------------------------------------------------------------------------- /elasticapm/contrib/django/management/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /elasticapm/contrib/django/management/commands/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | -------------------------------------------------------------------------------- /elasticapm/contrib/opentelemetry/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | from .trace import Tracer, get_tracer # noqa: F401 32 | -------------------------------------------------------------------------------- /elasticapm/contrib/serverless/aws_wrapper/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2023, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /elasticapm/handlers/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2012, the Sentry Team, see AUTHORS for more details 4 | # Copyright (c) 2019, Elasticsearch BV 5 | # All rights reserved. 6 | # 7 | # Redistribution and use in source and binary forms, with or without 8 | # modification, are permitted provided that the following conditions are met: 9 | # 10 | # * Redistributions of source code must retain the above copyright notice, this 11 | # list of conditions and the following disclaimer. 12 | # 13 | # * Redistributions in binary form must reproduce the above copyright notice, 14 | # this list of conditions and the following disclaimer in the documentation 15 | # and/or other materials provided with the distribution. 16 | # 17 | # * Neither the name of the copyright holder nor the names of its 18 | # contributors may be used to endorse or promote products derived from 19 | # this software without specific prior written permission. 20 | # 21 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 25 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 27 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | -------------------------------------------------------------------------------- /elasticapm/instrumentation/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /elasticapm/instrumentation/packages/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /elasticapm/instrumentation/packages/asyncio/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /elasticapm/instrumentation/packages/httpx/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2021, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /elasticapm/instrumentation/packages/httpx/async/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2021, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /elasticapm/instrumentation/packages/httpx/sync/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2021, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /elasticapm/instrumentation/wrapper/__main__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2023, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | from . import setup 32 | 33 | if __name__ == "__main__": 34 | setup() 35 | -------------------------------------------------------------------------------- /elasticapm/metrics/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /elasticapm/metrics/sets/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /elasticapm/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elastic/apm-agent-python/331f6867887fc4fb4c344cb470cf643739613183/elasticapm/py.typed -------------------------------------------------------------------------------- /elasticapm/transport/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # BSD 3-Clause License 3 | # 4 | # Copyright (c) 2019, Elasticsearch BV 5 | # All rights reserved. 6 | # 7 | # Redistribution and use in source and binary forms, with or without 8 | # modification, are permitted provided that the following conditions are met: 9 | # 10 | # * Redistributions of source code must retain the above copyright notice, this 11 | # list of conditions and the following disclaimer. 12 | # 13 | # * Redistributions in binary form must reproduce the above copyright notice, 14 | # this list of conditions and the following disclaimer in the documentation 15 | # and/or other materials provided with the distribution. 16 | # 17 | # * Neither the name of the copyright holder nor the names of its 18 | # contributors may be used to endorse or promote products derived from 19 | # this software without specific prior written permission. 20 | # 21 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 25 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 27 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | -------------------------------------------------------------------------------- /elasticapm/version.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | __version__ = (6, 23, 0) 32 | VERSION = ".".join(map(str, __version__)) 33 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.black] 2 | line-length = 120 3 | include = '\.pyi?$' 4 | exclude = ''' 5 | /( 6 | \.git 7 | | _build 8 | | build 9 | | dist 10 | 11 | # The following are specific to Black, you probably don't want those. 12 | | blib2to3 13 | | tests/data 14 | )/ 15 | ''' 16 | -------------------------------------------------------------------------------- /scripts/build_docs.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | name=$1 5 | path=$2 6 | build_dir=$3 7 | 8 | docs_dir=$build_dir/docs 9 | html_dir=$build_dir/html_docs 10 | 11 | # Checks if docs clone already exists 12 | if [ ! -d $docs_dir ]; then 13 | # Only head is cloned 14 | git clone --depth=1 https://github.com/elastic/docs.git $docs_dir 15 | else 16 | echo "$docs_dir already exists. Not cloning." 17 | fi 18 | 19 | 20 | index="${path}/index.asciidoc" 21 | 22 | echo "Building docs for ${name}..." 23 | echo "Index document: ${index}" 24 | 25 | dest_dir="$html_dir/${name}" 26 | mkdir -p "$dest_dir" 27 | params="--chunk=1" 28 | if [ "$PREVIEW" = "1" ]; then 29 | params="--chunk=1 --open" 30 | fi 31 | $docs_dir/build_docs --direct_html $params --doc "$index" --out "$dest_dir" 32 | -------------------------------------------------------------------------------- /scripts/install-tools.bat: -------------------------------------------------------------------------------- 1 | : Required tools before running the tests in windows. 2 | : It does require the below list of environment variables: 3 | : - PYTHON: the python installation path. 4 | : - FRAMEWORK: the framework to be installed. 5 | @echo on 6 | 7 | 8 | : Backwards compatibility to Jenkins 9 | if [%JENKINS_HOME%] == [] ( 10 | set PYTHON_EXECUTABLE=python 11 | ) else ( 12 | set PYTHON_EXECUTABLE=%PYTHON%\python.exe 13 | ) 14 | 15 | : We need wheel installed to build wheels 16 | call %PYTHON_EXECUTABLE% -m venv "%cd%\venv" 17 | set VENV_PYTHON=%cd%\venv\Scripts\ 18 | call %VENV_PYTHON%\python.exe -m pip install -U wheel pip setuptools 19 | call %VENV_PYTHON%\python.exe -m pip install -r tests\requirements\reqs-%FRAMEWORK%.txt 20 | call %VENV_PYTHON%\python.exe -m pip install psutil 21 | -------------------------------------------------------------------------------- /scripts/run-benchmarks.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | AGENT_WORKDIR=${1:?Please specify the python agent workspace} 5 | ES_URL=${2:?Please specify the elasticstack URL} 6 | ES_USER=${3:?Please specify the user to connect with} 7 | ES_PASS=${4:?Please specify the password to connect with} 8 | 9 | if [ -d .benchmarks ] ; then 10 | rm -rf .benchmarks 11 | fi 12 | git clone https://github.com/elastic/apm-agent-python-benchmarks.git .benchmarks 13 | 14 | cd .benchmarks 15 | 16 | ## Prepare virtualenv 17 | virtualenv -p python3 "${HOME}/.local" 18 | 19 | pip install -r requirements.txt 20 | 21 | python run_bench_commits.py \ 22 | --worktree "${AGENT_WORKDIR}" \ 23 | --es-url "${ES_URL}" \ 24 | --es-user "${ES_USER}" \ 25 | --es-password "${ES_PASS}" \ 26 | --as-is \ 27 | --tag "branch=${BRANCH_NAME}" \ 28 | --tag mode=CI 29 | -------------------------------------------------------------------------------- /scripts/run-tests.bat: -------------------------------------------------------------------------------- 1 | : Run the tests in Windows 2 | : It does require the below list of environment variables: 3 | : - VERSION: the python version. 4 | : - ASYNCIO: if asyncio is enabled or not. 5 | : - PYTHON: the python installation path. 6 | @echo off 7 | 8 | @echo on 9 | set VENV_PYTHON=%cd%\venv\Scripts\ 10 | 11 | set COVERAGE_FILE=.coverage.windows.%VERSION%.%FRAMEWORK%.%ASYNCIO% 12 | 13 | set PYTEST_JUNIT="--junitxml=.\tests\windows-%VERSION%-%FRAMEWORK%-%ASYNCIO%-python-agent-junit.xml" 14 | if "%ASYNCIO%" == "true" ( 15 | %VENV_PYTHON%\python.exe -m pytest %PYTEST_JUNIT% --cov --cov-context=test --cov-branch --cov-config=setup.cfg -m "not integrationtest" || exit /b 1 16 | ) 17 | if "%ASYNCIO%" == "false" ( 18 | %VENV_PYTHON%\python.exe -m pytest %PYTEST_JUNIT% --ignore-glob="*\asyncio*\*" --cov --cov-context=test --cov-branch --cov-config=setup.cfg -m "not integrationtest" || exit /b 1 19 | ) 20 | call %VENV_PYTHON%\python.exe setup.py bdist_wheel 21 | -------------------------------------------------------------------------------- /tests/.dockerignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /tests/bdd/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /tests/bdd/features/api_key.feature: -------------------------------------------------------------------------------- 1 | Feature: APM server authentication with API key and secret token 2 | 3 | Scenario: A configured API key is sent in the Authorization header 4 | Given an agent configured with 5 | | setting | value | 6 | | api_key | RTNxMjlXNEJt | 7 | When the agent sends a request to APM server 8 | Then the Authorization header of the request is 'ApiKey RTNxMjlXNEJt' 9 | 10 | Scenario: A configured secret token is sent in the Authorization header 11 | Given an agent configured with 12 | | setting | value | 13 | | secret_token | secr3tT0ken | 14 | When the agent sends a request to APM server 15 | Then the Authorization header of the request is 'Bearer secr3tT0ken' 16 | 17 | Scenario: A configured API key takes precedence over a secret token 18 | Given an agent configured with 19 | | setting | value | 20 | | api_key | MjlXNEJasdfDt | 21 | | secret_token | secr3tT0ken | 22 | When the agent sends a request to APM server 23 | Then the Authorization header of the request is 'ApiKey MjlXNEJasdfDt' 24 | 25 | -------------------------------------------------------------------------------- /tests/bdd/features/user_agent.feature: -------------------------------------------------------------------------------- 1 | Feature: Agent Transport User agent Header 2 | 3 | Scenario: Default user-agent 4 | Given an agent 5 | When the agent sends a request to APM server 6 | Then the User-Agent header of the request matches regex '^apm-agent-[a-z]+/[^ ]* \(.*\)' 7 | 8 | Scenario: Default user-agent when setting invalid service 9 | Given an agent configured with 10 | | setting | value | 11 | | service_name | myService/()<>@ | 12 | When the agent sends a request to APM server 13 | Then the User-Agent header of the request matches regex '^apm-agent-[a-z]+/[^ ]* \(.*\)' 14 | 15 | Scenario: User-agent with service name only 16 | Given an agent configured with 17 | | setting | value | 18 | | service_name | myService | 19 | When the agent sends a request to APM server 20 | Then the User-Agent header of the request matches regex '^apm-agent-[a-z]+/[^ ]* \(myService\)' 21 | 22 | Scenario Outline: User-agent with service name and service version 23 | Given an agent configured with 24 | | setting | value | 25 | | service_name | | 26 | | service_version | | 27 | When the agent sends a request to APM server 28 | Then the User-Agent header of the request matches regex '^apm-agent-[a-z]+/[^ ]* \( \)' 29 | Examples: 30 | | SERVICE_NAME | ESCAPED_SERVICE_NAME | SERVICE_VERSION | ESCAPED_SERVICE_VERSION | 31 | | myService | myService | v42 | v42 | 32 | | myService | myService | 123(:\;)456 | 123_:_;_456 | 33 | -------------------------------------------------------------------------------- /tests/client/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /tests/config/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /tests/context/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /tests/contrib/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /tests/contrib/asgi/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2022, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /tests/contrib/asyncio/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /tests/contrib/asyncio/tests.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /tests/contrib/asyncio/tornado/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /tests/contrib/asyncio/tornado/templates/test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ title }} 5 | 6 | 7 | 8 |
    9 | {% for item in items %} 10 |
  • {{ escape(item) }}
  • 11 | {% end %} 12 |
13 | 14 | 15 | -------------------------------------------------------------------------------- /tests/contrib/celery/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /tests/contrib/django/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /tests/contrib/django/fake2/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | 32 | class FakeException(BaseException): 33 | pass 34 | -------------------------------------------------------------------------------- /tests/contrib/django/testapp/templates/404.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elastic/apm-agent-python/331f6867887fc4fb4c344cb470cf643739613183/tests/contrib/django/testapp/templates/404.html -------------------------------------------------------------------------------- /tests/contrib/django/testapp/templates/error.html: -------------------------------------------------------------------------------- 1 | Foo Bar 2 | Baz 3 | {% invalid template tag %} 4 | 42 5 | 4711 -------------------------------------------------------------------------------- /tests/contrib/django/testapp/templates/jinja2/jinja2_template.html: -------------------------------------------------------------------------------- 1 | 2 | {% macro foo() %}42{% endmacro %}23 3 | -------------------------------------------------------------------------------- /tests/contrib/django/testapp/templates/list_users.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {% for user in users %} 5 | 6 | {% endfor %} 7 |
Users
{{ user }}
8 | 9 | -------------------------------------------------------------------------------- /tests/contrib/flask/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /tests/contrib/flask/templates/users.html: -------------------------------------------------------------------------------- 1 | 2 |
    3 | {% for user in users %} 4 |
  • {{user}}
  • 5 | {% endfor %} 6 |
7 | 8 | -------------------------------------------------------------------------------- /tests/contrib/grpc/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2022, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /tests/contrib/grpc/grpc_app/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2022, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /tests/contrib/grpc/grpc_app/proto/test.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package test; 4 | 5 | service TestService{ 6 | rpc GetServerResponse(Message) returns (MessageResponse) {} 7 | rpc GetServerResponseAbort(Message) returns (MessageResponse) {} 8 | rpc GetServerResponseUnavailable(Message) returns (MessageResponse) {} 9 | rpc GetServerResponseException(Message) returns (MessageResponse) {} 10 | } 11 | 12 | message Message{ 13 | string message = 1; 14 | } 15 | 16 | message MessageResponse{ 17 | string message = 1; 18 | bool received = 2; 19 | } 20 | -------------------------------------------------------------------------------- /tests/contrib/grpc/grpc_app/testgrpc_pb2.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by the protocol buffer compiler. DO NOT EDIT! 3 | # source: test.proto 4 | """Generated protocol buffer code.""" 5 | from google.protobuf.internal import builder as _builder 6 | from google.protobuf import descriptor as _descriptor 7 | from google.protobuf import descriptor_pool as _descriptor_pool 8 | from google.protobuf import symbol_database as _symbol_database 9 | # @@protoc_insertion_point(imports) 10 | 11 | _sym_db = _symbol_database.Default() 12 | 13 | 14 | 15 | 16 | DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\ntest.proto\x12\x04test\"\x1a\n\x07Message\x12\x0f\n\x07message\x18\x01 \x01(\t\"4\n\x0fMessageResponse\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x10\n\x08received\x18\x02 \x01(\x08\x32\x9a\x02\n\x0bTestService\x12;\n\x11GetServerResponse\x12\r.test.Message\x1a\x15.test.MessageResponse\"\x00\x12@\n\x16GetServerResponseAbort\x12\r.test.Message\x1a\x15.test.MessageResponse\"\x00\x12\x46\n\x1cGetServerResponseUnavailable\x12\r.test.Message\x1a\x15.test.MessageResponse\"\x00\x12\x44\n\x1aGetServerResponseException\x12\r.test.Message\x1a\x15.test.MessageResponse\"\x00\x62\x06proto3') 17 | 18 | _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) 19 | _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'test_pb2', globals()) 20 | if _descriptor._USE_C_DESCRIPTORS == False: 21 | 22 | DESCRIPTOR._options = None 23 | _MESSAGE._serialized_start=20 24 | _MESSAGE._serialized_end=46 25 | _MESSAGERESPONSE._serialized_start=48 26 | _MESSAGERESPONSE._serialized_end=100 27 | _TESTSERVICE._serialized_start=103 28 | _TESTSERVICE._serialized_end=385 29 | # @@protoc_insertion_point(module_scope) 30 | -------------------------------------------------------------------------------- /tests/contrib/opentelemetry/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /tests/contrib/opentracing/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /tests/contrib/pylons/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /tests/contrib/sanic/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /tests/contrib/serverless/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /tests/contrib/serverless/aws_api2_test_data.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0", 3 | "routeKey": "ANY /fetch_all", 4 | "rawPath": "/dev/fetch_all", 5 | "rawQueryString": "", 6 | "headers": { 7 | "accept": "*/*", 8 | "content-length": "0", 9 | "host": "02plqthge2.execute-api.us-east-1.amazonaws.com", 10 | "user-agent": "curl/7.64.1", 11 | "x-amzn-trace-id": "Root=1-618018c5-763ade2b18f5734547c93e98", 12 | "x-forwarded-for": "67.171.184.49", 13 | "x-forwarded-port": "443", 14 | "x-forwarded-proto": "https" 15 | }, 16 | "requestContext": { 17 | "accountId": "627286350134", 18 | "apiId": "02plqthge2", 19 | "domainName": "02plqthge2.execute-api.us-east-1.amazonaws.com", 20 | "domainPrefix": "02plqthge2", 21 | "http": { 22 | "method": "GET", 23 | "path": "/dev/fetch_all", 24 | "protocol": "HTTP/1.1", 25 | "sourceIp": "67.171.184.49", 26 | "userAgent": "curl/7.64.1" 27 | }, 28 | "requestId": "IIjO5hs7PHcEPIA=", 29 | "routeKey": "ANY /fetch_all", 30 | "stage": "dev", 31 | "time": "01/Nov/2021:16:41:41 +0000", 32 | "timeEpoch": 1635784901594 33 | }, 34 | "isBase64Encoded": false 35 | } -------------------------------------------------------------------------------- /tests/contrib/serverless/aws_elb_test_data.json: -------------------------------------------------------------------------------- 1 | { 2 | "requestContext": { 3 | "elb": { 4 | "targetGroupArn": "arn:aws:elasticloadbalancing:us-east-2:123456789012:targetgroup/lambda-279XGJDqGZ5rsrHC2Fjr/49e9d65c45c6791a" 5 | } 6 | }, 7 | "httpMethod": "POST", 8 | "path": "/toolz/api/v2.0/downloadPDF/PDF_2020-09-11_11-06-01.pdf", 9 | "queryStringParameters": { 10 | "test%40key": "test%40value", 11 | "language": "en-DE" 12 | }, 13 | "headers": { 14 | "accept-encoding": "gzip,deflate", 15 | "connection": "Keep-Alive", 16 | "host": "blabla.com", 17 | "user-agent": "Apache-HttpClient/4.5.13 (Java/11.0.15)", 18 | "TraceParent": "00-12345678901234567890123456789012-1234567890123456-01", 19 | "x-amzn-trace-id": "Root=1-xxxxxxxxxxxxxx", 20 | "x-forwarded-for": "199.99.99.999", 21 | "x-forwarded-port": "443", 22 | "x-forwarded-proto": "https" 23 | }, 24 | "body": "blablablabody", 25 | "isBase64Encoded": false 26 | } 27 | -------------------------------------------------------------------------------- /tests/contrib/serverless/aws_lurl_test_data.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0", 3 | "routeKey": "ANY /fetch_all", 4 | "rawPath": "/dev/fetch_all", 5 | "rawQueryString": "", 6 | "headers": { 7 | "accept": "*/*", 8 | "content-length": "0", 9 | "host": "myurl.lambda-url.us-west-2.on.aws", 10 | "user-agent": "curl/7.64.1", 11 | "x-amzn-trace-id": "Root=1-618018c5-763ade2b18f5734547c93e98", 12 | "x-forwarded-for": "67.171.184.49", 13 | "x-forwarded-port": "443", 14 | "x-forwarded-proto": "https" 15 | }, 16 | "requestContext": { 17 | "accountId": "627286350134", 18 | "apiId": "02plqthge2", 19 | "domainName": "myurl.lambda-url.us-west-2.on.aws", 20 | "domainPrefix": "02plqthge2", 21 | "http": { 22 | "method": "GET", 23 | "path": "/dev/fetch_all", 24 | "protocol": "HTTP/1.1", 25 | "sourceIp": "67.171.184.49", 26 | "userAgent": "curl/7.64.1" 27 | }, 28 | "requestId": "IIjO5hs7PHcEPIA=", 29 | "routeKey": "ANY /fetch_all", 30 | "stage": "dev", 31 | "time": "01/Nov/2021:16:41:41 +0000", 32 | "timeEpoch": 1635784901594 33 | }, 34 | "isBase64Encoded": false 35 | } -------------------------------------------------------------------------------- /tests/contrib/serverless/aws_s3_test_data.json: -------------------------------------------------------------------------------- 1 | { 2 | "Records": [ 3 | { 4 | "eventVersion": "2.1", 5 | "eventSource": "aws:s3", 6 | "awsRegion": "us-east-1", 7 | "eventTime": "2021-07-22T17:00:56.160Z", 8 | "eventName": "ObjectCreated:Put", 9 | "userIdentity": { 10 | "principalId": "A2RA6A8EUPNS7Q" 11 | }, 12 | "requestParameters": { 13 | "sourceIPAddress": "73.3.110.73" 14 | }, 15 | "responseElements": { 16 | "x-amz-request-id": "0FM18R15SDX52CT2", 17 | "x-amz-id-2": "6XuWW0exU7l4TbWDJmZL3oJgm6g8zgKDzkWM7dcuUKJcvd5mWrBSoPKpPGgINRDiQqwDNQIlVbJ3iWmN/S/e17DkKxT8fuQT" 18 | }, 19 | "s3": { 20 | "s3SchemaVersion": "1.0", 21 | "configurationId": "2ef153aa-f76e-4c29-9d28-24a5eff172ec", 22 | "bucket": { 23 | "name": "basepitestbucket", 24 | "ownerIdentity": { 25 | "principalId": "A2RA6A8EUPNS7Q" 26 | }, 27 | "arn": "arn:aws:s3:::basepitestbucket" 28 | }, 29 | "object": { 30 | "key": "requirements.txt", 31 | "size": 106, 32 | "eTag": "467344a84741a3a3e6d92a7acc24ba5e", 33 | "sequencer": "0060F9A455E75DC318" 34 | } 35 | } 36 | } 37 | ] 38 | } -------------------------------------------------------------------------------- /tests/contrib/serverless/azurefunctions/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2023, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /tests/contrib/twisted/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /tests/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | USER_ID=${LOCAL_USER_ID:-1001} 4 | GROUP_ID=${LOCAL_GROUP_ID:-1001} 5 | 6 | echo "Starting with UID: ${USER_ID} and GID: ${GROUP_ID}" 7 | groupadd -g "${GROUP_ID}" user 8 | useradd --shell /bin/bash -u "${USER_ID}" --gid $GROUP_ID --non-unique --comment "" --create-home user 9 | export HOME=/home/user 10 | 11 | exec /usr/local/bin/gosu $USER_ID:$GROUP_ID "$@" 12 | -------------------------------------------------------------------------------- /tests/events/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /tests/handlers/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /tests/handlers/logbook/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /tests/handlers/logging/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /tests/instrumentation/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /tests/instrumentation/asyncio_tests/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /tests/instrumentation/django_tests/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /tests/instrumentation/django_tests/conftest.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | from tests.contrib.django.conftest import pytest_configure 32 | -------------------------------------------------------------------------------- /tests/instrumentation/jinja2_tests/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /tests/instrumentation/jinja2_tests/mytemplate.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
Hello
4 |
5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/instrumentation/wrapper/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2022, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /tests/metrics/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /tests/middleware/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /tests/processors/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /tests/requirements/lint-flake8.txt: -------------------------------------------------------------------------------- 1 | flake8 2 | flake8-per-file-ignores 3 | -------------------------------------------------------------------------------- /tests/requirements/lint-isort.txt: -------------------------------------------------------------------------------- 1 | isort 2 | mock 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-aiobotocore-newest.txt: -------------------------------------------------------------------------------- 1 | aiobotocore 2 | boto3 3 | -r reqs-base.txt 4 | -------------------------------------------------------------------------------- /tests/requirements/reqs-aiohttp-3.0.txt: -------------------------------------------------------------------------------- 1 | aiohttp>=3,<4 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-aiohttp-newest.txt: -------------------------------------------------------------------------------- 1 | aiohttp 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-aiomysql-newest.txt: -------------------------------------------------------------------------------- 1 | aiomysql 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-aiopg-newest.txt: -------------------------------------------------------------------------------- 1 | aiopg 2 | psycopg2>=2.9 ; platform_python_implementation == 'CPython' 3 | psycopg2cffi>=2.9 ; platform_python_implementation == 'PyPy' 4 | -r reqs-base.txt 5 | -------------------------------------------------------------------------------- /tests/requirements/reqs-aioredis-2.txt: -------------------------------------------------------------------------------- 1 | aioredis>=2.0.0a1 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-aioredis-newest.txt: -------------------------------------------------------------------------------- 1 | aioredis<2 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-asgi-2.txt: -------------------------------------------------------------------------------- 1 | quart==0.6.13 2 | MarkupSafe<2.1 3 | jinja2==3.1.5 4 | async-asgi-testclient 5 | asgiref 6 | -r reqs-base.txt 7 | -------------------------------------------------------------------------------- /tests/requirements/reqs-asgi-newest.txt: -------------------------------------------------------------------------------- 1 | quart 2 | async-asgi-testclient 3 | asgiref 4 | -r reqs-base.txt 5 | -------------------------------------------------------------------------------- /tests/requirements/reqs-asyncpg-0.28.txt: -------------------------------------------------------------------------------- 1 | asyncpg==0.28 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-asyncpg-newest.txt: -------------------------------------------------------------------------------- 1 | asyncpg 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-base.txt: -------------------------------------------------------------------------------- 1 | pytest==7.0.1 ; python_version == '3.6' 2 | pytest==7.4.0 ; python_version > '3.6' 3 | pytest-random-order==1.1.0 4 | pytest-django==4.4.0 5 | coverage==6.2 ; python_version == '3.6' 6 | coverage==6.3 ; python_version == '3.7' 7 | coverage[toml]==6.3 ; python_version == '3.7' 8 | coverage==7.3.1 ; python_version > '3.7' 9 | pytest-cov==4.0.0 ; python_version < '3.8' 10 | pytest-cov==4.1.0 ; python_version > '3.7' 11 | jinja2==3.1.5 ; python_version == '3.7' 12 | pytest-localserver==0.9.0 13 | pytest-mock==3.6.1 ; python_version == '3.6' 14 | pytest-mock==3.10.0 ; python_version > '3.6' 15 | pytest-benchmark==3.4.1 ; python_version == '3.6' 16 | pytest-benchmark==4.0.0 ; python_version > '3.6' 17 | pytest-bdd==5.0.0 ; python_version == '3.6' 18 | pytest-bdd==6.1.1 ; python_version > '3.6' 19 | pytest-rerunfailures==10.2 ; python_version == '3.6' 20 | pytest-rerunfailures==11.1.2 ; python_version > '3.6' 21 | jsonschema==3.2.0 ; python_version == '3.6' 22 | jsonschema==4.17.3 ; python_version > '3.6' 23 | 24 | 25 | urllib3!=2.0.0,<3.0.0 26 | certifi 27 | Logbook 28 | mock 29 | pytz 30 | ecs_logging 31 | structlog 32 | wrapt>=1.14.1,!=1.15.0 33 | simplejson 34 | 35 | pytest-asyncio==0.21.0 ; python_version >= '3.7' 36 | asynctest==0.13.0 ; python_version >= '3.7' 37 | typing_extensions!=3.10.0.1 ; python_version >= '3.10' # see https://github.com/python/typing/issues/865 38 | -------------------------------------------------------------------------------- /tests/requirements/reqs-boto3-1.5.txt: -------------------------------------------------------------------------------- 1 | boto3>=1.5,<1.6 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-boto3-1.6.txt: -------------------------------------------------------------------------------- 1 | boto3>=1.6,<1.7 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-boto3-newest.txt: -------------------------------------------------------------------------------- 1 | boto3 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-cassandra-3.4.txt: -------------------------------------------------------------------------------- 1 | cassandra-driver>=3.4.0,<3.5.0 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-cassandra-newest.txt: -------------------------------------------------------------------------------- 1 | cassandra-driver>=3.14.0 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-celery-5-django-3.txt: -------------------------------------------------------------------------------- 1 | -r reqs-celery-5.txt 2 | -r reqs-django-3.1.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-celery-5-django-4.txt: -------------------------------------------------------------------------------- 1 | -r reqs-celery-5.txt 2 | -r reqs-django-4.0.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-celery-5-django-5.txt: -------------------------------------------------------------------------------- 1 | -r reqs-celery-5.txt 2 | -r reqs-django-5.0.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-celery-5-flask-2.txt: -------------------------------------------------------------------------------- 1 | -r reqs-celery-5.txt 2 | -r reqs-flask-2.0.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-celery-5.txt: -------------------------------------------------------------------------------- 1 | celery<6 2 | importlib-metadata<5.0; python_version<"3.8" 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-django-1.11.txt: -------------------------------------------------------------------------------- 1 | Django>=1.11,<2.0 2 | jinja2<4 3 | -r reqs-base.txt 4 | -------------------------------------------------------------------------------- /tests/requirements/reqs-django-2.0.txt: -------------------------------------------------------------------------------- 1 | Django>=2.0,<2.1 2 | jinja2<4 3 | -r reqs-base.txt 4 | -------------------------------------------------------------------------------- /tests/requirements/reqs-django-2.1.txt: -------------------------------------------------------------------------------- 1 | Django>=2.1,<2.2 2 | jinja2<4 3 | -r reqs-base.txt 4 | -------------------------------------------------------------------------------- /tests/requirements/reqs-django-2.2.txt: -------------------------------------------------------------------------------- 1 | Django>=2.2,<2.3 2 | jinja2<4 3 | -r reqs-base.txt 4 | -------------------------------------------------------------------------------- /tests/requirements/reqs-django-3.0.txt: -------------------------------------------------------------------------------- 1 | Django>=3.0b1,<3.1 2 | jinja2<4 3 | -r reqs-base.txt 4 | -------------------------------------------------------------------------------- /tests/requirements/reqs-django-3.1.txt: -------------------------------------------------------------------------------- 1 | Django>=3.1,<3.2 2 | jinja2<4 3 | -r reqs-base.txt 4 | -------------------------------------------------------------------------------- /tests/requirements/reqs-django-3.2.txt: -------------------------------------------------------------------------------- 1 | Django>=3.2b1,<3.3 2 | jinja2<4 3 | -r reqs-base.txt 4 | -------------------------------------------------------------------------------- /tests/requirements/reqs-django-4.0.txt: -------------------------------------------------------------------------------- 1 | Django>=4.0a1,<4.1 2 | jinja2<4 3 | -r reqs-base.txt 4 | -------------------------------------------------------------------------------- /tests/requirements/reqs-django-4.2.txt: -------------------------------------------------------------------------------- 1 | Django>=4.2,<5.0 2 | jinja2<4 3 | -r reqs-base.txt 4 | -------------------------------------------------------------------------------- /tests/requirements/reqs-django-5.0.txt: -------------------------------------------------------------------------------- 1 | Django>=5.0,<5.1 2 | jinja2<4 3 | -r reqs-base.txt 4 | -------------------------------------------------------------------------------- /tests/requirements/reqs-django-master.txt: -------------------------------------------------------------------------------- 1 | https://github.com/django/django/archive/master.zip#egg=Django==100 2 | jinja2<4 3 | -r reqs-base.txt 4 | -------------------------------------------------------------------------------- /tests/requirements/reqs-elasticsearch-2.txt: -------------------------------------------------------------------------------- 1 | elasticsearch>=2.0,<3.0 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-elasticsearch-5.txt: -------------------------------------------------------------------------------- 1 | elasticsearch>=5.0,<6.0 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-elasticsearch-6.txt: -------------------------------------------------------------------------------- 1 | elasticsearch>=6.0,<7.0 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-elasticsearch-7.txt: -------------------------------------------------------------------------------- 1 | elasticsearch>=7.0,<8.0 2 | aiohttp 3 | -r reqs-base.txt 4 | -------------------------------------------------------------------------------- /tests/requirements/reqs-elasticsearch-8.txt: -------------------------------------------------------------------------------- 1 | elasticsearch>=8.0,<9.0 2 | aiohttp 3 | -r reqs-base.txt 4 | -------------------------------------------------------------------------------- /tests/requirements/reqs-eventlet-newest.txt: -------------------------------------------------------------------------------- 1 | eventlet 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-flask-0.10.txt: -------------------------------------------------------------------------------- 1 | Flask>=0.10,<0.11 2 | itsdangerous==2.0.1 3 | blinker>=1.1 4 | -r reqs-base.txt 5 | -------------------------------------------------------------------------------- /tests/requirements/reqs-flask-0.11.txt: -------------------------------------------------------------------------------- 1 | Flask>=0.11,<0.12 2 | itsdangerous==2.0.1 3 | blinker>=1.1 4 | -r reqs-base.txt 5 | -------------------------------------------------------------------------------- /tests/requirements/reqs-flask-0.12.txt: -------------------------------------------------------------------------------- 1 | Flask>=0.12,<0.13 2 | itsdangerous==2.0.1 3 | blinker>=1.1 4 | -r reqs-base.txt 5 | -------------------------------------------------------------------------------- /tests/requirements/reqs-flask-1.0.txt: -------------------------------------------------------------------------------- 1 | jinja2<3.1.0 2 | Werkzeug<2.1.0 3 | Flask>=1.0,<1.1 4 | MarkupSafe<2.1 5 | itsdangerous==2.0.1 6 | blinker>=1.1 7 | -r reqs-base.txt 8 | -------------------------------------------------------------------------------- /tests/requirements/reqs-flask-1.1.txt: -------------------------------------------------------------------------------- 1 | jinja2<3.2.0 2 | Werkzeug<2.1.0 3 | Flask>=1.1,<1.2 4 | MarkupSafe<2.1 5 | itsdangerous==2.0.1 6 | blinker>=1.1 7 | -r reqs-base.txt 8 | -------------------------------------------------------------------------------- /tests/requirements/reqs-flask-2.0.txt: -------------------------------------------------------------------------------- 1 | Flask>=2.0,<2.1 2 | Werkzeug<3 3 | blinker>=1.1 4 | itsdangerous 5 | -r reqs-base.txt 6 | -------------------------------------------------------------------------------- /tests/requirements/reqs-flask-2.1.txt: -------------------------------------------------------------------------------- 1 | Flask>=2.1,<2.2 2 | Werkzeug<3 3 | blinker>=1.1 4 | itsdangerous 5 | -r reqs-base.txt 6 | -------------------------------------------------------------------------------- /tests/requirements/reqs-flask-2.2.txt: -------------------------------------------------------------------------------- 1 | Flask>=2.2,<2.3 2 | Werkzeug<3 3 | blinker>=1.1 4 | itsdangerous 5 | -r reqs-base.txt 6 | -------------------------------------------------------------------------------- /tests/requirements/reqs-flask-2.3.txt: -------------------------------------------------------------------------------- 1 | Flask>=2.3,<3 2 | blinker>=1.1 3 | itsdangerous 4 | -r reqs-base.txt 5 | -------------------------------------------------------------------------------- /tests/requirements/reqs-flask-3.0.txt: -------------------------------------------------------------------------------- 1 | Flask>=3.0,<3.1 2 | itsdangerous 3 | -r reqs-base.txt 4 | -------------------------------------------------------------------------------- /tests/requirements/reqs-flask-master.txt: -------------------------------------------------------------------------------- 1 | https://github.com/pallets/flask/archive/master.zip#egg=flask==100 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-gevent-newest.txt: -------------------------------------------------------------------------------- 1 | gevent 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-graphene-2.txt: -------------------------------------------------------------------------------- 1 | graphene>2,<3 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-grpc-1.24.txt: -------------------------------------------------------------------------------- 1 | grpcio==1.24.0 2 | grpcio-tools 3 | -r reqs-base.txt 4 | -------------------------------------------------------------------------------- /tests/requirements/reqs-grpc-newest.txt: -------------------------------------------------------------------------------- 1 | grpcio 2 | grpcio-tools 3 | -r reqs-base.txt 4 | -------------------------------------------------------------------------------- /tests/requirements/reqs-httplib2-newest.txt: -------------------------------------------------------------------------------- 1 | httplib2>=0.18 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-httpx-0.13.txt: -------------------------------------------------------------------------------- 1 | httpx==0.13.* 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-httpx-0.14.txt: -------------------------------------------------------------------------------- 1 | httpx==0.14.* 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-httpx-0.21.txt: -------------------------------------------------------------------------------- 1 | httpx==0.21.* 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-httpx-newest.txt: -------------------------------------------------------------------------------- 1 | httpx 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-jinja2-2.txt: -------------------------------------------------------------------------------- 1 | jinja2<3 2 | MarkupSafe<2.1 3 | -r reqs-base.txt 4 | -------------------------------------------------------------------------------- /tests/requirements/reqs-jinja2-3.txt: -------------------------------------------------------------------------------- 1 | jinja2<4 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-kafka-python-newest.txt: -------------------------------------------------------------------------------- 1 | kafka-python 2 | -------------------------------------------------------------------------------- /tests/requirements/reqs-memcached-newest.txt: -------------------------------------------------------------------------------- 1 | python-memcached>=1.59 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-mysql_connector-newest.txt: -------------------------------------------------------------------------------- 1 | mysql-connector-python 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-mysqlclient-newest.txt: -------------------------------------------------------------------------------- 1 | mysqlclient 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-none.txt: -------------------------------------------------------------------------------- 1 | -r reqs-base.txt 2 | -------------------------------------------------------------------------------- /tests/requirements/reqs-opentelemetry-newest.txt: -------------------------------------------------------------------------------- 1 | opentelemetry-sdk 2 | opentelemetry-api 3 | -r reqs-base.txt 4 | -------------------------------------------------------------------------------- /tests/requirements/reqs-opentracing-2.0.txt: -------------------------------------------------------------------------------- 1 | opentracing>=2.0.0,<2.1.0 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-opentracing-newest.txt: -------------------------------------------------------------------------------- 1 | opentracing>=2.1.0 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-prometheus_client-newest.txt: -------------------------------------------------------------------------------- 1 | prometheus_client 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-psutil-4.0.txt: -------------------------------------------------------------------------------- 1 | psutil>=4.0.0,<5.0 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-psutil-5.0.txt: -------------------------------------------------------------------------------- 1 | psutil==5.0.0 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-psutil-newest.txt: -------------------------------------------------------------------------------- 1 | psutil >= 5.4.8 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-psycopg-newest.txt: -------------------------------------------------------------------------------- 1 | psycopg 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-psycopg2-newest.txt: -------------------------------------------------------------------------------- 1 | psycopg2 ; platform_python_implementation == 'CPython' 2 | psycopg2cffi ; platform_python_implementation == 'PyPy' 3 | -r reqs-base.txt 4 | -------------------------------------------------------------------------------- /tests/requirements/reqs-pylibmc-1.4.txt: -------------------------------------------------------------------------------- 1 | pylibmc>=1.4,<1.5 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-pylibmc-newest.txt: -------------------------------------------------------------------------------- 1 | pylibmc>=1.5.2 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-pymemcache-3.0.txt: -------------------------------------------------------------------------------- 1 | pymemcache==3.0.0 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-pymemcache-newest.txt: -------------------------------------------------------------------------------- 1 | pymemcache>=3.1.0 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-pymongo-3.1.txt: -------------------------------------------------------------------------------- 1 | pymongo>=3.1,<3.2 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-pymongo-3.2.txt: -------------------------------------------------------------------------------- 1 | pymongo>=3.2,<3.3 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-pymongo-3.3.txt: -------------------------------------------------------------------------------- 1 | pymongo>=3.3,<3.4 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-pymongo-3.4.txt: -------------------------------------------------------------------------------- 1 | pymongo>=3.4,<3.5 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-pymongo-3.5.txt: -------------------------------------------------------------------------------- 1 | pymongo>=3.5,<3.6 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-pymongo-3.6.txt: -------------------------------------------------------------------------------- 1 | pymongo>=3.6,<4.0 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-pymongo-newest.txt: -------------------------------------------------------------------------------- 1 | pymongo>=4.0 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-pymssql-newest.txt: -------------------------------------------------------------------------------- 1 | cython 2 | pymssql ; python_version >= '3.9' 3 | pymssql==2.3.1 ; python_version < '3.9' 4 | -r reqs-base.txt 5 | -------------------------------------------------------------------------------- /tests/requirements/reqs-pymysql-newest.txt: -------------------------------------------------------------------------------- 1 | pymysql 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-pyodbc-newest.txt: -------------------------------------------------------------------------------- 1 | pyodbc 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-redis-2.txt: -------------------------------------------------------------------------------- 1 | redis<3 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-redis-3.txt: -------------------------------------------------------------------------------- 1 | redis<4 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-redis-newest.txt: -------------------------------------------------------------------------------- 1 | redis 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-requests-newest.txt: -------------------------------------------------------------------------------- 1 | requests>=2.18 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-sanic-20.12.txt: -------------------------------------------------------------------------------- 1 | sanic<20.13 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-sanic-newest.txt: -------------------------------------------------------------------------------- 1 | sanic 2 | sanic-testing 3 | -r reqs-base.txt 4 | -------------------------------------------------------------------------------- /tests/requirements/reqs-starlette-0.13.txt: -------------------------------------------------------------------------------- 1 | starlette>=0.13,<0.14 2 | aiofiles==0.7.0 3 | requests==2.32.1; python_version >= '3.8' 4 | requests==2.31.0; python_version < '3.8' 5 | -r reqs-base.txt 6 | -------------------------------------------------------------------------------- /tests/requirements/reqs-starlette-0.14.txt: -------------------------------------------------------------------------------- 1 | starlette>=0.14,<0.15 2 | requests==2.32.1; python_version >= '3.8' 3 | requests==2.31.0; python_version < '3.8' 4 | aiofiles 5 | -r reqs-base.txt 6 | -------------------------------------------------------------------------------- /tests/requirements/reqs-starlette-newest.txt: -------------------------------------------------------------------------------- 1 | starlette>=0.15 2 | aiofiles 3 | httpx 4 | flask 5 | -r reqs-base.txt 6 | -------------------------------------------------------------------------------- /tests/requirements/reqs-tornado-newest.txt: -------------------------------------------------------------------------------- 1 | tornado>=6.0 2 | pytest-tornado 3 | -r reqs-base.txt 4 | -------------------------------------------------------------------------------- /tests/requirements/reqs-twisted-15.txt: -------------------------------------------------------------------------------- 1 | Twisted>=15,<16 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-twisted-16.txt: -------------------------------------------------------------------------------- 1 | Twisted>=16,<17 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-twisted-17.txt: -------------------------------------------------------------------------------- 1 | Twisted>=17,<18 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-twisted-18.txt: -------------------------------------------------------------------------------- 1 | Twisted>=18.4,<19 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/requirements/reqs-twisted-newest.txt: -------------------------------------------------------------------------------- 1 | Twisted 2 | -r reqs-base.txt 3 | -------------------------------------------------------------------------------- /tests/scripts/docker/cleanup.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | DOCKER_IDS=$(docker ps -a -q) 4 | 5 | if [ -n "${DOCKER_IDS}" ]; then 6 | docker stop ${DOCKER_IDS} 7 | docker rm -v ${DOCKER_IDS} 8 | docker volume prune -f 9 | fi 10 | 11 | exit 0 12 | -------------------------------------------------------------------------------- /tests/scripts/docker/docs.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | make docs 5 | -------------------------------------------------------------------------------- /tests/scripts/envs/aiobotocore.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m aiobotocore" 2 | export DOCKER_DEPS="localstack" 3 | export AWS_URL="http://localstack:4566" 4 | export WAIT_FOR_HOST="localstack" 5 | export WAIT_FOR_PORT=4566 6 | -------------------------------------------------------------------------------- /tests/scripts/envs/aiohttp.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m aiohttp" 2 | -------------------------------------------------------------------------------- /tests/scripts/envs/aiomysql.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m aiomysql" 2 | export DOCKER_DEPS="mysql" 3 | export MYSQL_HOST="mysql" 4 | export MYSQL_USER="eapm" 5 | export MYSQL_PASSWORD="Very(!)Secure" 6 | export WAIT_FOR_HOST="mysql" 7 | export WAIT_FOR_PORT=3306 8 | -------------------------------------------------------------------------------- /tests/scripts/envs/aiopg.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m aiopg" 2 | export DOCKER_DEPS="postgres" 3 | export POSTGRES_HOST="postgres" 4 | export POSTGRES_USER="postgres" 5 | export POSTGRES_PASSWORD="postgres" 6 | export POSTGRES_DB="elasticapm_test" 7 | export POSTGRES_HOST="postgres" 8 | export POSTGRES_PORT="5432" 9 | -------------------------------------------------------------------------------- /tests/scripts/envs/aioredis.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m aioredis" 2 | export DOCKER_DEPS="redis" 3 | export REDIS_HOST="redis" 4 | -------------------------------------------------------------------------------- /tests/scripts/envs/asgi.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m asgi" 2 | -------------------------------------------------------------------------------- /tests/scripts/envs/asyncpg.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m asyncpg" 2 | export DOCKER_DEPS="postgres" 3 | export POSTGRES_HOST="postgres" 4 | export POSTGRES_USER="postgres" 5 | export POSTGRES_PASSWORD="postgres" 6 | export POSTGRES_DB="elasticapm_test" 7 | export POSTGRES_HOST="postgres" 8 | export POSTGRES_PORT="5432" 9 | -------------------------------------------------------------------------------- /tests/scripts/envs/boto3.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m boto3" 2 | export DOCKER_DEPS="localstack" 3 | export AWS_URL="http://localstack:4566" 4 | export WAIT_FOR_HOST="localstack" 5 | export WAIT_FOR_PORT=4566 6 | -------------------------------------------------------------------------------- /tests/scripts/envs/cassandra-3.4.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m cassandra" 2 | export DOCKER_DEPS="cassandra3" 3 | export CASSANDRA_HOST="cassandra3" 4 | export WAIT_FOR_HOST="cassandra3" 5 | export WAIT_FOR_PORT=9042 6 | export CASS_DRIVER_BUILD_CONCURRENCY=4 7 | -------------------------------------------------------------------------------- /tests/scripts/envs/cassandra-newest.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m cassandra" 2 | export DOCKER_DEPS="cassandra3" 3 | export CASSANDRA_HOST="cassandra3" 4 | export WAIT_FOR_HOST="cassandra3" 5 | export WAIT_FOR_PORT=9042 6 | export CASS_DRIVER_BUILD_CONCURRENCY=4 7 | -------------------------------------------------------------------------------- /tests/scripts/envs/celery.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m celery" 2 | -------------------------------------------------------------------------------- /tests/scripts/envs/django.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m django" 2 | -------------------------------------------------------------------------------- /tests/scripts/envs/elasticsearch-2.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m elasticsearch" 2 | export ES_URL="http://elasticsearch2:9200" 3 | export DOCKER_DEPS="elasticsearch2" 4 | export WAIT_FOR_HOST="elasticsearch2" 5 | export WAIT_FOR_PORT=9200 6 | -------------------------------------------------------------------------------- /tests/scripts/envs/elasticsearch-5.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m elasticsearch" 2 | export ES_URL="http://elasticsearch5:9200" 3 | export DOCKER_DEPS="elasticsearch5" 4 | export WAIT_FOR_HOST="elasticsearch5" 5 | export WAIT_FOR_PORT=9200 6 | -------------------------------------------------------------------------------- /tests/scripts/envs/elasticsearch-6.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m elasticsearch" 2 | export ES_URL="http://elasticsearch6:9200" 3 | export DOCKER_DEPS="elasticsearch6" 4 | export WAIT_FOR_HOST="elasticsearch6" 5 | export WAIT_FOR_PORT=9200 6 | -------------------------------------------------------------------------------- /tests/scripts/envs/elasticsearch-7.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m elasticsearch" 2 | export ES_URL="http://elasticsearch7:9200" 3 | export DOCKER_DEPS="elasticsearch7" 4 | export WAIT_FOR_HOST="elasticsearch7" 5 | export WAIT_FOR_PORT=9200 6 | -------------------------------------------------------------------------------- /tests/scripts/envs/elasticsearch-8.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m elasticsearch" 2 | export ES_URL="http://elasticsearch8:9200" 3 | export DOCKER_DEPS="elasticsearch8" 4 | export WAIT_FOR_HOST="elasticsearch8" 5 | export WAIT_FOR_PORT=9200 6 | -------------------------------------------------------------------------------- /tests/scripts/envs/eventlet.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m eventlet" 2 | -------------------------------------------------------------------------------- /tests/scripts/envs/flask.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m flask" 2 | -------------------------------------------------------------------------------- /tests/scripts/envs/gevent.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m gevent" 2 | -------------------------------------------------------------------------------- /tests/scripts/envs/graphene.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m graphene" 2 | -------------------------------------------------------------------------------- /tests/scripts/envs/grpc.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m grpc" 2 | -------------------------------------------------------------------------------- /tests/scripts/envs/httplib2.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m httplib2" 2 | -------------------------------------------------------------------------------- /tests/scripts/envs/httpx.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m httpx" 2 | -------------------------------------------------------------------------------- /tests/scripts/envs/jinja2.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m jinja2" 2 | -------------------------------------------------------------------------------- /tests/scripts/envs/kafka.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m kafka" 2 | export DOCKER_DEPS="kafka" 3 | export KAFKA_HOST="kafka" 4 | export WAIT_FOR_HOST="kafka" 5 | export WAIT_FOR_PORT=9092 6 | -------------------------------------------------------------------------------- /tests/scripts/envs/memcached.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m memcached" 2 | export DOCKER_DEPS="memcached" 3 | export MEMCACHED_HOST="memcached" 4 | -------------------------------------------------------------------------------- /tests/scripts/envs/mysql_connector.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m mysql_connector" 2 | export DOCKER_DEPS="mysql" 3 | export MYSQL_HOST="mysql" 4 | export MYSQL_USER="eapm" 5 | export MYSQL_PASSWORD="Very(!)Secure" 6 | export WAIT_FOR_HOST="mysql" 7 | export WAIT_FOR_PORT=3306 8 | -------------------------------------------------------------------------------- /tests/scripts/envs/mysqlclient.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m mysqlclient" 2 | export DOCKER_DEPS="mysql" 3 | export MYSQL_HOST="mysql" 4 | export MYSQL_USER="eapm" 5 | export MYSQL_PASSWORD="Very(!)Secure" 6 | export WAIT_FOR_HOST="mysql" 7 | export WAIT_FOR_PORT=3306 8 | -------------------------------------------------------------------------------- /tests/scripts/envs/opentelemetry.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m opentelemetry" 2 | -------------------------------------------------------------------------------- /tests/scripts/envs/opentracing.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m opentracing" 2 | -------------------------------------------------------------------------------- /tests/scripts/envs/prometheus_client.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m prometheus_client" 2 | -------------------------------------------------------------------------------- /tests/scripts/envs/psutil.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m psutil" 2 | -------------------------------------------------------------------------------- /tests/scripts/envs/psycopg.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m psycopg" 2 | export DOCKER_DEPS="postgres" 3 | export POSTGRES_HOST="postgres" 4 | export POSTGRES_USER="postgres" 5 | export POSTGRES_PASSWORD="postgres" 6 | export POSTGRES_DB="elasticapm_test" 7 | export POSTGRES_HOST="postgres" 8 | export POSTGRES_PORT="5432" 9 | -------------------------------------------------------------------------------- /tests/scripts/envs/psycopg2.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m psycopg2" 2 | export DOCKER_DEPS="postgres" 3 | export POSTGRES_HOST="postgres" 4 | export POSTGRES_USER="postgres" 5 | export POSTGRES_PASSWORD="postgres" 6 | export POSTGRES_DB="elasticapm_test" 7 | export POSTGRES_HOST="postgres" 8 | export POSTGRES_PORT="5432" 9 | -------------------------------------------------------------------------------- /tests/scripts/envs/pylibmc.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m pylibmc" 2 | export DOCKER_DEPS="memcached" 3 | export MEMCACHED_HOST="memcached" 4 | -------------------------------------------------------------------------------- /tests/scripts/envs/pymemcache.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m pymemcache" 2 | export DOCKER_DEPS="memcached" 3 | export MEMCACHED_HOST="memcached" 4 | -------------------------------------------------------------------------------- /tests/scripts/envs/pymongo-2.9.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m mongodb" 2 | export DOCKER_DEPS="mongodb30" 3 | export MONGODB_HOST="mongodb30" 4 | -------------------------------------------------------------------------------- /tests/scripts/envs/pymongo-3.0.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m mongodb" 2 | export DOCKER_DEPS="mongodb30" 3 | export MONGODB_HOST="mongodb30" 4 | -------------------------------------------------------------------------------- /tests/scripts/envs/pymongo-3.1.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m mongodb" 2 | export DOCKER_DEPS="mongodb30" 3 | export MONGODB_HOST="mongodb30" 4 | -------------------------------------------------------------------------------- /tests/scripts/envs/pymongo-3.2.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m mongodb" 2 | export DOCKER_DEPS="mongodb32" 3 | export MONGODB_HOST="mongodb32" 4 | -------------------------------------------------------------------------------- /tests/scripts/envs/pymongo-3.3.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m mongodb" 2 | export DOCKER_DEPS="mongodb32" 3 | export MONGODB_HOST="mongodb32" 4 | -------------------------------------------------------------------------------- /tests/scripts/envs/pymongo-3.4.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m mongodb" 2 | export DOCKER_DEPS="mongodb34" 3 | export MONGODB_HOST="mongodb34" 4 | -------------------------------------------------------------------------------- /tests/scripts/envs/pymongo-3.5.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m mongodb" 2 | export DOCKER_DEPS="mongodb34" 3 | export MONGODB_HOST="mongodb34" 4 | -------------------------------------------------------------------------------- /tests/scripts/envs/pymongo-3.6.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m mongodb" 2 | export DOCKER_DEPS="mongodb36" 3 | export MONGODB_HOST="mongodb36" 4 | -------------------------------------------------------------------------------- /tests/scripts/envs/pymongo-newest.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m mongodb" 2 | export DOCKER_DEPS="mongodb40" 3 | export MONGODB_HOST="mongodb40" 4 | -------------------------------------------------------------------------------- /tests/scripts/envs/pymssql.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m pymssql" 2 | export DOCKER_DEPS="mssql" 3 | export MSSQL_HOST="mssql" 4 | export MSSQL_USER="SA" 5 | export MSSQL_PASSWORD="Very(!)Secure" 6 | export WAIT_FOR_HOST="mssql" 7 | export WAIT_FOR_PORT=1433 8 | -------------------------------------------------------------------------------- /tests/scripts/envs/pymysql.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m pymysql" 2 | export DOCKER_DEPS="mysql" 3 | export MYSQL_HOST="mysql" 4 | export MYSQL_USER="eapm" 5 | export MYSQL_PASSWORD="Very(!)Secure" 6 | export WAIT_FOR_HOST="mysql" 7 | export WAIT_FOR_PORT=3306 8 | -------------------------------------------------------------------------------- /tests/scripts/envs/pyodbc.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m pyodbc" 2 | export DOCKER_DEPS="postgres" 3 | export POSTGRES_HOST="postgres" 4 | export POSTGRES_USER="postgres" 5 | export POSTGRES_PASSWORD="postgres" 6 | export POSTGRES_DB="elasticapm_test" 7 | export POSTGRES_HOST="postgres" 8 | export POSTGRES_PORT="5432" 9 | -------------------------------------------------------------------------------- /tests/scripts/envs/redis.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m redis" 2 | export DOCKER_DEPS="redis" 3 | export REDIS_HOST="redis" 4 | -------------------------------------------------------------------------------- /tests/scripts/envs/requests.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m requests" 2 | -------------------------------------------------------------------------------- /tests/scripts/envs/sanic.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m sanic" 2 | -------------------------------------------------------------------------------- /tests/scripts/envs/starlette.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m starlette" 2 | -------------------------------------------------------------------------------- /tests/scripts/envs/tornado.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m tornado" 2 | -------------------------------------------------------------------------------- /tests/scripts/envs/twisted.sh: -------------------------------------------------------------------------------- 1 | export PYTEST_MARKER="-m twisted" 2 | -------------------------------------------------------------------------------- /tests/scripts/license_headers_check.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | if [[ $# -eq 0 ]] 3 | then 4 | FILES=$(find . -iname "*.py" -not -path "./dist/*" -not -path "./build/*" -not -path "./tests/utils/stacks/linenos.py") 5 | else 6 | FILES=$@ 7 | fi 8 | 9 | MISSING=$(grep --files-without-match "Copyright (c) [0-9]..., Elastic" ${FILES}) 10 | 11 | if [[ -z "$MISSING" ]] 12 | then 13 | exit 0 14 | else 15 | echo "Files with missing copyright header:" 16 | echo $MISSING 17 | exit 1 18 | fi 19 | -------------------------------------------------------------------------------- /tests/scripts/run_tests.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | export PATH=${HOME}/.local/bin:${PATH} 6 | python -m pip install --user -U pip setuptools --cache-dir "${PIP_CACHE}" 7 | python -m pip install --user -r "tests/requirements/reqs-${FRAMEWORK}.txt" --cache-dir "${PIP_CACHE}" 8 | 9 | export PYTHON_VERSION=$(python -c "import platform; pv=platform.python_version_tuple(); print('pypy' + ('' if pv[0] == 2 else str(pv[0])) if platform.python_implementation() == 'PyPy' else '.'.join(map(str, platform.python_version_tuple()[:2])))") 10 | 11 | # check if the full FRAMEWORK name is in scripts/envs 12 | if [[ -e "./tests/scripts/envs/${FRAMEWORK}.sh" ]] 13 | then 14 | source ./tests/scripts/envs/${FRAMEWORK}.sh 15 | else 16 | # check if only the first part of the FRAMEWORK is in scripts/envs 17 | IFS='-'; frameworkParts=($FRAMEWORK); unset IFS; 18 | if [[ -e "./tests/scripts/envs/${frameworkParts[0]}.sh" ]] 19 | then 20 | source ./tests/scripts/envs/${frameworkParts[0]}.sh 21 | fi 22 | fi 23 | 24 | if [[ -n $WAIT_FOR_HOST ]] 25 | then 26 | echo "Waiting for $WAIT_FOR_HOST:$WAIT_FOR_PORT" 27 | while ! nc -z $WAIT_FOR_HOST $WAIT_FOR_PORT; do 28 | sleep 1 29 | done 30 | echo "$WAIT_FOR_HOST:$WAIT_FOR_PORT is up!" 31 | fi 32 | 33 | if [[ "$WITH_COVERAGE" == "true" ]] 34 | then 35 | make coverage 36 | else 37 | make test 38 | fi 39 | -------------------------------------------------------------------------------- /tests/transports/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /tests/transports/wrong_cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIC9DCCAdygAwIBAgIRAPrpYLvUsk2GY0O0HrSy1tMwDQYJKoZIhvcNAQELBQAw 3 | EjEQMA4GA1UEChMHQWNtZSBDbzAeFw0xODExMjIwNjQyNDNaFw0xOTExMjIwNjQy 4 | NDNaMBIxEDAOBgNVBAoTB0FjbWUgQ28wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw 5 | ggEKAoIBAQDzcGv/FzFuZTFZ882wWJwYhkah+LiVwXfcN3ZkkzXGI5emz2ghBhkx 6 | RXymZVXj7nX8KktXgPjIF+JUSuDexlp20dcy4Xq9Kfn/zZ025S3l+JqmByboGdU0 7 | cCl7t6nUvySPvVRVWxHuByVCHEWKU+ELR4zlVmREgdHlYj6UGeYsou4pUmYrQkrF 8 | Iw1o+LqTtQ70nUtr82u7qG6i76h0gUYI0bRxmkAwW2kSAsNSM2Hgqou+I+zX0T9v 9 | X6HGsh4pTU6XVJ/r+klBOZM0wXNh9lRQx2+3J8mTxKadXVrBCry333OIRIO9Vv56 10 | 9pEGNHsUqvWMZhpKs7f323MNkMdIu+olAgMBAAGjRTBDMA4GA1UdDwEB/wQEAwIF 11 | oDATBgNVHSUEDDAKBggrBgEFBQcDATAMBgNVHRMBAf8EAjAAMA4GA1UdEQQHMAWC 12 | A2ZvbzANBgkqhkiG9w0BAQsFAAOCAQEAb9hSwjlOzSRWJ4BdJfuSBUjqRUTpulGX 13 | gGzNKH9PZM8wlpRh/Xiv09jN08XpW4pmnDFOMGZnYk4OR3et4pRmlJ2v8yPRsydD 14 | pr4BrKMykY+jsngmsp7tzZBt+vHACyqplD8K8SivIuxsXrbUu9ekkMemv0G82TmO 15 | ZUCerakCm8sojmQOTfb7ZqAfZifnGwTRi+6y3TCkwIupTL3l/S8E42L7l8gg+xGU 16 | 5nYYHVgyZroEuoJtGVmvakJJpGLcEzD2ai4X212qKC1dp9cjzfWgWxImn9jivYqy 17 | cxsI6aaSYdZaM2JkmtnDLV0auBs0r8SN2nluFxxEStpK/zxn8SH5Sw== 18 | -----END CERTIFICATE----- 19 | -------------------------------------------------------------------------------- /tests/upstream/json-specs/cgroup_parsing.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elastic/apm-agent-python/331f6867887fc4fb4c344cb470cf643739613183/tests/upstream/json-specs/cgroup_parsing.json -------------------------------------------------------------------------------- /tests/utils/encoding/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /tests/utils/json_utils/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /tests/utils/stacks/linenos.py: -------------------------------------------------------------------------------- 1 | 1 2 | 2 3 | 3 4 | 4 5 | 5 6 | 6 7 | 7 8 | 8 9 | 9 10 | 10 11 | 11 12 | 12 13 | 13 14 | 14 15 | 15 16 | 16 17 | 17 18 | 18 19 | 19 20 | 20 21 | -------------------------------------------------------------------------------- /tests/utils/stacks/linenos2.py: -------------------------------------------------------------------------------- 1 | a 2 | b 3 | c 4 | d 5 | e 6 | f 7 | g 8 | h 9 | i 10 | j 11 | k 12 | l 13 | m 14 | n 15 | o 16 | p 17 | q 18 | r 19 | s 20 | t 21 | u 22 | v 23 | w 24 | x 25 | y 26 | z 27 | -------------------------------------------------------------------------------- /tests/utils/test_wildcard_matcher_cases/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2020, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /tests/utils/wsgi/__init__.py: -------------------------------------------------------------------------------- 1 | # BSD 3-Clause License 2 | # 3 | # Copyright (c) 2019, Elasticsearch BV 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, this 10 | # list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright notice, 13 | # this list of conditions and the following disclaimer in the documentation 14 | # and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /updatecli-compose.yaml: -------------------------------------------------------------------------------- 1 | # Config file for `updatecli compose ...`. 2 | # https://www.updatecli.io/docs/core/compose/ 3 | policies: 4 | - name: Handle apm-data server specs 5 | policy: ghcr.io/elastic/oblt-updatecli-policies/apm/apm-data-spec:0.6.0@sha256:c0bbdec23541bed38df1342c95aeb601530a113db1ff11715c1c7616ed5e9e8b 6 | values: 7 | - .ci/updatecli/values.d/scm.yml 8 | - .ci/updatecli/values.d/apm-data-spec.yml 9 | - name: Handle apm gherkin specs 10 | policy: ghcr.io/elastic/oblt-updatecli-policies/apm/apm-gherkin:0.6.0@sha256:dbaf4d855c5c212c3b5a8d2cc98c243a2b769ac347198ae8814393a1a0576587 11 | values: 12 | - .ci/updatecli/values.d/scm.yml 13 | - .ci/updatecli/values.d/apm-gherkin.yml 14 | - name: Handle apm json specs 15 | policy: ghcr.io/elastic/oblt-updatecli-policies/apm/apm-json-specs:0.6.0@sha256:e5a74c159ceed02fd20515ea76fa25ff81e3ccf977e74e636f9973db86aa52a5 16 | values: 17 | - .ci/updatecli/values.d/scm.yml 18 | - .ci/updatecli/values.d/apm-json-specs.yml 19 | - name: Update Updatecli policies 20 | policy: ghcr.io/updatecli/policies/autodiscovery/updatecli:0.8.0@sha256:99e9e61b501575c2c176c39f2275998d198b590a3f6b1fe829f7315f8d457e7f 21 | values: 22 | - .ci/updatecli/values.d/scm.yml 23 | - .ci/updatecli/values.d/update-compose.yml 24 | - name: Update Updatecli version 25 | policy: ghcr.io/elastic/oblt-updatecli-policies/updatecli/version:0.2.0@sha256:013a37ddcdb627c46e7cba6fb9d1d7bc144584fa9063843ae7ee0f6ef26b4bea 26 | values: 27 | - .ci/updatecli/values.d/scm.yml --------------------------------------------------------------------------------