-
Notifications
You must be signed in to change notification settings - Fork 637
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix sqlalchemy for postgres Unix sockets (#761)
* Fix sqlalchemy for postgres unix sockets The following bit of replaced code contained a type inconsistency: ```py attrs[SpanAttributes.NET_PEER_PORT] = int(data.get("port")) ``` `data.get` returns `Optional[str]` but `int(None)` throws a `TypeError`. When using postgresql via unix socket `dsn` looks something like this: ```py 'user=postgres host=/tmp/socket dbname=postgres' ``` The `parse_dsn` function returns this: ```py {'user': 'postgres', 'dbname': 'postgres', 'host': '/tmp/socket'} ``` * Update CHANGELOG * Conditionally set net.transport for psql tcp/unix * Use .value properties of enums * Improve postgresql attribute detection from cursor * Fix formatting Co-authored-by: Matt Oberle <[email protected]> Co-authored-by: Srikanth Chekuri <[email protected]>
- Loading branch information
1 parent
2dd9bd1
commit 10d8e26
Showing
2 changed files
with
26 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters