Skip to content

Commit

Permalink
Add extra info to client version
Browse files Browse the repository at this point in the history
  • Loading branch information
kesmit13 committed Feb 20, 2025
1 parent 6719dfe commit 2f8375e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions singlestoredb/http/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,10 @@ class Connection(connection.Connection):

def __init__(self, **kwargs: Any):
from .. import __version__ as client_version

if 'SINGLESTOREDB_WORKLOAD_TYPE' in os.environ:
client_version += '+' + os.environ['SINGLESTOREDB_WORKLOAD_TYPE']

connection.Connection.__init__(self, **kwargs)

host = kwargs.get('host', get_option('host'))
Expand Down
3 changes: 3 additions & 0 deletions singlestoredb/mysql/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,9 @@ def _config(key, arg):

from .. import __version__ as VERSION_STRING

if 'SINGLESTOREDB_WORKLOAD_TYPE' in os.environ:
VERSION_STRING += '+' + os.environ['SINGLESTOREDB_WORKLOAD_TYPE']

self._connect_attrs = {
'_os': str(sys.platform),
'_pid': str(os.getpid()),
Expand Down

0 comments on commit 2f8375e

Please sign in to comment.