newrelic-python-agent
newrelic-python-agent copied to clipboard
Support reading configuration from pyproject.toml
Is your feature request related to a problem? Please describe.
No.
Feature Description
Please read configuration from the shared configuration file pyproject.toml as well as newrelic.ini (one or the other, preferring pyproject.toml). Example mapping based on current newrelic.ini format:
[tool.newrelic]
log_level = "info"
high_security = false
monitor_mode = true
app_name = "app_name"
# Extends above
[tool.newrelic.production]
app_name = "app_name (Production)"
# [import-hook:django]
# instrumentation.scripts.django_admin = process_tasks runjob runjobs
# becomes:
[tool.newrelic.import-hook.django.instrumentation.scripts] # replace : with -
django_admin = ["process_tasks", "runjob", "runjobs"]
This will help to reduce the amount of project metadata files needed.
Describe Alternatives
n/a
Additional context
PEP 621 – Storing project metadata in pyproject.toml
Priority
Really Want.
https://new-relic.atlassian.net/browse/NR-323567