newrelic-python-agent icon indicating copy to clipboard operation
newrelic-python-agent copied to clipboard

Support reading configuration from pyproject.toml

Open Tatsh opened this issue 1 year ago • 1 comments

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.

Tatsh avatar Oct 08 '24 20:10 Tatsh

https://new-relic.atlassian.net/browse/NR-323567