Hello.
I'm using multiple postgresql hosts (https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING section 34.1.1.3).
The APM crashes trying to convert comma separated list of ports in a int:
File "/usr/local/lib/python3.7/site-packages/elasticapm/instrumentation/packages/psycopg2.py", line 86, in call
if int(port) != default_ports.get("postgresql"):
ValueError: invalid literal for int() with base 10: '5432,5433'
To Reproduce
- Configure multiple hosts in postgres config (more than 1 host and port)
- Start the app
- crashes with the exception:
File "/usr/local/lib/python3.7/site-packages/elasticapm/instrumentation/packages/psycopg2.py", line 86, in call
if int(port) != default_ports.get("postgresql"):
ValueError: invalid literal for int() with base 10: '5432,5433'
Environment (please complete the following information)
- OS: Linux containerd
- Python version: 3.7
- Framework and version [e.g. Django 2.1]: Django 2.1
- APM Server version: 7.12.1
- Agent version: 6.6.1
Additional context
https://github.com/elastic/apm-agent-python/blob/master/elasticapm/instrumentation/packages/psycopg2.py#L86
Hello.
I'm using multiple postgresql hosts (https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING section 34.1.1.3).
The APM crashes trying to convert comma separated list of ports in a int:
To Reproduce
Environment (please complete the following information)
Additional context
https://github.com/elastic/apm-agent-python/blob/master/elasticapm/instrumentation/packages/psycopg2.py#L86