diff --git a/tests/python/Dockerfile b/tests/python/Dockerfile index a0e6395..0b6fd79 100644 --- a/tests/python/Dockerfile +++ b/tests/python/Dockerfile @@ -1,4 +1,4 @@ -ARG RUNTIME_VERSION=3.7 +ARG RUNTIME_VERSION=3.11 FROM python:$RUNTIME_VERSION # Install dependencies diff --git a/tests/python/chart/templates/deployment.yaml b/tests/python/chart/templates/deployment.yaml index 5aa16dd..213a8c2 100644 --- a/tests/python/chart/templates/deployment.yaml +++ b/tests/python/chart/templates/deployment.yaml @@ -12,9 +12,7 @@ spec: metadata: labels: app: test-app-python - app.newrelic.instrumentation: python - annotations: - instrumentation.newrelic.com/inject-python: "true" + app.newrelic.instrumentation: newrelic-python-agent spec: containers: - name: test-app-python diff --git a/tests/python/chart/templates/instrumentation.yaml b/tests/python/chart/templates/instrumentation.yaml index 2c5fbcf..0a5362b 100644 --- a/tests/python/chart/templates/instrumentation.yaml +++ b/tests/python/chart/templates/instrumentation.yaml @@ -8,7 +8,7 @@ spec: matchExpressions: - key: "app.newrelic.instrumentation" operator: "In" - values: ["python"] + values: ["newrelic-python-agent"] agent: language: python image: e2e/newrelic-python-init:e2e diff --git a/tests/python/main.py b/tests/python/main.py index 0a56790..20c7ddb 100644 --- a/tests/python/main.py +++ b/tests/python/main.py @@ -1,3 +1,5 @@ +import os +import pprint import sys import traceback @@ -30,4 +32,6 @@ def hello_world(): return "
Hello, World!
new_relic_path = %s
" % str(new_relic_path) except Exception: - return "".join(traceback.format_exception(*sys.exc_info())), 417 + response = "\n".join(traceback.format_exception(*sys.exc_info())) + response += "\n" + pprint.pformat(dict(os.environ)) + return response.replace("\n", "